Jump to content

For-loop with Multiple inputs blast by iteration issue


frank_13847

Recommended Posts

Hello dear fellas,

I'm currently studying Anastasia Opara's Procedural Lake Houses (wonderful, but a little bit outdated since it still makes use of for loop subnets) and I'm reporting a "weird behaviour" when using for-loops along with the iteration detail attribute that comes from metadata..

While trying to "update" Anastasia's workflow to houdini 18, I wanted to use the iteration number coming from metadata to blast everything but the correspondent "piece" number, which unexpectedly keeps piece 0 at every iteration and not piece=iteration. I'm using a second block begin fetching in some primitives (I've already tried fetching pieces but it gives an error since block end isn't set to "pieces" but "feedback").

I'm sure it will make more sense from images and my hip file, I've already tried the documentation and a lot of other topics here on odforce but I couldn't figure out what i'm missing. Is there anyone who could find what I'm missing? It would be of great help! Thank you in advance5fb3bd866eb04_Screenshot(183).thumb.png.ae5f37f8a96c972b6fd3ce11a1a2fa0c.png

Cheers

Frank

for_loop_issue.hip

Screenshot (184).png

Screenshot (182).png

Screenshot (181).png

Screenshot (180).png

Link to comment
Share on other sites

15 minutes ago, Librarian said:

@frank_13847 If you Have Time to just Copy Paste to Translate Google Here you can Find Solution :wub:
 

Thank you Tesan for your suggestion but the author of that page seems to only bypass the parts of the workflow he couldnt "update", one of which is the one in this topic. More than this specific case, I wanted to make a more general question about multiple blockbegin nodes in a for loop and the issue about blasting by iteration. Still, very much appreciated!!!!  

Link to comment
Share on other sites

Thank you again for reaching out Tesan, in the end the solution, AS EXPECTED, was terribly straightforward:

a- correctly spelling in the blast node: @id=`detail("../metadata","iteration",0)` (i was missing the back ticks, stupid me, so the blast node wasn't reading it properly);

b- adding a second block begin (if you lay down a for each number preset, you'll get it right away) and set it to fetch input and make it stream down to block end of your loop, and then attach the blast node from a-, so that it keeps the correspondent piece/iteration only, so now you can reference it to whatever you want to do in your "main" stream of the loop.

I'm just writing it down so that anybody in the future will solve the problem, still, thank you for you effort!!!!

Best wishes!

Screenshot (185).png

Screenshot (186).png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...