Randomizing Geometry plugged into a RBD Solver

   2383   5   2
User Avatar
Member
96 posts
Joined: Oct. 2013
Offline
I'm creating a setup where objects are randomized and placed on ground geometry using RBD bullet solver. The placement and dynamics work. I just don't know where to place the transform and copy nodes with parameters to randomize each object.

Object SOP - Creates the object to be randomized.

Ground SOP - Creates the ground geometry.

Cloud SOP - Creates points using scatter on a volume based on the Ground, extruded.

DOP - Brings in Ground as static object, Object SOP result placed on Cloud SOP points (using RBD Object), merged, out to RBD Bullet Solver and gravity.

Where can I place a transform and copy node with randomized parameters in this setup? Each object is the same at the moment. I'm not sure where in the process I should add that randomization.

Thanks,

Adnan
User Avatar
Member
2528 posts
Joined: June 2008
Offline
I would probably look at putting the random copies in the DOP Import result node. Then all DOP work is done and you typically have points that you can copy on to.
Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
402 posts
Joined: June 2014
Offline
Hi Adnan,

sounds like it could be a case for packed primitives… do all the copying inside one sop and then bring that sop as one single RBD packed object. Does this seem like what you're after?

Attachments:
packed_rbd.hipnc (145.9 KB)

Henry Dean
User Avatar
Member
96 posts
Joined: Oct. 2013
Offline
Thanks so much Enviob and Friedasparagus for the replies. I looked at both option after you suggested them, and was not quite able to implement them with my limited experience with Houdini thus far. Attached is a simplified version of my scene file with just the functioning bits. Perhaps someone could take a look?

Thanks,

Adnan

Attachments:
example.hiplc (397.8 KB)

User Avatar
Staff
2540 posts
Joined: July 2005
Offline
It is a bit challenging to dynamically create simulation objects with the Bullet Solver. It can be done using POP Wrangle DOPs to modify the position P and the primitive string attribute. The latter requires you to force the bullet solver to reconstruct the correct collision geometry and surface geometry.

IMHO the better way is to do as much of the work outside of the simulation engine for direct-ability without running a simulation.

I created an example file where I used the Copy SOP stamp feature to switch between three primitives which are then randomly placed with the % modulus operator by the number of pieces.. You could replace the % 3 in the copy stamp expression with the hscript function opninputs(“/obj/chunks/switch1” to automatically set the % modulus remainder to the number of pieces.


Hope this helps.
Edited by old_school - July 25, 2016 11:58:09

Attachments:
random_rock_drop1.hip (279.8 KB)

There's at least one school like the old school!
User Avatar
Member
96 posts
Joined: Oct. 2013
Offline
Thanks Jeff. I managed to get this into my setup. Each of these replies is very helpful in getting me there. I'll work on it some more tonight.

Adnan
  • Quick Links