Scale depending on distance from centre

   1908   2   0
User Avatar
Member
1 posts
Joined: Jan. 2021
Offline
Hey everyone

I'm trying to figure out how to increase the height of the copied boxes depending on their distance from the centre.

So the further they are, the taller they become and the closer, the shorter. Not sure how to do that.



Any tips?

Image Not Found

Attachments:
untitled.hipnc (139.0 KB)
Screenshot (24).png (974.1 KB)

User Avatar
Member
555 posts
Joined: Feb. 2017
Offline
what about something like this (probably lots of other ways too)

Attachments:
untitled2.hipnc (146.4 KB)

User Avatar
Member
9 posts
Joined: Feb. 2019
Offline
Hmm. Off the top of my head, the way I would do it is:
Put in a PointVOP on the points you're using to instance your buildings. In that VOP you'll want to get the length of the P vector, which is essentially the distance from a given point (Px,Py,Pz) to the world origin (0,0,0), in a float value. Then you'll want to fit that value between 0 and 1. You can create a temporary attribute with a bind export to see those distance floats on your points in your geometry spreadsheet. Find the highest value (just looking at your viewport it should be something like 140ish) and enter that as the source max on the fit node, leave min at 0 unless you want the inner buildings to be tiny. Plug the fit output into a ramp parameter node to get very fine control of building sizes. Finally, multiply this with the existing pscale attribute. Keep in mind this is scaling each building's total size, not just its height.
  • Quick Links