Search - User list
Full Version: like ICE state machine
Root » SI Users » like ICE state machine
jeffMc
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
edward
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,
if (@Frame < start_frame)
    @mySize = initial_value;
else
    @mySize = min(initial_value + (@Frame - start_frame) * 0.01, max_value);
Andy_23
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
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!
friedasparagus
Ok, couldn't leave it alone… so made a slightly more interesting one

EDIT: for goodness sake attach before you submit!
jeffMc
huge thanks guys
some great information here
Chops and Solvers have been mysterious and intriguing things that I have yet to really explore
Guess it is time to jump in.
jeffMc
Edward - I love the Tokeru site, been there many times but somehow had not seen the solver section.

friedasparagus - this is gift!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB