Jump to content
borbs727

Drive pscale with area/perimter of a primative?

Recommended Posts

I did Entagma's tutorial on quadtrees and I want to take it a step further with my own simple twist. I want to use the area/perimeter/whatever of each quad to spawn points' and drive their respective pscale attributes. So smaller faces will generate smaller cubes (see image below).

I'm able to generate points, but can't correctly drive the pscale attribute. I've tried using area and perimeter in the measure SOP. What am I missing?

Hip attached: forums_area_to_pscale.hiplc

The top image is what I'm currently getting, and the bottom is what I'd like to get (not just within the pink rectangle, but in the entire object):

drive_psacle_correct_outcome.thumb.jpg.ec20901fbcf44d883a274555c0891049.jpg

Thanks!

 

 

Share this post


Link to post
Share on other sites

had to fudge the values a bit, but this should get you pretty close. switched your VOP for some VEX, it's a little easier to read. there wasn't any need for an Attribute Transfer since your number of points was exactly the same as the number of prims, so I just read the attribute directly from the matching prim number.

 

forums_area_to_pscale_toadstorm.hiplc

Edited by toadstorm
  • Thanks 1

Share this post


Link to post
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

×