PhasmaCeritus Posted December 11, 2009 Share Posted December 11, 2009 Hi, I am totally new in Houdini, hscript and python. My basic question is how do I run a FOR or WHILE cycle in Houdini? For example we have a geometry on witch I want to apply a brake SOP for 10 times, each time feeding my brake SOP with a different seed... Please let me know how could I do that. Thanks Quote Link to comment Share on other sites More sharing options...
graham Posted December 11, 2009 Share Posted December 11, 2009 ForEach sop? Also, the Shatter sop already does what you want to do. Quote Link to comment Share on other sites More sharing options...
PhasmaCeritus Posted December 13, 2009 Author Share Posted December 13, 2009 ForEach sop? Also, the Shatter sop already does what you want to do. Hi, thanks for response. I am familiar with ForEach and Shatter, however I couldn't figure how to brake a geometry like I have in my example01.hip left branch is what shatter does, and right one is what I need. So once again the only way I see of how that could be done is not with ForEach sop but with FOR or WHILE loop. Maybe that is not the best example to illustrate FOR an WHILE loops but I can't imagine scripting without programing basics... Thanks again example01.hip Quote Link to comment Share on other sites More sharing options...
graham Posted December 13, 2009 Share Posted December 13, 2009 To do the sort of 2d straight type thing you are trying to do the Break/Shatter probably aren't what you want then. I'd suggest just using a Clip SOP that is randomized inside a ForEach using Each Number to get the number of cuts you want. This gives you the for loop type effect. Unfortunately there really isn't a while type effect you can get in SOPs. clip_break.hipnc Quote Link to comment Share on other sites More sharing options...
PhasmaCeritus Posted December 13, 2009 Author Share Posted December 13, 2009 To do the sort of 2d straight type thing you are trying to do the Break/Shatter probably aren't what you want then. I'd suggest just using a Clip SOP that is randomized inside a ForEach using Each Number to get the number of cuts you want. This gives you the for loop type effect. Unfortunately there really isn't a while type effect you can get in SOPs. thanks that helps a lot 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.