Trying to emulate a SI state machine where if a particle is in a state it incrementally scales till it reaches its max size.
Upon entering a state in ICE I would use a linear interpolate to blend the current value with a percentage of the max value till it reached the max value.
I think I know how to do it in Houdini but nothing seems to work.
My wrangles don't seem to add to themselves
float mySize;
@mySize +=.01;
Maxes out at .01
trying the same in VOP I have the same problem where the variable seems to reset on each iteration instead of adding to itself. does anyone have an example I could peek at?
I get confused between when to use Bind, parameter, attribute, etc…
sincerely, still learning
like ICE state machine
3549 6 1- jeffMc
- Member
- 124 posts
- Joined: April 2014
- Online
- edward
- Member
- 7694 posts
- Joined: July 2005
- Online
If you want your attribute values to maintain their previous values from frame to frame, then you need to be doing it in a solver context like DOPs (dynamics) or inside of a
Make sure you're doing this in the DOPs (dynamics) context or at least inside of a Solver SOP:
- http://www.tokeru.com/cgwiki/index.php?title=The_solver_sop [tokeru.com]
- https://www.sidefx.com/docs/houdini/nodes/sop/solver [sidefx.com]
Having said that, these type of problems like a value increasing by a fixed increment can usually solved without using state although being harder to setup. For example, in your particular case, the non-state dependent expression can be something like,
Make sure you're doing this in the DOPs (dynamics) context or at least inside of a Solver SOP:
- http://www.tokeru.com/cgwiki/index.php?title=The_solver_sop [tokeru.com]
- https://www.sidefx.com/docs/houdini/nodes/sop/solver [sidefx.com]
Having said that, these type of problems like a value increasing by a fixed increment can usually solved without using state although being harder to setup. For example, in your particular case, the non-state dependent expression can be something like,
if (@Frame < start_frame) @mySize = initial_value; else @mySize = min(initial_value + (@Frame - start_frame) * 0.01, max_value);
- Andy_23
- Member
- 918 posts
- Joined: March 2014
- Offline
jammer
float mySize;
@mySize +=.01;
Maxes out at .01
What the Wrangle node does is it takes the current value of @mySize and adds + 0.01 for all points. If the @mySize attribute is not set prior to the Wrangle it gets a default value of 0, then the Wrangle runs exactly once for all points, therefore you end up with a value of 0.01.
Have a look here: http://shortandsweet3d.blogspot.de/2017/01/xsi-to-houdini-3-solver-node-in-this.html [shortandsweet3d.blogspot.de]
Mikael does great work showing how he's learning Houdini coming from Softimage.
Hope this helps and have fun
Andy
- friedasparagus
- Member
- 402 posts
- Joined: June 2014
- Offline
Hello,
thought I'd bung up a really simple example of using CHOPs to control this kind of thing. I've put a parm on the chop to control a constant which is used to switch the input curve on or off. When on the scrubbing the timeline will make the sphere grow.
Anyway, thought a different approach might be interesting And CHOPs are a great way of controlling things over time, and in some instances can be a lot more flexible than using solvers.
Cheers,
Henry
EDIT: forgot the file!
thought I'd bung up a really simple example of using CHOPs to control this kind of thing. I've put a parm on the chop to control a constant which is used to switch the input curve on or off. When on the scrubbing the timeline will make the sphere grow.
Anyway, thought a different approach might be interesting And CHOPs are a great way of controlling things over time, and in some instances can be a lot more flexible than using solvers.
Cheers,
Henry
EDIT: forgot the file!
Edited by friedasparagus - March 22, 2017 06:57:13
Henry Dean
- friedasparagus
- Member
- 402 posts
- Joined: June 2014
- Offline
- jeffMc
- Member
- 124 posts
- Joined: April 2014
- Online
- jeffMc
- Member
- 124 posts
- Joined: April 2014
- Online
-
- Quick Links