Jump to content

RBD sim and orient

Recommended Posts

Hello guys.

Recently i have run into strange issue.

I have my packed objects, that have some orient on it.

I need to feed them into the Bullet sim, problem is that if i have orient as attribute on the packed objects, my sim explodes on first frame (no intersecting geo), if i remove my orient, sim behaves as expected.

so i have run my sim without the orient coming to bullet (renamed orient to keep_orient) and i thought i will just substranct+add them at the end to get correct orient values for my instancing i do as next step.

Problem i have is that i was not able to get correct orient from it.


Would someone able to explain me what would be necessary to do to make it work, or why bullet explodes with orient values?


sorry i cant share any scene at this point.


my whole setup is: points in the space, that have @pscale and @orient (random nodes), that goes into the grain sim, to make sure i have no intersections, then i do copy bunch of rocks onto those points which goes as packed geo into the bullet sim.




Share this post

Link to post
Share on other sites

Hi Martin, you may try to set the i@found_overlap point attribute to 1, to check if intersections are really not an issue? And/or try to check the Solve on creation frame on the RBD Packed Object DOP? Or try to lower the collision padding, or scale down those source points a bit?



Share this post

Link to post
Share on other sites

Or maybe increase substeps on the solver. Maybe also try to set the Bounce to zero, or add a POP Speed Limit to the third input of the Rigid Body Solver, and look for some crazy values in the @v or @impact attribute, to see where the problem occurs.

Share this post

Link to post
Share on other sites

i will try to do repro scene.

Its nothing in the bullet. As i mentioned without incoming origin (atrib delete) it does sim correctly.

There is also thing that if i try to instantiate my geo back onto the points, there is tinny bit of offset.

I assume there is something strange happening with pivot/orient, that is not properly translated down the line


Share this post

Link to post
Share on other sites

how sure you are that orient is properly built? Did you normalize values before creating quaternion? If you take points from sim and use transform pieces node, you can transfer initial orient and qmultiply it with dop orient to correct it..

inside pvop you can have qmultiply node or in vex qmultiply();

  • Like 1

Share this post

Link to post
Share on other sites

thank you "qmultiply" was the thingy i needed. In my lack of knowledge i was trying subtract/add etc. :)


or this wrangle.

as it turned out, Bullet is spitting something that has completely messed up values, and they need to be reconstructed with intrinsics



matrix m4 = primintrinsic(0,'packedfulltransform',@ptnum);
matrix3 m3 = matrix3(m4);
@orient = quaternion(m3);
@scale = cracktransform(0,0,2,0,m4);
v@pivot = primintrinsic(0,'pivot',@ptnum);

  • Like 2

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now