Jump to content
Screenglow VFX

simple question (using detail atrib for scaling)

Recommended Posts

Posted (edited)

Hey guys,

Easy problem (I am missing something).I calculate "ratio" detail attribute to use for scaling an object.Works fine,but in the display value tab (transform node) ,shows 0 value when I put inside @ratio (but it works OK).What am I missing? tks

What would be the best approach to have it much efficient - storing dimensions,center of objects (maybe not writing detail atribs).Also ,was considering not using bbox function,because later on I will have long calculation expressions.

 

Capture3.PNG

easy_question.hipnc

Edited by Screenglow VFX

Share this post


Link to post
Share on other sites

You can't use @ratio directly in a paramater
you have to use a detail hscript expression instead:
detail(opinputpath(".",0),"ratio",0)

or you can scale directly in vex if you run over points instead of detail
 

vector size = getbbox_size(0);
@P *= size.x/size.z;

 

Share this post


Link to post
Share on other sites

Thanks.Make sense.

However @ratio directly used is working but not displaying the value.

What would be the best practice when modeling in order to avoid endless bbox functions? Vex?

Tks

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

×