Jump to content

Data From Dop To Pop


iamjaideep80

Recommended Posts

Hi guys........

I am facing a problem in DOPs . I want to get RBD data from DOPS to POPs.

I don't want Geometry Information, but just translation and rotation information of each object in RBD.

Plz tell me how can i do it in Houdini 8.

Thanking in advance.......

.............Jaideep

Link to comment
Share on other sites

There is currently no dedicated POP for doing this. But you can easily extract the information using DOP expression functions. To get the location of a DOP RBD object, use the expression:

dopoptions("/obj/dopnet1", "rbdobj1", "Position", "tx")

The last parameter then just has to be changed to ty, and tz to get all the position information which can be used easily with a Position POP.

The rotation information is a little bit more tricky. The Rotation POP requires you to specify the rotation as an axis and angle of rotation. But rotation information can only be extracted from DOPs as a quaternion (using "orientx/y/z/w" in place of tx in the above expression) or a set of Euler angles (using "rx/y/z"). Fortunately the conversion of a quaternion to an angle/axis value is pretty easy.

angle = acos(orientw) * 2

axis = normalize(orientx, orienty, orientz)

The other trick is making sure there is an easy expression to map your particles to the DOP object they represent. If there is a one to one correspondence between particles an DOP Objects, you can just use "$PT" in the above expression in place of "rbdobj1" to identify the DOP object of interest.

Mark

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...