BabaJ

BabaJ

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Iterative loop April 26, 2024, 8:46 p.m.

gordig
If that gets stored by the conditional executing, then the new value of @f will drive the next blink.

But it doesn't get 'stored'. It only knows what the current values as they are per frame.


gordig
I could pre-generate a list of blink frames based

Yes...that's kind of a 'brute' force way of doing things.
You might want to look at how sop solvers work, as you can work as if values are stored.

If you look at this page, the initial explanation should help show how it is similar with what you are doing.
https://tokeru.com/cgwiki/The_solver_sop.html#prev-frame-vs-previous-frame [tokeru.com]

Iterative loop April 26, 2024, 8:48 a.m.

gordig
At frame 59, I get new values of @f = 115 and @fr = 56. Sounds good, right? But after frame 59, it reverts to the initial values, so there's never a second blink.

That's because at frame 59 it ($F) matches your code you have set up for only that Frame.

gordig
Why isn't the last line, which should add the interval of the next blink onto the frame number of the previous blink, actually doing that?

Unless it's a specialized node, the wrangle does not 'see/know' what the values are for the previous frame, and so neither what values where calculated. It is only calculating what you have on any given frame.

If you want a blink at other specific frames you will have to make a conditional statement for those specific frames,
or you could make use of a solver sop which can remember previous frame values so that your code can accommodate that scenario.

read an attribute name April 20, 2024, 8:10 a.m.

Gerardo Castellanos
I mean, I want to access to the values of that parameters,

As alex and I have already shown you can access the value of the parameter with:

chs("../attrMask")

What is entered into that paramater and how you decided to treat it is another matter.

In all cases a string paramter that you are accessing is just that - only a string.

mask_noiser

or it could be:

@mask_noiser

In either case, it's still only a string and you will have to decide how to deal what is entered or not. How it is entered, or not, etc.

Since it's a string and if a 'proper' name is entered, it can be used to pass into a function argument.
If you want to get a point value for example of an attribute specified by your parameter name entered:

int   Result = pointattrib(0,chs("../attrMask"),5);// if attribute specified refers to an integer
float Result = pointattrib(0,chs("../attrMask"),5);// if attribute specified refers to an float
// etc. etc.

If you are wanting to do some general reading of all types of attributes, you are going to have to determine 'class/types' as part of the process.

https://www.sidefx.com/docs/houdini/vex/functions/attribtype.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/vex/attribtypeinfo_suite.html [www.sidefx.com]

Also, if you or the user entered '@' as part of the parameter text entered, you will have to parse out that symbol character from the string parameter before passing it as a string argument to one of those functions.