Jump to content
mestela

emit packed rigid bodies efficiently

Recommended Posts

I setup a simple scene of a packed pigs head, if I keyed the 'creation frame' parameter to be every n frames, I could emit pigs, all good.

That said, performance dropped off sharply after about 10 pigs. Looking in the geometry spreadsheet I could see that it was making a new rbdpackedobject for each pig:

rbd_simple.gif

Some trawling of the forum turned up a handy example: http://forums.odforce.net/topic/20915-emit-rbd-problem/#comment-124994

 

The basis of it is to have a sop solver alongside the rbd solver,  add a pig every n frames, and join them together with a multisolver.

This works, all the pigs remain in the single rbdpackedobject, performance stays zippy.

rbd_efficient.gif

 

Before I take it as verbatim though, was wondering if this is the cleanest way to achieve this? It feels a bit convoluted, most other rbd things make sense (well, a little more sense)... anyone?

 

Scene: rbd_emit_simple_vs_efficient.hipnc

 

Share this post


Link to post
Share on other sites

This is the way I always do it. Would also love to know if there's simpler ways.

It gets weirder when you have multiple rbd packed objects and you have to sort out which one to put the geo from the solver in. If you don't tell it not to, you'll get 1 added to each object you have....

Share this post


Link to post
Share on other sites

cool. asked a guy at work, he's using much the same technique, so I guess this is the way to do it.

I think from that same thread I linked above it talks about sending geo to specific rbd objects, using the @name attribute. Might have a play with it tonight...

Thanks for confirming my suspicions!

-matt

 

Share this post


Link to post
Share on other sites

Aha! I had a feeling there'd be a neater way, thanks again Tomas! I've lost count of the number of beers I owe you...

 

 

Share this post


Link to post
Share on other sites

This is so neat! Thanks anim! I keep being told I can use POP nodes for packed prims, but it never really sinks in just how powerful that is.

Share this post


Link to post
Share on other sites

I gave this a go but ran into a problem. I'm trying to fracture the shape on collision inside of the DOP but can't seem to get it to work. It's like the Voronoi node is not seeing it as a shape, but still a point. I'm also new to Houdini, so most likely I'm just not doing something correctly.

Share this post


Link to post
Share on other sites

just to keep it tidy

 

Share this post


Link to post
Share on other sites

In a packed prim sim, is it possible to emit packed rigid bodies and animate the scale each rigid bodies over time? So each point would emit at a scale of .1 and animated to a scale of 1 over a second or two? I believe this is with fractured rigid bodies but I would like to control the sim with pop forces.

I'm attempting to create an effect of particles emit over time at a small scale, scale up while colliding nicely. 

Thanks in advance!

 

Edited by Citadel15635

Share this post


Link to post
Share on other sites

Thanks a lot for the files, it was really helpfull ! 

@anim > Are you forced to emit from the object that will be the rbd ? I can't figure out how to emit your torus from something else (a grid for exemple) without using @mestela's file... 

Also, does anyone have an idea for @Citadel15635's question about scale ? I am pretty intersted to push things that way too ! :) 

Share this post


Link to post
Share on other sites

Hi, I wanna know how to emit different RBD-packed objects (with different properties such as density, friction etc) with this POP source method? You can use this method (using POP to emit packed obj) with a single RBD object node. But with several RBD-packed objects can the same method applied?

 

PS: I know I can use wrangle to create those attributes in SOP and merge them into a single Packed object. But I want to have easy control of each rbd object. Thanks!

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

×