Snap to surface

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

Post Reply
clem
Posts: 0
Joined: Mon Jan 19, 2004 12:47 pm

Snap to surface

Post by clem » Mon Jan 19, 2004 12:58 pm

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

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

Post by ideasman » Mon Jan 19, 2004 1:17 pm

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.

zaz
Posts: 0
Joined: Mon Dec 01, 2003 5:44 am

Post by zaz » Mon Jan 19, 2004 2:04 pm

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.

clem
Posts: 0
Joined: Mon Jan 19, 2004 12:47 pm

Thanks so far

Post by clem » Mon Jan 19, 2004 2:22 pm

sorry, but do not know any python. maybe i will get into it.

clem

harkyman
Posts: 98
Joined: Fri Oct 18, 2002 2:47 pm
Location: Pennsylvania, USA
Contact:

Post by harkyman » Mon Jan 19, 2004 7:47 pm

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?

Analogy
Posts: 0
Joined: Thu Jan 15, 2004 4:02 am

Post by Analogy » Mon Jan 19, 2004 7:47 pm

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!

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing » Mon Jan 19, 2004 8:26 pm

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.

fligh
Posts: 31
Joined: Mon Dec 30, 2002 11:28 pm
Location: US

Post by fligh » Tue Jan 20, 2004 12:12 am


harkyman
Posts: 98
Joined: Fri Oct 18, 2002 2:47 pm
Location: Pennsylvania, USA
Contact:

Post by harkyman » Tue Jan 20, 2004 8:14 pm

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

dgebel
Posts: 30
Joined: Mon Mar 17, 2003 7:20 pm
Location: Ontario, Canada

Post by dgebel » Wed Jan 21, 2004 2:00 am

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.

harkyman
Posts: 98
Joined: Fri Oct 18, 2002 2:47 pm
Location: Pennsylvania, USA
Contact:

Post by harkyman » Wed Jan 21, 2004 2:22 am

Can't you just make your selection, do an extrude, hit escape, then hit alt-s to move your extrusion along the normal?

tuinbels
Posts: 17
Joined: Mon Nov 18, 2002 4:19 pm

Post by tuinbels » Wed Jan 21, 2004 9:21 pm

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...

harkyman
Posts: 98
Joined: Fri Oct 18, 2002 2:47 pm
Location: Pennsylvania, USA
Contact:

Post by harkyman » Thu Jan 29, 2004 3:07 pm

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=

Post Reply