Jump to content

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!

 

 

Link to comment
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
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...