Jump to content

This is driving me nuts! RBD and Lights


Ponge

Recommended Posts

Okay, I'm sure this should be an easy one to answer but it's currently driving me nuts.

I have a very simple RBD simulation of a cube hitting a static 'mountain' surface. I'd like to attach a spotlight to this cube so that it follows the RBD simulation, rotating around when the cube rotates.

Now I've tried using the DopImport SOP as a path inside the light and this works a little bit, but when the cube starts to rotate the light sometimes 'jumps' around. There must be an easier way of doing this right?

I've attached my simple scene, obviously my actual scene is a lot more complicated, but if I can get it to work on this scene then hopefully I can transfer the fundamentals over to my master scene.

Thanks guys.

RBDHelpexample.hipnc

Link to comment
Share on other sites

I actually through this together this morning before I saw this thread as a test for some class stuff.

I solved this problem by writing a custom Python Object that extracts all the transforms from a single DOP Object and provides them at the object level. It grabs the dop transforms, as well as the transforms from the object level if Use Object Transform is enabled. It works similar to the DOP Import in that you have to point it to dopnet and give it an object id. The select button allows you to interactively select what object you want and it will fill the parms in automatically for you.

I also attached an example file with a light parented like you are going for.

rdb_transforms.hipnc

obj_dop_fetch.otl

Link to comment
Share on other sites

You sir, are a gentleman and a scholar! That worked a treat :)

I had another question if you don't mind me asking...

I would like to take that RBD Cube in the earlier example and take the simulation information and somehow transform it into keyframes (maybe 1 keyframe every 10 frames) so that I can scope the information and play with rotation values etc. Is there a method do doing this?

Thanks again,

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