For each Fetch and Merge processed pieces

   2227   8   2
User Avatar
Member
33 posts
Joined: 11月 2019
Offline
Hi,

I am stuck here with for each loop. I want to process each prim in a way that I take a prim, process it, then fetch it again to use it in the next process with next prim.

Thanks

Attachments:
Loop Issue.PNG (23.2 KB)

User Avatar
Member
899 posts
Joined: 2月 2016
Offline
Hello have a look at the attached file.
Don't have time to explain now, but if anything isn't clear just ask.
Cheers.


I believe that there is a more efficient way to do it, as I don't really fancy blast, split and merge nodes.
Hopefully somebody can improve it.

Attachments:
feedback-loop-with-prim_extraction.hiplc (115.0 KB)
feedback-loop-with-prim_extraction.JPG (81.8 KB)

User Avatar
Member
33 posts
Joined: 11月 2019
Offline
Thanks for sharing this. I will check. It looks promising.
User Avatar
Member
33 posts
Joined: 11月 2019
Offline
Hi

I have tested your hip file seems missing one crucial thing, which is to stack previous processed iterations and then I select one from them.

Attachments:
StackPrim.jpg (142.3 KB)

User Avatar
Member
899 posts
Joined: 2月 2016
Offline
oh right.
There was also another issue I think. The blast node was dumbly selecting the previous primitive based on its primnum, which is shuffled everytime you split and merge back.

I corrected it by doing the selection based on the static index attribute (which doesn't vary).
Also as last node after the loop, you might want a sort node to restore to original primitive order, based on the stored index attrib.

Have a look at the file
cheers
Edited by Andr - 2022年8月31日 04:21:33

Attachments:
v2_feedback-loop-with-prim_extraction.hiplc (116.2 KB)

User Avatar
Member
33 posts
Joined: 11月 2019
Offline
I appreciate your response and hip. I will check it, thanks.
thanks
User Avatar
Member
33 posts
Joined: 11月 2019
Offline
Thanks Andr for your help. Actually, I have reproduced your network to fit me need and all works as intended except one thing that is prim duplicates. Now the iterations are 30 but prims 465.

I tried to group initial prims and blast at the end of the network but did not work for me scince I find it hard to debug fetch feedback method in block begin.

I hope someone can help me.
Edited by seeplus - 2022年9月18日 03:15:04

Attachments:
Repitition_issue.png (454.9 KB)

User Avatar
Member
899 posts
Joined: 2月 2016
Offline
could you explain what's the goal and what operation you need to perform in the loop?

I see the merge2 node is actually merging the same primitive, duplicating it de facto.
User Avatar
Member
33 posts
Joined: 11月 2019
Offline
I want to achieve one direction for unitized uvs . I want to rotate all uvs to follow the initial uv's coordinates. I managed to get it done by the workflow in the hip. I am sure there will be more efficient ways though.

I want to get current prim (A)in the second iteration as there is none in the first iteration, then and search for a neighbour from previous iteration. I get one from the array and isolate the new prim (B) with selected primdo the process ** and here comes the crusial part to only pass Prim (A) and delete prim (B)to use it in the next iteration.

I hope I am clear.

Thanks
  • Quick Links