Jump to content

Rbd packed object - when set to inactive is slower


Juraj

Recommended Posts

Hello,

just a quick question. I have deforming fractured object and I want to release it's pieces gradually.

One possible way to do that is:

  • create RBD Packed Object with Overwrite Attributes from SOP enabled
  • then adjust active and deforming attributes in SOPs

This way works well but I noticed that even when all pieces are static simulation runs slowly.

 

Faster way seems to use Static Object to refference to static pieces. And in SOPs delete activated pieces and these activated pieces add into empty RBD Packed Object.

It is faster as Bullet doesn't seem to simulate Static Object and use it only as collider.

When I do the same with Attributes Overwrite way it is much slower.

 

Am I missing something or it is normal?

First solution seems to be more elegant and simple. But slower unfortunately.

 

Thanks,

Juraj

Link to comment
Share on other sites

it's better if you provide example where it's slower

be aware that by enabling override attributes you are forcing input SOPs to cook every frame just to figure out the values of active, deforming and animated attribs

so if your input geo is slow to recompute then that may be the problem you are seeing

Link to comment
Share on other sites

well, that's quite opposite from what you've described in first post

sim_1 is faster and it's using Override Attributes From SOPs

that makes sense as in your file only thing it needs to do is update those attributes since your SOP input cooks very fast

you probably wanted to turn on deforming using i@deforming = !i@active;

then it gets actually slower than sim_2 which is as well using deforming static collider

the time difference may be due to the method of creating collision shapes

while in both cases it needs to recreate them every timestep, in sim_2 it's using Create Convex Hull per Set of Connected Primitives, which actually creates one dop object with multiple collision shapes, which seems to be faster than creating collision shapes for individual independent objects in sim_1

 

as for repacking, that's very tricky subject

here is very very simple way of repacking

probably not very safe as the transform and pivot of the original prim is still not preserved
which is doable as well, just maybe after some sleep
the point of your scene not working was that you were destroying all attribs on your packed prims

repack_basic.hipnc

Edited by anim
Link to comment
Share on other sites

Hi

I'm a little bit confused here. Ins't transform represented by P attribute and pivot by pivot attribute? If I will not edit geometry shape but only change color it isn't necessary to recompute pivot, is it?

Also I was wondering whether pivot and center of mass are the same thing.

 

Link to comment
Share on other sites

no, it's represented by

P

and transform prim intrinsic and pivot prim intrinsic, which you will loose by unpacking, and would need to correctly setup for newly packed prims so that they are the same

Edited by anim
Link to comment
Share on other sites

Thanks for explanation. I just found out that I missed this whole "intrinsic" concept. I will have to look into it because now I don't understand difference between attributes and intrinsics.

 

EDIT: If you know about learning resources about intrinsics please post it here :) I couldn't find explanation in docs.

Edited by Juraj Tomori
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...