Jump to content
aaryanguna

Parameter values using VEX function

Recommended Posts

Hello Everyone,
Can anyone explain how to set parameter values using VEX function?
Say for example,there is a sphere, scattered. If the current frame is between 5 and 10, the number of scatter points should be 10 else 0.


if(@Frame >= 5 && @Frame <= 10)
{
@scattercount=10;
}
else
{
@scattercount=0;
}

How to set @scattercount to force total count parameter of scatter sop.

Thank you.

Share this post


Link to post
Share on other sites

Hi! You could reference a wrangle node with this expression:

detail("../detail_wrangle","scattercount",0)

Attached is the complete solution.

image.thumb.png.001b9e424464b33201c8105d247766f3.png

scatter.hiplc

  • Thanks 1

Share this post


Link to post
Share on other sites

you can also use hscript directly in the parameter field:
if($F>=5 && $F<=10,10,0)

  • Thanks 1

Share this post


Link to post
Share on other sites

As regards the technique that I have posted ... it doesn't matter if the detail attribute was created in VEX or VOP. I attach the updated version with VOPs.

scatter-vop.hiplc

  • 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

×