Graham Hutchings Posted March 1, 2018 Share Posted March 1, 2018 I'm a Houdini Newbie and my first post here. I'm following a tutorial on Pop Grains which is very good. Tutorial is here : https://vimeo.com/132847114 [vimeo.com] TimeCode : 37:20 Towards the end he adds a proximity point and calculates 1000 grains to fall every frame based on the distance to the point. The expression used on the force node is : force*=@id <(@Frame *1000); I've been trying to get 50 grains to fall per frame until it reaches frame 50. At 50 frames and above I would like 1000 grains to start to fall per frame. Is this possible with expressions ? Thanks Quote Link to comment Share on other sites More sharing options...
Nache Posted March 1, 2018 Share Posted March 1, 2018 Hello, I'm not very familiar with this type of code but if you replace the "1000" with a variable that change after f.50, I think i'll do the trick. float nb = 50; if(@Frame > 50) { nb = 1000; } force *= @id < (@Frame * nb); Also, if someone could take the time to explain me this type of code I would be glad to know a bit more about it! Gabriel Quote Link to comment Share on other sites More sharing options...
Graham Hutchings Posted March 1, 2018 Author Share Posted March 1, 2018 Awesome thanks Nache for taking the time , works great ! Quote Link to comment Share on other sites More sharing options...
Gorrod Posted March 2, 2018 Share Posted March 2, 2018 Alternativly, if you want to continue the "boolean" multiplication approach, you could also write something like this: force *= @id < (@Frame-50)*1000 || @id < @Frame*50; @Nache Boolean expressions in Houdini return 0 for false and 1 for true, just what you did in the if statement. So the force just gets multiplied by the result of the expression. 1 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.