Jump to content

get center of Box in VOPs


jon3de

Recommended Posts

Hello,

Im working on some cloud pieces. In the attached picture you can see my current cloud "tile". I try to fade out the density on x and z axis to get a more radial shape. My plan is to calulate the distance from the center of the volume and multiply the density with it. The problem is the cloud tile is currently not centered at the origin. So I think I need the center of the volume instead of just the origin to calulate the distance properly. Of course I could manualy try to calulate the desired position and use that but i thought maybe there is a way to do that procedural in the vops network so it also does not break If I transform the volume after. Would be nice to get some help here. Thanks.

 

kind regards

Jon

 

 

cloudTile.hipnc

post-12840-0-32895500-1454801033_thumb.j

Link to comment
Share on other sites

Thank you Chris I did not know the "relbbox" It´s much more practical than my "smooth" setup I created. Nevertheless it does not quite solves the problem with the desired round shape. If I look at the cloud from top view I try to get a more round shape than a box shape. (I should have explained that a little better) I think the distance of each voxel to the center wired up into  a spline ramp would give me what I want. hm...

Link to comment
Share on other sites

Oops, I missed the rounded part! Just create a spline against the X and Z components of the Relative BBox Position, multiply those together with density, set both spline parms to look like this:

 

post-3767-0-00118200-1454804583_thumb.pn

 

If linear interpolation isn't smooth enough, try one of the others (Catmull, Bezier...)

  • Like 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...