Jump to content

Scripted Plant Placement


dvmorris
 Share

Recommended Posts

Is there a way to place plants at certain points in a layer from an autocad drawing, in 3dStudio Viz/Max?

 

I have a huge dwg file, with at least 100 layers, and a bunch of the layers have circles drawn to indicate tree positions. I'm wondering if I can automate the process of placing the plants/trees in the circles' center points useing maxScript or something, by referencing the objects on a given layer.

 

Thanks for your help,

 

Dave

Link to comment
Share on other sites

Here's one thing I do a lot...

If your AutoCAD symbology are blocks, you can do a REFEDIT, change the circles to triangles, and save the new block. That will turn every similar block into a triangle. Do this to each block type (ie vegetation type), using a different layer name with each type. Then explode all the blocks and import the triangles into Max with the 'Combine Objects by Layer' option enabled. You will then have individual objects comprised of all the triangles that represent the individual plants and trees. Convert the splines (triangles) to an Edit Mesh and then use the Scatter command with the 'All Face Centers' option to place a single plant or tree on each face. The whole process can take less than an hour for a huge development with dozens of vegetation types.

 

If your symbology is not made up of blocks, I would go through and either place triangles on top of each individual piece of vegetation or create a spline that represents the area of vegetation, import the spline, Edit Mesh it, and Scatter vegetation evenly over the surface of the mesh.

Link to comment
Share on other sites

Just for the heck of it, here are a couple of images that show what I'm talking about. The 'rendering.jpg' image shows the final rendering that was made with vegetation that was created using imported triangles as shown in the two other images (which are too big to upload here).

 

http://www.3das.com\site_with_triangles.jpg

http://www.3das.com\site_closeup.jpg

Link to comment
Share on other sites

Yes it matters very much because when you explode the blocks, the only layer that will show is the layer the individual lines that made up the block were. So while in REFEDIT mode, change the layer of the lines. It doesn't matter what the layer of the block is because when you explode the block, that association is gone.

Link to comment
Share on other sites

is there a way to create a terrain, then project those triangle meshes onto the terrain, then scatter the trees and keep them oriented vertically, but their initial z values would all be unique according to the level of the terrain?

Link to comment
Share on other sites

Good question...first, turning off 'Perpendicular' in Scatter will fix the orientation so that they are all pointing upwards. As far as using on 3D terrain...there's no way that I know to do exactly what you're asking. I would scatter the vegetation, set the duplicates value high, Edit Mesh it and go to element subobject mode and detach one good vegetation per area. That will take a little more time but will get the result you're looking for.

Link to comment
Share on other sites

Actually to place objects either Perpendicular to the terrain or pointing up - or some desired ratio between the two, you might want to check GroundWiz plugin. GroundWiz Planter allows just that. I'm using Lite version here (free version) and it has many other options for placing....

Check their online manual: http://www.gugila.com/man/_gwp_technical_overview.html

and check 'Setup Transformations' section.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...