How to flatten primitives within a group?

   1764   4   0
User Avatar
Member
4 posts
Joined: July 2020
Offline
Hi, i'm experimenting with generating buildings via voronoi fracturing. I have a nice collection of buildings and added a mountain node to add some height variation as you might get in a city. However this has meant that the roofs of my buildings are now sloped and i'm stuck on how to make them flat. Could anyone advise please? I'm a big noob when it comes to vex so a step by step would be very handy please if that is a solution offered. Thanks.

Attachments:
GroupWithPrimitives.jpg (33.1 KB)

User Avatar
Member
710 posts
Joined: July 2005
Online
One way to do it is to use the Primitive Properties SOP. Set your top prims as the Source Group, enable Do Transformation and then set the Y scale to 0. If you don't already have a group for your top faces you can use the Group SOP to create one (Keep by Normals, Y direction, low Spread Angle).
User Avatar
Member
340 posts
Joined: June 2017
Offline
Or you could use clip and polycap nodes.
User Avatar
Member
710 posts
Joined: July 2005
Online
You could, however that will leave all your roofs at the same height. Primitive Properties will use each prim's centroid to do the scaling.
User Avatar
Member
4 posts
Joined: July 2020
Offline
The primitive properties SOP was exactly what I was after, thanks guys!
  • Quick Links