Hi,
What I'd like to do is the following:
- I have an L-system that generates an L-system string, as usual
- I want to take this resulting string and use as a Premise in another L-system
Is this possible somehow?
Cheers,
imre
linking L-systems
2537 3 0- riviera
- Member
- 1694 posts
- Joined: March 2020
- Offline
Imre Tuske
FX Supervisor | Senior FXTD @ Weta FX
qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
FX Supervisor | Senior FXTD @ Weta FX
qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
- Fabian
- Member
- 127 posts
- Joined: July 2005
- Offline
While very dirty:
opinfo = hou.hscriptExpression('run(“opinfo /obj/geo1/lsystem1”)')
lsysStart = opinfo.find(“LSystem string:”)
lsysEnd = opinfo.find(“_______”, lsysStart)
return opinfo
this will grab the expanded string from one lsys and then you can have that in the premise parameter of the 2nd lsys. Remember to keyframe this since otherwise the python wont work in the string parm. Not sure if there is a cleaner way of doing this, maybe a custom expression function via the hdk could wrap this up nicer. There are some re-cooking issues so if you need it animated keyframe one of the rules on/off checkboxes in order to force string-reevaluation on the 2nd lsys.
Best of luck,
Fabian
opinfo = hou.hscriptExpression('run(“opinfo /obj/geo1/lsystem1”)')
lsysStart = opinfo.find(“LSystem string:”)
lsysEnd = opinfo.find(“_______”, lsysStart)
return opinfo
this will grab the expanded string from one lsys and then you can have that in the premise parameter of the 2nd lsys. Remember to keyframe this since otherwise the python wont work in the string parm. Not sure if there is a cleaner way of doing this, maybe a custom expression function via the hdk could wrap this up nicer. There are some re-cooking issues so if you need it animated keyframe one of the rules on/off checkboxes in order to force string-reevaluation on the 2nd lsys.
Best of luck,
Fabian
- riviera
- Member
- 1694 posts
- Joined: March 2020
- Offline
Well… That's what I was afraid of… Anyhow, thanks (maybe I log this as an RFE)
Imre Tuske
FX Supervisor | Senior FXTD @ Weta FX
qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
FX Supervisor | Senior FXTD @ Weta FX
qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
- Fabian
- Member
- 127 posts
- Joined: July 2005
- Offline
-
- Quick Links