Jump to content

Help needed in getting this to work in houdini?


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...