Page 1 of 1

Snap to surface

Posted: Mon Jan 19, 2004 12:58 pm
by clem
hik i am a landscape planner and I want to use blender for visualisation of a landscape. I use Arcview for the analysis and layout of maps.

I have a landsurface exported from Arcview wich is a GIS-Tool into dxf. This is imported into blender.
Now i want to place trees onto the landsurface. Is there any way to place the trees automatically on the landsurface.
e.g. select a tree and push a button "snap to surface" then select the surface and then the tree is placed on the surface.

Is there something like this in blender, how difficult would it be to implement this?

regards

clem

Posted: Mon Jan 19, 2004 1:17 pm
by ideasman
I dont think this would be that hard to do using a python script.

Have a mesh galld "Land" and any other selected object woul;d be treated as a tree.

A+P Run the magic script.

ANd all trees will move down in the Y until the hit one of "Land"'s faced.

This would be a little tricky - The collision detection bit, but Im sure sombody would help with that if you ask nicely.

Posted: Mon Jan 19, 2004 2:04 pm
by zaz
The Blender Gamekit book, available in the E-shop here and in bookstores, has a utility that does this. The big caveat is that the game engine is only available right now in versions 2.25 and earlier. The game engine is coming back, but it will be a while before its in a newer released version of blender.

If you know a little python, it'd be pretty easy to use one part of the script in 2.25 and the other part in a current version of blender, making it so you don't need to save your .blend in 2.25 and possibly loose information. If you're already using 2.25 or earlier, you could just run the script. The game engine is necessary for this because it relies on the physics of the game engine to let your objects fall to the ground.

Questions like this are more likely to get answers and more appropriate for http://www.elysiun.com/ The blender.org web site is more for development issues.

Thanks so far

Posted: Mon Jan 19, 2004 2:22 pm
by clem
sorry, but do not know any python. maybe i will get into it.

clem

Posted: Mon Jan 19, 2004 7:47 pm
by harkyman
There is this:

http://www.elysiun.com/forum/viewtopic.php?t=20047

But as of yet there is no easy "Drop To Floor" command or script.

Wouldn't be too hard, would it developers?

Developers?

Posted: Mon Jan 19, 2004 7:47 pm
by Analogy
Go into editmode for the landscape, select the vertex you want to snap to, shift-S, cursor->selection, get out of editmode, select your tree, shift-S selection->cursor.

Tada!

Posted: Mon Jan 19, 2004 8:26 pm
by jesterKing
Which will put the center of the tree-object on the cursor... So if the object-center is somewhere in the midle of the tree... you'll get not the wanted result.

Posted: Tue Jan 20, 2004 12:12 am
by fligh

Posted: Tue Jan 20, 2004 8:14 pm
by harkyman
I just wrote a script that places alread-created objects onto a ground mesh. Find it here:

http://www.elysiun.com/forum/viewtopic.php?t=20148

Posted: Wed Jan 21, 2004 2:00 am
by dgebel
Does beast snap to the face's normal or just the surface?
I don't think we have extrude from normal yet, do we?
I've wanted that before more than once.

Posted: Wed Jan 21, 2004 2:22 am
by harkyman
Can't you just make your selection, do an extrude, hit escape, then hit alt-s to move your extrusion along the normal?

Posted: Wed Jan 21, 2004 9:21 pm
by tuinbels
dgebel wrote:I don't think we have extrude from normal yet, do we?
I've wanted that before more than once.
Something like this?

or alternatively, ALT-S scales along the normal: Hit E, then ALT-S,

just depends on what you want to achieve...

Posted: Thu Jan 29, 2004 3:07 pm
by harkyman
I've written a python script that will drop selected objects onto a mesh surface.

Here's the thread on elYsuin, where you can read about and download the script:

http://www.elysiun.com/forum/viewtopic. ... highlight=