Pancho Posted October 23, 2017 Share Posted October 23, 2017 I use a gaslinearcombination to multiply the viscosity over time with something like 1.02. Works fine. Problem: it isn't independent from the amount of substeps I use. If I use 1 substep, it will evaluate once per frame. If I use 8 substeps the value increases so much faster since it evaluates 8 times per frame. Since substeps may vary often depending on the resolution and precision, I wolud like to keep the increase of viscosity constant per time, not per evaluation. So, how do I deal with this kind of stuff? I guess changing values in a popvop will suffer from the same problem. Anybody an idea? Cheers Tom Quote Link to comment Share on other sites More sharing options...
violalyu Posted October 24, 2017 Share Posted October 24, 2017 Hi Tom, Probably consider using @TimeInc something like that? Quote Link to comment Share on other sites More sharing options...
Pancho Posted October 24, 2017 Author Share Posted October 24, 2017 Not sure how to use @TimeInc. Only solution which comes to my mind is to use FIT with the value of viscosity on the beginning of the frame and the end of the frame and use the relative time within the frame to interpolate between those values, but I guess this would require 2 additional attributes on each particle and with 18mil this will be an issue. And the gaslinearcombination wouldn't allow for this kind of coding. I thought there would be something like a global checkboxx which will increment all these values either per each substep or per substep in a fashion that it will be consistent per frame. Quote Link to comment Share on other sites More sharing options...
violalyu Posted October 24, 2017 Share Posted October 24, 2017 Hi Tom, From my understanding I think @TimeInc is the length of time for one substep, however rethinking this problem, since it is a multiplier, and you want say 1.02 per second, so probably something like pow(1.02, 1.0/substep)? so that they match 1.02 per second upon multiplication? Quote Link to comment Share on other sites More sharing options...
violalyu Posted October 24, 2017 Share Posted October 24, 2017 3 minutes ago, violalyu said: Hi Tom, From my understanding I think @TimeInc is the length of time for one substep, however rethinking this problem, since it is a multiplier, and you want say 1.02 per second, so probably something like pow(1.02, 1.0/substep)? so that they match 1.02 per second upon multiplication? Sorry my bad, if it's 1.02 per second you could probably do pow(1.02, @TimeInc), if it's 1.02 per frame then probably pow(1.02, 1.0/substep) :-) Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted October 24, 2017 Share Posted October 24, 2017 gaslinearcombination supports sever ways to scale any of the coefficients by the simulation timestep. It has four options in the drop down menu next to the coefficients: None (default) Timestep 1/Timestep e^Timestep https://www.sidefx.com/docs/houdini16.0/nodes/dop/gaslinearcombination 1 Quote Link to comment Share on other sites More sharing options...
Pancho Posted October 26, 2017 Author Share Posted October 26, 2017 (edited) e^Timestep seems to work for me. But you need to specify the multiplicator differently. Instead of using a factor of 1.02, I need to use one of about 1.8, since this will happen 30x within one second (30fps). Need to check what happens if I use 24fps and whether I need to change the multplicator again. Timestep on its own didn't work instantly. Though I used 1.02 as the factor, my values became smaller. 1/Timestep and the results went through the roof, at least with 1.02. Edited October 26, 2017 by Pancho Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.