I'm trying to project many buildings or many shapes into a very uneven Terrain.

I've tried many ways, the closest where to use: only ShrinkWrap constrain, and the best is to use a combination of Lattice modifier and ShrinkWrap modifier.

Most of the times the problem is that the buildings go thru the terrain, some more than others. I would like them to all just sink a little bit.

The other issue is that the roof gets deformed to follow the angle of the terrain mesh.

In my example, the red building is higher. and if you look underneeth half of the building is under ground.

And all the roofs are flat, and as you can see some get an inclination ( deformation ).

Here is the file and a photo:

[![enter image description here][1]][1]

[EDIT] The problem I get with the suggestions (which I read many times), is that the lattice ( yes, I moved it up and down, under the buildings, scaled it, ... ) but it doesn't adapt to the mountain. For you to understand see next new image, showing the bottom of the mountain: the buildings are underneath the mountain, and they don't even show on top of the mountain.

buildings under the mountain - lattice mesh not adapting to terrain mesh


Unfortunately I couldn't download your file but here are some ideas.

Set the lattice so that is at the bottom of the buildings.

enter image description here

To prevent the deformation on top of the buildings generate a vertex group, and assign only the bottom vertices of your buildings to it.

enter image description here

Then use that vertex group for the lattice. That way only the vertices on the group will be affected by the modifier.

enter image description here

enter image description here

  • $\begingroup$ Wow, @Cegaton, very well explained, but I don't see any ShrinkWrap. For some reason it doesn't work when I do it. I uploaded a new file with your suggestions. but I had to put a ShrinkWrap for it to adapt to the mesh. and still is distorting the buildings. could you take a look? Something else I though, is that the lattice only allows a maximum subdivision of 64. So, for this little example it might work, but when I have the entire city, it will not be sufficient. what do you think? I'm using Open-Street-Maps. $\endgroup$ – sebseb Apr 16 '17 at 22:51
  • $\begingroup$ The shrinkwrap is applied to the lattice $\endgroup$ – user1853 Apr 16 '17 at 23:14
  • $\begingroup$ @sebseb please read the answer carefully: you created a vertex group but didn't assign the bottom vertices. On the shrinkwrap modifier you need to use project mode and select negative Z see the image added to the answer. $\endgroup$ – user1853 Apr 17 '17 at 3:23
  • $\begingroup$ thanks again. yes I forgot to assign the Vertex Group. Now I understand a bit better how it works. I uploaded a new file with your comments. 2 things: 1) the ShrinkWrap doesn't adapt to the mountain, so the buildings are inside the mountain and 2) using the bottom Vertex group the buildings get distorted vertically. The later doesn't bother me too much, although they strech a lot, and go under the terrain a lot which will affect the textures ( the shops under the buildings ). I just don't see a way to tell the ShrinkWrap to adapt exactly to the Terrain. The Offset is 0, so that should be it,no $\endgroup$ – sebseb Apr 17 '17 at 10:42
  • $\begingroup$ @sebseb again please read the answer. The second paragraph and the first picture. Now look at your file i.stack.imgur.com/5BrKi.png. If you put the lattice over the geometry it will push it down past the terrain. I can't help you if you don't read the answer or do something different. Good luck on your project. $\endgroup$ – user1853 Apr 17 '17 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.