Jump to content

Packed Primitives Intrinsics


sanostol

Recommended Posts

When I create a set of packed primitives with the copysop or when using the assemble sop I get a point for every single packed primitive but I also get a primitive for this, in a edit sop I can now translate, rotate and scale them. the change is stored in the intrinsic:packedfulltransform, but it seems not to be possible to write that data with vops to control the transform.

Are there other ways?

Martin

Link to comment
Share on other sites

When I create a set of packed primitives with the copysop or when using the assemble sop I get a point for every single packed primitive but I also get a primitive for this, in a edit sop I can now translate, rotate and scale them. the change is stored in the intrinsic:packedfulltransform, but it seems not to be possible to write that data with vops to control the transform.

Are there other ways?

Martin

You can modify the intrinsic:transform (3x3 matrix) primitive intrinsic (it's writable), or move the point to transform. The full transform is computed as a combination of the transform, the point positiion and possibly other factors (i.e. Alembic transforms).

Link to comment
Share on other sites

  • 1 year later...
  • 8 months later...

I am struggling with this also, I started a new thread because I didnt find this one first,

http://forums.odforce.net/topic/23353-scaling-packed-objects-with-vex/

 

any progress, on this, I cant seem to get the collision to update properly; 

 

Know the problem is 
I can scale Packed RBD objects in the DOP but their collision geo does not seem to update even thou guide geometry shows the actual scaled size,
I found this in the manual
"Each packed primitive contains the collision geometry for an RBD object, "
Maybe I need to scale this geo as well as render geo.

Back and forth on the forums, I scale the packed objects with this

matrix3 trn = primintrinsic(0, "transform", @primnum); 
matrix scalem = maketransform(0, 0, {0,0,0}, {0,0,0}, scale, @P); 
trn *= matrix3(scalem); 
setprimintrinsic(0, "transform", @primnum, trn);

this works on the geometry but collisions does not respect the size,
check the file and you will see what I mean, 
The goal is to keep scaling inside DOPs, otherwise it works fine when I scale the geo and turn on Deforming Active, but I dont want that for a very good reason.

Link to comment
Share on other sites

  • 8 months later...

Hello there, 

I'm too interested in this topic.

I tried 2 VEX methods using an Attrib_Wrangle inside a Solver SOP :

The one provided above by Tricecold, with the same behaviour where the Scale Matrix, indeed scale but doesn't update the collision correctly.

 

And this one

matrix3 mat = primintrinsic(geoself(), "transform", 0);
3@m = mat;
mat *= fit(@Frame, 55, 75, 1, 0.99);
setprimintrinsic(geoself(), "transform", @ptnum, mat);

Which updates better in terms of collision position. Though, it doesn't look right, it is very visible that the whole matrix is reduced.

 

My big wish would be to reproduce the above wrangle in vop, but I'm stuggling with the node Intrinsic, and also I don't know what I should provide the Pivot entry with.

If anyone could provide a sample hip or a screen capture to get me started that would be super helpfull

 

 

Link to comment
Share on other sites

  • 3 years later...

Hey guys, I know I'm really late but whatever. If you want to update the collision geometry you have to set the packedprim point id attribute to -1. This way bullet will think it's a new geometry and so recomputes the collision geo according to it's intrinsic transforms. Props to the Entagma guys for this one. Cheers

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