Instancing with emit rbd

   3248   5   2
User Avatar
Member
343 posts
Joined: 12月 2014
オフライン
Is there a way to instance geometry to RBD emit points? I'm using the new SOP bullet solver, using Emit RBD. I have a small amount of source geometry, but I'm at a loss on how to instance to cached points when the point count and name attribute changes as more geometry is emitted into the sim. Ideas? Thanks!
User Avatar
スタッフ
451 posts
Joined: 2月 2008
オフライン
If you look at the RBD Bullet Solver SOP's help card, there is a RBDBulletSolverEmission example that shows how to prep assets for instanced emission.

As long as you pack the geometry before copying it onto the emission points, the geometry will be instanced. The RBD Bullet Solver will ensure names will be unique per instanced frame/step, but they do need to be unique between copied instances to start with.

Here is a simple hip file with 3 examples, going from simple to more complex. The last example packs each object (this could be fractured objects with constraints) using the RBD Configure SOP and then RBD Packs each one so it becomes a self-contained RBD asset that you can then copy onto emission points. The RBD Unpack SOP has an option to ensure names are unique for that very purpouse.

Attachments:
InstancedRBDs.hip (792.2 KB)

User Avatar
Member
343 posts
Joined: 12月 2014
オフライン
Thanks for the response and the examples. I'm actually trying to find a workflow for instancing geometry to RBD emitted point post-simulation. I did manage to find a more efficient delayed-load method outputting caches to Arnold for rendering by writing out .ass files from an Arnold ROP and bringing those in with Arnold Procedurals
User Avatar
スタッフ
451 posts
Joined: 2月 2008
オフライン
Sorry, I misunderstood your question.
The geometry output from the RBD Bullet Solver SOP is instanced already. However, if you plan on instancing your own geo on the points themselves you can do it using a Copy to Points SOP. You'll need a couple of things however.
You need the initial piece's intrinsic packedfulltransform and you'll have to modify the name attribute somewhat to retrieve the original piece's name.
The initial transform is necessary as the points' represent an offset from that initial transform.
User Avatar
スタッフ
451 posts
Joined: 2月 2008
オフライン
I've updated the last example to do what you're after.
Keep in mind, you'll need all of the unique instanced pieces that have been emitted at their rest position on the input of the Copy to Points SOP.

Attachments:
InstancedRBDs.hip (1.2 MB)

User Avatar
Member
47 posts
Joined: 3月 2014
オフライン
I'm working on a similar case but I want to use the simulation points to instance meshes on them in Unreal Engine.
I can only export the points to unreal (with, P, orient, etc) but I have a problem with a slight offset. The instancing in unreal would work the same as a Copy to points node. Is there a way to adjust the offset on the simulation points instead?

I attached an example file which also have the example from the file in this thread as a comparison.

I will input meshes (bricks) from Unreal for the simulation and it's possible to pack them as you do in your example before the sim. What I don't have access to in Unreal is this part after the sim:

Attachments:
library_bricks.png (44.7 KB)
InstancedRBDs_Unreal.hip (897.7 KB)

  • Quick Links