I'm building a small village, and I'm trying to find out the best way to place buildings onto my terrain. I've already created and placed all of the buildings' X and Y coords. I created terrain for the village, and I'm hoping to use some sort of modifier or clever trick to place the buildings correctly on top of the terrain. If I do something like a displacement map, the buildings will all be vertically skewed. Is there a better way to do this?
Replies
What type of script would do this? I'm not even sure what operation to use to make a single building sit on the ground correctly, at this point.
If the huts are instances or clones, you could use the object paint tools. Load them up in the library and click/paint them into place. If they're all individual that probably won't work that well...
There was a plug-in called "Glue-it" I think that would move object to the surface of another object.
You could experiment with the "conform compound object". This won't work on your huts, it will smash them flat. I'm not sure if it moves an objects pivot to the surface or just the mesh. If it moves the pivot you could link the hut to a dummy object of some kind and conform that to the surface and then snap the hut to the conformed shape. That could probably be automated through scripting also.
You could also use a Position Attachment Constraint, depending on your scripting knowledge you could set up a quick script that lets you click on a hut, and place it on the terrain. You probably want to make a "snapshot" of the mesh and delete the attachment constrained version.
Or actually you might not even need the attachment constraint, you could probably get the poistion from a mouse click and just move it there...
You could paint a spline on the surface, then link the huts to dummy objects and path deform the dummies?
I dunno... didn't give it much thought there are some ideas.
i can give you a script for that if need be. I made the script only position the house not change their orientation to fit the terrain, I can do that too, but it struck me as a dumb idea.
If you find the houses are not fully bedded into the ground there are 2 solutions, you can move their pivots up a little and re cast or you can model a platform for them to sit on.
http://www.creativecrash.com/maya/downloads/scripts-plugins/rendering/misc/c/sppaint3d
You get a lot of control and can randomize which meshes are placed, their orientation jitter etc. It's a bit of a duplicate of some of Maya's existing tools, but whith some additions and a simple interface.
That sounds promising. Not sure how I'd script it, though.
Sweet, I'll give that a shot in the morning. If that doesn't work, I'll try Cheese's "spPaint3d.mel". Thanks for all the suggestions!
Cool keep us posted.
http://myfacewhen.com/96/
In otherwords, "OMIGOD, that was sweet". It worked, quickly, and didn't crash or do anything crazy.
It seems like some buildings were placed at different heights than others; not sure if that's a problem with pivots on my place or something to do with the scripts (I think most of the misplaced buildings were 2-story buildings as opposed to 1-story, if that makes a difference), but select-by-name and moving them as a group helped clear that up.
Thanksx100. I'm holding a cold Worldwide Stout against the monitor for you, as per your instructions.
you probably need to add an oversized fundament mesh, thats what i did everytime