Raymond Chua Posted May 15, 2009 Share Posted May 15, 2009 Hi guys, Another new issue here. I have this concept and I need to make it work in Houdini, so maybe somebody can give me some pointers. I have an animated null, a particle instanced with a box in the scene. when the null move to a certain distance within the box, the box gets attracted and move to the position of the null. So the concept in programming would be like: distance between null.tx & particle1.tx = distTX if (distTX < 10), { particle1.tx move to null.tx } How do I set this up in Houdini? i have not done much scripting in H before but I have done mel and python in maya. Thanks for any help in advance. cheers, Ray Quote Link to comment Share on other sites More sharing options...
Ezz Posted May 15, 2009 Share Posted May 15, 2009 hey Ray. You can create an attribute on your particles that calculate the distance of your particles to the null. You can use the expression: distance(float1a,float2a,float3a,float1b,float2b,float3b) a is the particles xyz-position and b is the nulls position. then you can put all the particles that have a greater distance of 10 into a group. http://www.sidefx.com/index.php?option=com...&Itemid=305 check theese tutorials out and you will have good understanding of how expression works in Houdini. Hope it helped a bit. Erik duckling Quote Link to comment Share on other sites More sharing options...
Raymond Chua Posted May 15, 2009 Author Share Posted May 15, 2009 hey Ray.You can create an attribute on your particles that calculate the distance of your particles to the null. You can use the expression: distance(float1a,float2a,float3a,float1b,float2b,float3b) a is the particles xyz-position and b is the nulls position. then you can put all the particles that have a greater distance of 10 into a group. http://www.sidefx.com/index.php?option=com...&Itemid=305 check theese tutorials out and you will have good understanding of how expression works in Houdini. Hope it helped a bit. Erik duckling Thanks alot! They helped! regards, -Ray 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.