Jump to content

RBD sim / copy to points discrepancy


paulchambers3d

Recommended Posts

Hi folks, long time lurker, first time poster so apologies if this is a newbie question.

I'm running a simple RBD sim and from there swapping in geometry using a DOP import and then copy to points. For the purpose of testing I'm copying on identical geometry to the sim. You can see that the blue guide geometry from the sim is (presumably) a sub-step or two ahead or behind of the copy to points (gray).

How do I remove this discrepancy so that the copy-to geometry exactly matches rotation of the sim?

And please note, yes I am aware of other methods for swapping in high-resolution geometry to sims etc. There's a specific reason why I want to swap in objects.

Your help is appreciated!

 

 

Capture.PNG

Link to comment
Share on other sites

The reason this could be happening is likely dependent on how you're setting up your geometry pre-simulation. If the geometry is copied and transformed before being assembled and packed, for example, what constitutes "up" and "forward" for a given box might not be what would visually be "up" and "forward" for that box. 

What I've found to be the most consistent solution is to get the packed primitive intrinsic attributes that define the transform, and use those to create / overwrite any template point attributes on the RBD points. You can do this in a Point Wrangle:

matrix3 xf = primintrinsic(0, "transform", @ptnum);
3@xform = xf;

vector pivot = primintrinsic(0, "pivot", @ptnum);
v@pivot = pivot;

Then try copying the final geometry to those points.

  • Like 1
Link to comment
Share on other sites

Thanks Henry, appreciate your help. I am using a particle system upstream to generate the initial points, so the scenario you describe sounds right.

Unfortunately though the wrangle didn't help. I've also tried using a Transform Pieces SOP to apply to the points and I'm getting the same results.

I wonder if this is a bug.

Link to comment
Share on other sites

Many thanks. I've attached the file. I was originally calling in external geometry but I've changed the objects to simple spheres and cubes. The API subnetwork is where the discrepancy is occurring where objects are copied to simmed points and are expected to have matching orientation.

Really appreciate any insight you have.

TEST.hip

Link to comment
Share on other sites

I actually think I found the issue in my POP network. On my initial copy to points within the POP - I had "Transform using Point Orientations" checked. This attached the initial boxes and spheres to the particle emitter. Un-checking this solved the discrepancy. 

Doh! Really appreciate your offer to help on this one.

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