Jump to content

Issue with timeshift in for-loop "stamp" workflow


Farmfield

Recommended Posts

Setting this up as a copy stamp for someone in the Houdini Facebook group asking how to use a time shift on objects copied to particles, yesterday, but I also tried to set it up with a for loop and ran into this issue. Seems, due to how the iterations are counted, the setup "breaks" after particles starts to get killed off and the number of iterations gets "stuck", looping, or how to describe it...

I'm probably missing some obvious solution, but I'm kinda stuck - so posting it here for someone with a brain to figure it out. :blink::D 

 

copy.stamp.forloop.hiplc

Link to comment
Share on other sites

It is normal for the iteration number per particle to change, if you delete particles in the foreach.

Instead of referencing the iteration, try referencing the id attribute of the particle for the random generator.
In your example the rx becomes: @Frame * 5 + fit01(rand(point("../foreach_begin1/", 0, "id", 0) + 65), 0, 100)

Link to comment
Share on other sites

Aah, of course - as I said, I'm probably missing some obvious solution - I was completely into using the current iteration... :blink:

Much appreciated. 

Oh, and if this is the first thing you've written here in three years, I will take public credit for provokating that response. ;)

 

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...