I've been trying to do some String Art [en.wikipedia.org] in Houdini.
The patterns are fairly easy to achieve with disjointed segments that can then be fused into a single guideline for further operations, i.e. to make it a thread with some thickness. However, some parameters value create one or more overlapping pattern - see attached scene that has many pentagons on top of one another.
A human would avoid that easily, i.e. skipping to the next nail that hasn't received a thread or skipping to a nail that is connected by fewer threads than the previous nails.
In a detail wrangle I tried to write an attribute to each point the thread was visiting, so that eventually I could skip points that had been visited already. This doesn't seem to be possible as the attribute written within the wrangle on a point doesn't seem to become immediately available, instead, only the next node sees it. It appears the wrangle makes a read-only copy of the input geometry and the attributes are written on the write-only output geometry.
Can somebody confirm my understanding and suggest a solution?
Understanding Wrangles Execution
848 2 0- manu3d
- Member
- 39 posts
- Joined: 12月 2018
- Offline
- animatrix_
- Member
- 4512 posts
- Joined: 2月 2012
- Offline
If you want to do this in a detail wrangle, you have to create an array and store the visited states there so you can read and write to them in the same code.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
- manu3d
- Member
- 39 posts
- Joined: 12月 2018
- Offline
-
- Quick Links