User parameter in LSystem

   4484   4   2
User Avatar
Member
6 posts
Joined: Nov. 2008
Offline
Hello,

I'm using Houdini 10 on Linux.

I'm having problems using user defined parameter in my LSystem rules.

Here is a simple tryout:
Premise: FX
Rule1: X=&(`ch(“mytest”)`)FX

It is just a bending skeleton stick that uses the user defined parameter “mytest” as bending angle per generation.

If I set the parameter to a certain angle and write the rule, it picks it up fine. But when I change the parameters with it's slider or just enter a new value, the turtle does not update.

However, if I use one of the existing variables under the “Values” tab, it works fine.
Rule1: X=&(`ch(“varb”)`)FX

Anyone knows how to make this work ?

Thanks,

Frank
Frank Aalbers
Effects TD
Pixar Animation Studios
User Avatar
Member
156 posts
Joined: July 2005
Offline
Hi Frank,

In the rules, it is looking for l-system code - aka “A=FA” etc. In normal houdini code we never use that. So it kind of makes sense that it doesnt work the opposite way either - “Ach”“)” etc. This is only true for the Rules, you can still channel reference in the other parameters.

So what you have to do is go to the Values Tab of your Lsystem. There is a number of variables parameter. Add one. Give it a name - like “W” and now you can make it equal to some kind of keyframed angle.

so your equation would now look something like
Rule1: X=&WFX

Hurray!
“In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.” - Douglas Adams
User Avatar
Member
6 posts
Joined: Nov. 2008
Offline
Well … I added “opcook -F .” to the Callback Script and then it worked. It's definitely a bug.

But yes … creating additional variables in the values tab is probably the right way to go.

Thanks,

Frank
Frank Aalbers
Effects TD
Pixar Animation Studios
User Avatar
Member
6 posts
Joined: July 2009
Offline
sorry. I added a new value w in the value tab of l-system. and also the command : “opcook -F”

the premise : FX
the rule: X=&(`ch(“w”)`)FX

but the l-system does update unless i change the generation number.

I do not understand why. Could you give me some hints? thanks.
User Avatar
Member
6 posts
Joined: Nov. 2008
Offline
If you add a parameter in the values tab using the +/- it will work fine. I was talking about adding a parameter using the “Edit Parameter Interface” of the SOP. That one needs opcook. The system under the Values Tab doesn't

When you use the “Values Tab” and add the param “w” you just have to write the rule:
X=&(w)FX
Frank Aalbers
Effects TD
Pixar Animation Studios
  • Quick Links