Generative modeling of wobbly sticks: workflow challenge
5612 6 0- anna_waldon
- Member
- 52 posts
- Joined: 3月 2008
- Offline
Please have a look at the attached image. I have quickly put this together in Grasshopper (a Rhino plugin). I now would like to repeat the process in Houdini but not sure about the best way to go about it.
Here is the step-by-step process:
1. Create a point at the world origin (E).
2. Create a set of lines (B) originating from this point. Their radial spread, and lengths are random within adjustable ranges. The ranges are similarly adjustable for all other randomised values.
3. Pick random points on these lines (C).
4. Create another point (D) offset vertically relative to E.
5. Draw lines of random lengths through from points C along vectors beginning at D and going through C.
6. Randomize the locations of points A.
7. Create tubes around the lines.
Thank you for the suggestions.
Here is the step-by-step process:
1. Create a point at the world origin (E).
2. Create a set of lines (B) originating from this point. Their radial spread, and lengths are random within adjustable ranges. The ranges are similarly adjustable for all other randomised values.
3. Pick random points on these lines (C).
4. Create another point (D) offset vertically relative to E.
5. Draw lines of random lengths through from points C along vectors beginning at D and going through C.
6. Randomize the locations of points A.
7. Create tubes around the lines.
Thank you for the suggestions.
- pclaes
- Member
- 257 posts
- Joined: 11月 2007
- Offline
In the attached file I've included two ways to go about it.
A simple way with little control, but fast proof of concept and a more elaborate way with vopsops with a lot more control.
EDIT: oops, didn't see point (D) - lets see if I can put that in.
A simple way with little control, but fast proof of concept and a more elaborate way with vopsops with a lot more control.
EDIT: oops, didn't see point (D) - lets see if I can put that in.
Cg Supervisor | Effects Supervisor | Expert Technical Artist at Infinity Ward
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
- pclaes
- Member
- 257 posts
- Joined: 11月 2007
- Offline
slight modification to take (D) into account.
Cg Supervisor | Effects Supervisor | Expert Technical Artist at Infinity Ward
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
- anna_waldon
- Member
- 52 posts
- Joined: 3月 2008
- Offline
Thank you very much!
To be honest, this looks considerably more complex than I expected (and then what I had to do to build my equivalent). I cannot understand it without further digging, especially within the VOP SOPs. Just the thing to do during the break. Shall try and go through it. I wonder if you could be tempted to add some further comments to them.
The first point of difference is the distribution of the lines at the very beginning. I my Grasshopper setup I create one line from the origin and then rotate its copies. This allows me to fill only a portion of the circle and vary the distribution along its circumference. Scatter is not controllable in the same way. I was trying to do it via copy stamping in Houdini but got stuck with what variable to use for randomization as $PT and $F do not vary in this case…
I also notice that if displace origin is set to, say, -10 - the lines incline towards the center pas the vertical, which seems wrong.
Again: thank you.
To be honest, this looks considerably more complex than I expected (and then what I had to do to build my equivalent). I cannot understand it without further digging, especially within the VOP SOPs. Just the thing to do during the break. Shall try and go through it. I wonder if you could be tempted to add some further comments to them.
The first point of difference is the distribution of the lines at the very beginning. I my Grasshopper setup I create one line from the origin and then rotate its copies. This allows me to fill only a portion of the circle and vary the distribution along its circumference. Scatter is not controllable in the same way. I was trying to do it via copy stamping in Houdini but got stuck with what variable to use for randomization as $PT and $F do not vary in this case…
I also notice that if displace origin is set to, say, -10 - the lines incline towards the center pas the vertical, which seems wrong.
Again: thank you.
- rdg
- Member
- 401 posts
- Joined:
- Offline
- anna_waldon
- Member
- 52 posts
- Joined: 3月 2008
- Offline
$CY works nicely. I shall go and make another effort at finding a list of those in the docs.
EDIT: So, I have created a line, rotated it using a Transform node, randomised rotation and length using Copy node and stamping. Now I am trying to find the mid spon point in a similar way it is done in the define_mid_spawn_point VOP SOP in the example above. But how can I get to the relevant points please (i.e. I need to use the ends of the lines)?
See attached.
This is a general question too: what are the procedures to operate on lists and lists of lists in Houdini. I see the Sort node but how do I cull a portion of the list, append to it or choose a desired point/primitive on a basis of a pattern? Say, in the case of the output provided by my Copy node.
Thank you.
EDIT: So, I have created a line, rotated it using a Transform node, randomised rotation and length using Copy node and stamping. Now I am trying to find the mid spon point in a similar way it is done in the define_mid_spawn_point VOP SOP in the example above. But how can I get to the relevant points please (i.e. I need to use the ends of the lines)?
See attached.
This is a general question too: what are the procedures to operate on lists and lists of lists in Houdini. I see the Sort node but how do I cull a portion of the list, append to it or choose a desired point/primitive on a basis of a pattern? Say, in the case of the output provided by my Copy node.
Thank you.
- pclaes
- Member
- 257 posts
- Joined: 11月 2007
- Offline
I've simplified the setup to the bare minimum with only the core functionality in there. Also some more notes on the various operations.
Some of this comes down to data management and really knowing your attributes and nodes a bit in depth. Specifically vector data vs float and what happens when that data goes through a transform or copy sop. Vector data will get modified, float will not.
With the carve sop you can extract points from a line, but it can be an expensive operation when dealing with a large number of primitives.
The other file had some more fancy controls such as that rotation in it. You could take some of the vopsops from this attached file and integrate it in the previous file or the other way around.
The reason why I use vopsops is for speed. When you are not generating or destroying geometry, but simply modifying data, vopsops can multithread and be very fast - even on large datasets.
In the file you will see that the carve sop, delete sop and add sop are the operators used to generate and destroy geometry. Everything else can be done with vops.
This file has different ways of solving the same task, both in sops as in vops. I hope by showing both you will understand the similarities and the limitations.
Vopsops take a while to get used to, but they can speed up your scenes significantly - I would recommend to try and put both files together and understand the vopsops by rebuilding them yourself. The scatter in the other file could just as well be replaced by the “carved end points” coming from this file. (You can also perform the rotation and translation of those points entirely in vops, and generate the lines afterwards. - This would be faster than the copy sop as stamping is expensive.)
working with a list of lists generally happens by using the point number as an index to import attributes in a vopsop.
You can sort or group points and make subsets by branching them off, performing an operation on them and merging them back in with the original stream. Either you perform the operation on an individual group, or you delete everything not in the group. Or you delete by expression/attribute/pattern…
Good luck!
Some of this comes down to data management and really knowing your attributes and nodes a bit in depth. Specifically vector data vs float and what happens when that data goes through a transform or copy sop. Vector data will get modified, float will not.
With the carve sop you can extract points from a line, but it can be an expensive operation when dealing with a large number of primitives.
The other file had some more fancy controls such as that rotation in it. You could take some of the vopsops from this attached file and integrate it in the previous file or the other way around.
The reason why I use vopsops is for speed. When you are not generating or destroying geometry, but simply modifying data, vopsops can multithread and be very fast - even on large datasets.
In the file you will see that the carve sop, delete sop and add sop are the operators used to generate and destroy geometry. Everything else can be done with vops.
This file has different ways of solving the same task, both in sops as in vops. I hope by showing both you will understand the similarities and the limitations.
Vopsops take a while to get used to, but they can speed up your scenes significantly - I would recommend to try and put both files together and understand the vopsops by rebuilding them yourself. The scatter in the other file could just as well be replaced by the “carved end points” coming from this file. (You can also perform the rotation and translation of those points entirely in vops, and generate the lines afterwards. - This would be faster than the copy sop as stamping is expensive.)
working with a list of lists generally happens by using the point number as an index to import attributes in a vopsop.
You can sort or group points and make subsets by branching them off, performing an operation on them and merging them back in with the original stream. Either you perform the operation on an individual group, or you delete everything not in the group. Or you delete by expression/attribute/pattern…
Good luck!
Cg Supervisor | Effects Supervisor | Expert Technical Artist at Infinity Ward
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
-
- Quick Links