Justin K Posted November 15, 2017 Share Posted November 15, 2017 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! )and asking for help . Sorry for the noob post. Thanks! Ive attached the project file. Procedural_Animation_v003.hipnc Quote Link to comment Share on other sites More sharing options...
Noobini Posted November 15, 2017 Share Posted November 15, 2017 I'm no expert..but here's what I did to your file...is that the desired result ? Procedural_Animation_v003_mod.hipnc Quote Link to comment Share on other sites More sharing options...
Justin K Posted November 15, 2017 Author Share Posted November 15, 2017 (edited) 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 November 15, 2017 by JKeil Quote Link to comment Share on other sites More sharing options...
Noobini Posted November 15, 2017 Share Posted November 15, 2017 (edited) 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 November 15, 2017 by Noobini Quote Link to comment Share on other sites More sharing options...
Justin K Posted November 15, 2017 Author Share Posted November 15, 2017 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.