Dear Forum.
I need to make a trace through a primitive surface. I want to start at one point on the surface and then for each step make a decision to which of the connected neighbors to move to next. For decision I have a certain algorithm.
The problem is that I need this to happen instantly on each frame and I have a hard time figuring out how to use a ForEach or a VOP SOP to achieve this.
The problem right now is that I can't think of a way to store “global” (not in Houdini terminology) variable stating which point to process next. Say after the first iteration I'm at point “12”, next time it evaluates the loop I want to start from point “32” which was the point I moved to from point “12”. How can I using a ForEach or VOP SOP store a value within the iteration which is then accessible to the next iteration or execution.
If doing this in processing or other pure programming environment is rather easy. I reckon the ForEach abstraction can sometime make it tricky. I still don't get the what the Each node does. Maybe someone has some good reference. Explanation?
Thanks you.
ForEach Global Variable
2271 3 1-
- aeaeaeae
- Member
- 140 posts
- Joined: Aug. 2010
- Online
-
- Sadjad Rabiee
- Member
- 1391 posts
- Joined: Dec. 2010
- Offline
-
- Sadjad Rabiee
- Member
- 1391 posts
- Joined: Dec. 2010
- Offline
Check this Topic too ,Maybe can help you :
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=30559 [sidefx.com]
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=30559 [sidefx.com]
-
- edward
- Member
- 8071 posts
- Joined: July 2005
- Offline
smuseus
The problem right now is that I can't think of a way to store “global” (not in Houdini terminology) variable stating which point to process next.
The most straight forward way off the top of my head is to create a “detail” class attribute and store your information in it. You can then retrieve it via the detail() (or details()) expression.
-
- Quick Links