Rotation missing in Rigid Vertex Animation, and how to keyframe RBD Packed objects

   598   3   1
User Avatar
Member
29 posts
Joined: June 2017
Offline
I'm trying to do a rigid body simulation and then modify the animation with a Point VOP. For this example, I'm shattering a cube, then using a Point VOP to lerp it back to it's original transform. Unfortunately, when I export this as a Vertex Animation using the Game Development Tools, the rotation texture comes out all gray, and the pieces don't rotate. If I export the sim itself without any modifications, it works fine.

I've attached a hip file of my experiment. I assumed I could drive the RBD Packed pieces using the modified point locations from the sim. Am I doing something wrong? Is there a better way to do this?

Alternately, I would love to find a way to add keyframes individual simulated chunks. I tried to follow this tutorial, but I couldn't find a way to animate the RBD packed pieces individually:
http://www.sidefx.com/docs/houdini/dyno/keyframe.html [www.sidefx.com]

Is there documentation somewhere on how to do this with RBD packed objects?
I'm using Houdini 16.0.633, and I have the latest Game Development Tools as of today.

Thanks again,
BK
Edited by bkohrman - May 9, 2018 18:23:18

Attachments:
PointVOPOverRBDPackedSim.mp4 (1.1 MB)
PointVOPOverRBDPackSim_01.hip (1.8 MB)

User Avatar
Staff
109 posts
Joined: May 2017
Offline
You're starting to delve into intrinsic transform land so I'll give a brief primer just in case. A packed prim's transforms are stored as intrinsic primitive attributes. The ones we care about are pivot and transform because you can change those. The others are immutable. You can also see the changes to those values through the point attributes P, pivot and orient. And you can change the point attributes which will update the intrinsic attributes. It can get a little confusing sometimes because changing one, changes the other.

So, the vertex animation texture tool is looking at the point attributes. The transform pieces node effects the intrinsic transforms but zeros out the orient attribute. Turn on Copy Template Attributes and add orient to pass that attribute through. That should get it working with the VAT exporter.

There are a number of ways to animate individual pieces. If you just want to do it by hand. You can put down a transform sop after your object_merge1 and manually translate and rotate a single piece by setting the group parm to the number of the packed prim you want to effect. The transform sop will update the intrinsic transforms as well as the orient attribute so it should work with exporting to a texture.

Mike
User Avatar
Member
29 posts
Joined: June 2017
Offline
Thanks for this info, Mike! Your solution for the Point VOP animation worked perfectly. I've attached a .hip file of the working version in case anyone wants to see it.

For anyone else reading this thread- the fact that the orient attribute is immutable explains a lot. For example, I could not get changes on orient to show up on my Point VOP node, even though the attribute had correct values in the Geometry Spreadsheet. But, the if I used the output from the animation DID show up correctly if I used the output from the Point VOP to transform the original pieces. Setting my Transform Pieces node to copy the orient attribute made it export correctly using the Vertex Animation Tool. It worked great in UE4.

I will try to get keyframing by hand working next.

Attachments:
PointVOPOverRBDPackSim_02.hip (1.8 MB)

User Avatar
Member
29 posts
Joined: June 2017
Offline
OK, I've tried setting up some keyframe anims using the method you describe. It did work, but I ran into a couple problems.

First, when I rotate a piece, it rotates around the origin instead of around its centroid. I assume this has something to do with the difference between rotation and the orient attribute. I tried using a Point Wrangle that set the orient values numerically, but this was really difficult to get a good result with. Is there a more graceful way of animating rotation on individual rbd packed chunks?

Second, when I translated the objects, I had to enter values numerically in the transform. I couldn't get a transform handle to show up at all. This made it pretty difficult to hand animate the objects. I was able to get the look I needed doing it this way, though, so I could live with this method if necessary. Is there a way to get the transform handle showing up when animating these rbd chunks?

I've attached my current results.

Attachments:
KeyframeRBDPackSim_02.hip (1.8 MB)
KeyframeRBDPackSim.mp4 (1.1 MB)

  • Quick Links