Jump to content
lazza79

Solver SOP and substeps

Recommended Posts

Hi Guys,

I am trying to solve a small problem but I can't figure it out precisely.
I want to use a Solver SOP in order to have a color decay effect.
Let's say I decide that the color decays 15% each frame, so I put @Cd.x *= 0.85: in my wrangle

The problem happens if I increase the number of substeps to 2 or 4, in that case, obviously, the decay rate of 15% will be each interaction and not each frame.
Could you please help me with this?
In the attached image, I use a random to decide how much to decrease the color of the point, based on @dist attribute...

 

Cheers!
Andrea

decay.PNG

Share this post


Link to post
Share on other sites

You need to multiply decal_val * @TimeInc to make sure that substeps are being taken into account, or else it will evaluate that every timestep and will decay much faster the more substeps you add. 

Share this post


Link to post
Share on other sites

Thank you! I think I did something wrong because I tried that but I couldn't see the effect.
I'll have a go again!

Cheers!
Andrea

Share this post


Link to post
Share on other sites

I think doing this is not correct  @Cd.x *= decay_val * @TimeInc; Do the math and you will have almost no value to work with; Its better that you subtract and apply a maximum or a clamp after the decay.

Edited by Pazuzu
  • Like 1

Share this post


Link to post
Share on other sites

Yes, that is what I experienced.

I will try now to find the complement of the decay (1-0.85 = 0.15) and multiply that for the @TimeInc.

But I am not sure this will work...

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

×