Jump to content
Sign in to follow this  
berniebernie

process on unpacking point primitives after a RBD sim ?

Recommended Posts

Hello

I'm doing a RBD (bullet) sim with custom concave geo (proxies) that I pack my self using assemble. I use a scatter and copy to points to set up my inital state, run the sim.

 

I use a dopimport, and I would like to fetch the hi rez geo. Tutorials show that if I had the high rez geo scattered the same way I could plug it and it would work straight away. However I would like, with only my points, to retrieve the high rez geo.

 

I thought I would use a foreach and apply primintrinsics or transformpieces or even a copytopoints as seen in some tutorials like here but nothign works, my scales and pivots don't seem to work.


 

zNrBihL.gif

 

To give you an idea of what my network looks like before the dopnet:


48bLam5.png

I cross posted on Sidefx forums but it wasn't published sorry for the crosspost.

If you have any info on this I'm very interested.

Share this post


Link to post
Share on other sites

On your dopnet, are u using create points to represent pieces? Provided that the names of the pieces are the same, u should be able to use a transform pieces to replace the low res with high res geo.

Share this post


Link to post
Share on other sites

I only have 3 hirez objects (that were never scattered, only their low rez representation was), so when I feed it to the transform pieces, I only get these 3 pieces with the wrong pivots:

 

EGXPvd0.gif

 

I understand that I need a foreach to grab the geo (and it's probably compilable so fast) but I don't understand why the pivots/rotation go to shit. I'll experiment today and get back if I find a solution. Thanks

Share this post


Link to post
Share on other sites

756a66b226b6d7e6793133410831ecd3.png
 

 

Turns out I was running a for loop on points and not primitives, and had a name problem where the Dopnet got rid of my name attribute. After a bit of object path wrangling now it works. I haven't tried the compiled blocks but it doesn't seem to be a bottleneck.

Keeping this here if I ever run into the problem again.
In the wrangle

 

@P = point(1,"P",@ptnum);
matrix3 t = primintrinsic(1,"transform",@primnum);
setprimintrinsic(0,"transform",@primnum,t,"set");
vector pivot = primintrinsic(1,"pivot",@primnum);
setprimintrinsic(0,"pivot",@primnum,pivot,"set");

 

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
Sign in to follow this  

×