Zero Posted June 22, 2010 Share Posted June 22, 2010 (edited) Hello there. I am learning Houdini, so please be gentle if I'm not too savvy. What I am trying to do is this: I want to attract a selection of RBD objects in my scene to a given point in space. I have tried doing so with a uniform force DOP, but I am suspecting that I am doing something wrong. Basically, I tried to calculate the vector from the current position of the RBD object being processed to the "goal" position (a geo object). To get the position of the currently calculated RBD object, I use pwd().simulation().findObject(str(lvar("OBJID"))).findSubData("Position").options().field("tx") in the force component of the uniform force DOP. But it seems to always evaluate to the position of the LAST object (which ironically is the floor). Basically, I would like to apply a different force to every RBD object in my group, and have that force point at the position of a given geometry node in my scene. I'm quite sure that I should NOT use the uniform force DOP, but I am a bit at a loss as to what I should be using. I think I'd know how to program this, but I don't know (yet) how to write my own DOP node. So, any advice, hints, or well meant comment is welcome. Edited June 22, 2010 by Zero Quote Link to comment Share on other sites More sharing options...
mawi Posted June 22, 2010 Share Posted June 22, 2010 Hello there. I am learning Houdini, so please be gentle if I'm not too savvy. What I am trying to do is this: I want to attract a selection of RBD objects in my scene to a given point in space. I have tried doing so with a uniform force DOP, but I am suspecting that I am doing something wrong. Basically, I tried to calculate the vector from the current position of the RBD object being processed to the "goal" position (a geo object). To get the position of the currently calculated RBD object, I use pwd().simulation().findObject(str(lvar("OBJID"))).findSubData("Position").options().field("tx") in the force component of the uniform force DOP. But it seems to always evaluate to the position of the LAST object (which ironically is the floor). Basically, I would like to apply a different force to every RBD object in my group, and have that force point at the position of a given geometry node in my scene. I'm quite sure that I should NOT use the uniform force DOP, but I am a bit at a loss as to what I should be using. I think I'd know how to program this, but I don't know (yet) how to write my own DOP node. So, any advice, hints, or well meant comment is welcome. You can use the force VOP to create a "goal force". Its not the fastest node thou. goalForce.hip Quote Link to comment Share on other sites More sharing options...
Zero Posted June 23, 2010 Author Share Posted June 23, 2010 You can use the force VOP to create a "goal force". Its not the fastest node thou. Great, that's exactly what I was looking for! Thank you so much for the .hip file. As an afterthought: you mention that this node is not the fastest, any hints on how speed could be improved? Would it be a matter of writing the VEX code by hand rather then using the subnet? Or maybe use Python or C++ instead, and create something like a custom DOP? 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.