Drop to ground

Hello,

Does somebody know how I can drop 3D- objects to a curved ground surface (with object_drop_to_ground.py in blender 2.62) and still let the vertices that form ‘the roof’ stay straight?

I hope i’m in the right forum with this…

virginie

Look at the script:
There is align = BoolProperty(
name=“Align to ground”,
description=“Aligns the object to the ground”,
default=True)
Which should be visible in the GUI (toolshelf) make it False! (just a click) … and the object will not be rotated …

It is not … though without great adjustments set
default = False

will try soon (just compiling latest Blender)

EDIT:
Indeed works.

Add this lines to the operator after it’s execute


    def draw(self,context):
        layout = self.layout
        col = layout.column()
        col.prop(self,"align")

Then you can make up you mind by just a click ;-)!!! (below in the tootshelf!)

I’m sorry,
I don’t understand…where do i have to type that? I never understand how people do that…
And the object has to align with the ground, only the ‘roof’ not…
greetings and thanks for your answer.


OK. first thing first …
you are using an addon: object_drop_to_ground.py
this is a file you Blender uses at the moment you activate it OK?

It has to be on you PC, hasn’t it? So search for it.
Normally it should be (Windows) at [*/2.62] <— that part depends on your version and PC /scripts/addons/object_drop_to_ground.py

edit it with an ASCII editor and in it there is only one :


    ##### EXECUTE #####
    def execute(self, context):
        print('
Dropping Objects')
        drop_objects(self, context)
        return {'FINISHED'}

And here after you add above def _draw(…)… (with good indentation)!

Only the roof not is very difficult if you do not give us a real object wich should not rotated.
You mean only rotate a part of an object … do not know (yet) to do that !!!

You must be VERY exact in you wish, you description is not exact enough. WHAT do you consider as roof??? Espacially
if you want to drop differen types of objects ? (only the highest point[s] ???)

Hi,

Ok, I’ll try to explain!
So I have a surface that represent reliëf. I made this by import a heighmap (‘Import’-‘image as plane’), subdivide it in edit mode and then use the ‘displace’ modifier. This is the result:


Then I imported the houses that need to be placed on that surface.
I figured i can use two ways to do that:

  1. shrinkwrap modifier (but i saw that it changes the size of the houses)
  2. Drop to ground script
    So you have this (its a church floating above the surface):

and when you drop it down it looks like this:


and in edit mode:
(see next message, only allowed three attachments per message…)

So the church ground plane must be curved (because it has to follow the relief) but its ‘roof plane’ has to be in a right angle (like in real life).
You have any idea how i can accomplish that?

thank you,

virginie

Hmmm.

I think you have to drop your objects with the object_drop_to_ground (after either adding my draw suggestion or
replacing the True to False in the script to always drop without rotation.
If you even drop it a little bit lower, and that is difficult to see how much but visually possible the ground cuts your
house nicely and from above is the part UNDER the ground not visible.

At least manually you could move vertices of your house upwards to the ground … and what the problem is to do this
automatically (means by computation …)
Theoretically for each point of your object under the ground compute the vertical distance to the surface of the ground and adjust …
Meaning, one has to look/search for a point, object vertical distance computation … (I think it is possible, but do not know at this moment where and how to do …)

Thank you for your answer.
Me

woops…
I wanted to say: mean while i found another possibility… If you have the planes (the ground surfaces of the buildings, without extruding them to ‘blocks’), you can snap them to the faces of the reliëf while you are in edit mode and select al vertices. Set pivot point to individual origins, go to ‘7’ ‘top view’ and do ‘g’ (grab) - z (on z-axis) and click the relief… Now the faces snapped to the face of the relief. you have to turn on the ‘Project individual elements on the surface of other objects’-button.

Next step is ‘g’ (grab) them with snapping turned of, pull them under the relief (on the z-axis) and to ‘S’ (scale)- ‘Z’ (z-axis) - 0. Then you extrude the buildings and apply a boolean! It’s a whole other working method, but it worked so I am happy :slight_smile:

Still: thanks for your help!

greetings