Force Certain VOP Nodes to be Inside For Loop

   2955   3   1
User Avatar
Member
271 posts
Joined: March 2012
Offline
Hi all,
I'm attempting to write a shader and within this I need to loop over some process. However, I cannot find a way with the for_begin & end_for blocks to include some of the nodes inside the loop. If I activate the ‘enclose inputs’ option of the end_for it encloses everything connecteded which is inefficient.

I've attached a scene, and in the vopmaterial you should see what I'm getting at. The yellow nodes should be inside the loop, the red ones should be outside.

Attachments:
forloop.hipnc (66.6 KB)

User Avatar
Member
53 posts
Joined: June 2009
Offline
I think you should wire the output from your add1 node to the next_in input of your for_begin1 node

User Avatar
Member
271 posts
Joined: March 2012
Offline
bebe
I think you should wire the output from your add1 node to the next_in input of your for_begin1 node


That does not seem to work (see attached image).
Edited by Anti-Distinctlyminty - Aug. 12, 2016 09:16:36

Attachments:
ForLoop.png (50.0 KB)

User Avatar
Member
271 posts
Joined: March 2012
Offline
Ah, I have it now (and it's sort of obvious now I think about it). Values from outside the loop that you want inside you must plug into the for_begin and use their corresponding outputs. Doing this and applying the ‘enclose inputs’ checkbox also placed the grandom inside the loop, which is what I was after as this function produces a random vector every time it is called.

Thanks bebe.
  • Quick Links