Jump to content
sanostol

Packed Primitives Intrinsics

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

Share this post


Link to post
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).

Share this post


Link to post
Share on other sites

Thanks!

@magneto: the Primitive Intrinsic VOP seems to read data but not to write

@ crunch: intrinsic:transform gets intrinsic_transform in a bindexport, whats the correct way to write out the data

Share this post


Link to post
Share on other sites

Sorry I didn't notice. But you can use the Set Attribute VOP (Set Class to Primitive Intrinsic) or the setprimintrinsic function.

  • Like 1

Share this post


Link to post
Share on other sites

unfortunately the transform is not updated during simulation, I hoped to be able to animate the scale of packed primitives during simulation

Share this post


Link to post
Share on other sites

they are but until now i could not get Bullet to update the collision shapes

Share this post


Link to post
Share on other sites

Hi there,

 

I'm also going through this now, and even though I scale the packed primitives, I can't get the bullet collision shapes to scale.

 

Has anyone solved this yet?

 

Cheers,

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

 

 

Share this post


Link to post
Share on other sites

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

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

×