Jump to content

For Loop Versus Copy Sop?


Justin K

Recommended Posts

Hello all, 

Im trying to replace the copy sop with the for loop in a project file (see attached).  I've been building it while following some training from an older tutorial.  Honestly, I am getting pretty frustrated with my inability to understand how to make a For Loop iterate through points over time-it pretty much indicates how little I understand about how Houdini processes data.  

Any pointers on this?

Also, anybody willing to show me a few things for this in an attribute wrangle rather than a for loop would be amazing--Ive been REALLY trying to learn this software, and I feel like every time I start making progress, I hit some seemingly simple pothole of a problem, and inevitably can't get passed it.  Like this one, I tried to figure this out myself for a while, now I'm all but giving up (until tomorrow of course! :D)and asking for help :(.

Sorry for the noob post.  

Thanks!

Ive attached the project file.  

Procedural_Animation_v003.hipnc

Link to comment
Share on other sites

11 minutes ago, Noobini said:

I'm no expert..but here's what I did to your file...is that the desired result ?

Procedural_Animation_v003_mod.hipnc

That is!  Thank you very much.  Its the second time ive seen a meta import node used within a loop.  If you dont mind me asking a couple questions?    So you created a meta import node, which is linked to the timeshift sop-utilizing the detail variable iteration.  Did you have to create this iteration variable or is it generated by default with the meta data node, along with numeriterations, value and ivalue?  

Also,  your expression, i can see it is  subtracting the iteration number from the frame number, how come this now has the ability to force the points to populate over time?  Does it have something to do with the spare input0.  Regardless Ill try to decode this.  Thanks for the help!

Edited by JKeil
Link to comment
Share on other sites

it's all auto...so if you click on the iter node, you'll see in the label Detail Attributes: (yeah a bit to the right) the 4 attrs there...one of them is 'iteration'...which really is a loop counter. This would be equivalent to your @PT in the copystamp SOP

I renamed the longwinded name ....blah blah to 'iter' so in my timeshift, down the bottom, the spare input I just have to type in iter rather than the longwinded name

But I think you were close tho, just that you had copy then timeshift when it should be timeshift THEN copy

EDIT: ahhh...scratch that..just fooled around swapping timeshift after copy...works fine either way...

(just ensure the iter node Method is Fetch Metadata...ie. we want to access those 4 attrs)

For the second part of your question...isn't this just the same as the logic in the copystamp SOP ? so each point gets populated with a growing A...but if the point ID (iteration) is say 50 then even tho it's got a copy there...it's time hasn't reach 'birth' yet until 50...then it starts growing....I gues if you start your A at say 25% scale...you would see it sitting ready and waiting to grow...? dunno test it out...

Edited by Noobini
Link to comment
Share on other sites

11 hours ago, Noobini said:

it's all auto...so if you click on the iter node, you'll see in the label Detail Attributes: (yeah a bit to the right) the 4 attrs there...one of them is 'iteration'...which really is a loop counter. This would be equivalent to your @PT in the copystamp SOP

I renamed the longwinded name ....blah blah to 'iter' so in my timeshift, down the bottom, the spare input I just have to type in iter rather than the longwinded name

But I think you were close tho, just that you had copy then timeshift when it should be timeshift THEN copy

EDIT: ahhh...scratch that..just fooled around swapping timeshift after copy...works fine either way...

(just ensure the iter node Method is Fetch Metadata...ie. we want to access those 4 attrs)

For the second part of your question...isn't this just the same as the logic in the copystamp SOP ? so each point gets populated with a growing A...but if the point ID (iteration) is say 50 then even tho it's got a copy there...it's time hasn't reach 'birth' yet until 50...then it starts growing....I gues if you start your A at say 25% scale...you would see it sitting ready and waiting to grow...? dunno test it out...

Thanks Again, appreciate all the help.  

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