I'd like to grow LSytems towards targets. Is there a standard way to do this or do I need to come up with a custom solution?
My idea is to build a VOPSOP network that creates 2 custom attributes to vary the angle and length of the LSystem elements according to the tree-branch position relative to the target(s).
One problem I can see with this is that it may not be possible to access those points on an LSystem where growth occurs (the postition always refers to the whole Lsystem's object?)
Any ideas on other approaches? Dynamic rigs?
Growing LSystems towards targets
6982 5 1- Soothsayer
- Member
- 862 posts
- Joined: Oct. 2008
- Offline
- Soothsayer
- Member
- 862 posts
- Joined: Oct. 2008
- Offline
I had a more detailed look at the LSystems. I think the $(,x,y,z) turtle command does what I want.
In the LSystem Rules tab I have entered $(b,c,d) in “Rule 1”. The b,c,d variables are in the Values tab.
Question: How do I make those b,c,d variables the same as those of the box position in the scene (modified via the VOPSOP)?
I want the LSystem to grow towards the box, wherever I place it.
In the LSystem Rules tab I have entered $(b,c,d) in “Rule 1”. The b,c,d variables are in the Values tab.
Question: How do I make those b,c,d variables the same as those of the box position in the scene (modified via the VOPSOP)?
I want the LSystem to grow towards the box, wherever I place it.
--
Jobless
Jobless
- goldfarb
- Staff
- 3456 posts
- Joined: July 2005
- Offline
- Soothsayer
- Member
- 862 posts
- Joined: Oct. 2008
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
If you want the centroid of the geometry in the VOP SOP:
centroid(“../vopsop1”, D_X)
centroid(“../vopsop1”, D_Y)
centroid(“../vopsop1”, D_Z)
If you want a specific point in the geometry to be the target:
point(“../vopsop1”, 0, “P”, 0)
point(“../vopsop1”, 0, “P”, 1)
point(“../vopsop1”, 0, “P”, 2)
where “../vopsop1” is the path reference to your target SOP
0 is the specific point number in the target geometry you wish to querry
“P” is the Position data attribute to reference
The last value is the index in to the attribute. Since P position is a three float vector, 0 is x, 1 is y and 2 is z.
Since this is all inside the same object, you don't have to concern yourself with incorporating object transforms in to the expression. If so please do what Arctor recommends and look at the origin() function to add to the above expressions.
Please see the Houdini help. Writing expressions in Houdini is not difficult at all. Just get in there and get your hands dirty. See the expression cookbook in the help. As well open the textport (alt-shift-t) and type in:
exhelp
to see all the expression functions.
Type:
exhelp point
to see the usage for the point expression.
Type:
exhelp centroid
to see the usage for the centroid expression.
Type:
exhelp -k center
to search (-k is option to pass in a key word) on a key word. In this case find all functions that have “center” in their help.
centroid(“../vopsop1”, D_X)
centroid(“../vopsop1”, D_Y)
centroid(“../vopsop1”, D_Z)
If you want a specific point in the geometry to be the target:
point(“../vopsop1”, 0, “P”, 0)
point(“../vopsop1”, 0, “P”, 1)
point(“../vopsop1”, 0, “P”, 2)
where “../vopsop1” is the path reference to your target SOP
0 is the specific point number in the target geometry you wish to querry
“P” is the Position data attribute to reference
The last value is the index in to the attribute. Since P position is a three float vector, 0 is x, 1 is y and 2 is z.
Since this is all inside the same object, you don't have to concern yourself with incorporating object transforms in to the expression. If so please do what Arctor recommends and look at the origin() function to add to the above expressions.
Please see the Houdini help. Writing expressions in Houdini is not difficult at all. Just get in there and get your hands dirty. See the expression cookbook in the help. As well open the textport (alt-shift-t) and type in:
exhelp
to see all the expression functions.
Type:
exhelp point
to see the usage for the point expression.
Type:
exhelp centroid
to see the usage for the centroid expression.
Type:
exhelp -k center
to search (-k is option to pass in a key word) on a key word. In this case find all functions that have “center” in their help.
There's at least one school like the old school!
- Soothsayer
- Member
- 862 posts
- Joined: Oct. 2008
- Offline
-
- Quick Links