Jump to content

RBD sim and orient


martinkindl83

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.

 

 

 

Link to comment
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?

https://www.sidefx.com/docs/houdini/nodes/dop/rbdpackedobject.html

image.png.675e819078298d30767323a1e05435f7.png

Link to comment
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.

Link to comment
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

 

Link to comment
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
Link to comment
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

FROM:

http://www.tokeru.com/cgwiki/index.php?title=HoudiniDops#RBD_extract_correct_transform_attributes

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
Link to comment
Share on other sites

  • 1 year later...

try to uncheck "rbdpackedobject>inherit pivot from point position". This is because in Houdini, the priority of transform is scale, rotate, translate. If this option is check on, it sets pivot as initial position of template points, so it calculate rotation first by @orient and then translate second. Simply test with transform node. translate -> (1,2,3)  rotate -> (10,20,30) with pivot (0,0,0) and with pivot (10,20,30)

Link to comment
Share on other sites

  • 9 months later...

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