Jump to content
JKeil

For Loop Versus Copy Sop?

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×