Jump to content

Understanding the "debris shelf tool" -> ?


Scratch

Recommended Posts

Hey odforce :)

I was playing around with the debris shelf tool, and would like to understand what it does "under the hood". I'm afraid my knowledge is not yet there to figure it out alone, so i wanted to ask you guys for help.

Background: I want to create my own secondary particle based debris system for a bullet RBD sim I am currently working on, and the shelf tool does exactly what I would need. It only emmits, when the fractured pieces reach a certain distance to each other, and stops, if this distance is getting too big. I would love to understand how this is achived!

I think I understand everything the shelftool does except of what happens in the geometry network of the sop solver. "debris_geometry_setup" It would be superb if anyone could explain to me whats going on inside there :)

What I know so far:

Pop-Net

it just contains a pop-source node to emit particles from. The color ans sprite node is just there if you need this functionality, but if you want (like me) to copy geometry to the particles, you won't need these two nodes.

Auto Dop Network

Pop-Object -> Pop-Position (no idea why I need this) -> Pop Solver

Normally you can handle particles entirely in a pop-network, but when you need it to interact with simulated objects, you can create a pop-object, and feed it to a popsolver in order to get the particles into the dop-context. So far so good, since I already simulated my rbd's and cached them out, I think I do not need this step.

empty object -> sop solver (sop debris geometry setup)

the sop-solver is used to allow us to cook the "debris geometry setup" not only once in the beginning but every frame. The thing I do not understand is what is going on within the debris geometry setup - network. Any help here is much appreciated. :)

Thanks in advance folks!

cheers

Philipp

post-7428-0-38595200-1361303081_thumb.pn

Link to comment
Share on other sites

Sure thing!

Well it basically transferes attributes and groups then based on that attributes. The magic happen within the foreach sop.

You have the currently processed piece after the each1 node in the first strand of the network, and in the second strand you just delete the currently processed piece, ending up with all the other pieces. You create a "emit" attribute on all the other pieces, and transfere it to the currently processed piece if it is in a certain distance from the rest of the geometry (say not furhter away than 2 units). Then you repeat that process and create and transfere a attribute you could name "together". That only gets transfered if the pieces are very close to eachother, say just if they only have a distance of 0.1 between them. You can control that distance using the blend with of the attribute transfere node. Thats all the magic there is in the foreach node.

Outside the node, you can then use a group geometry, group by expression: if($EMIT && $!TOGETHER, 1, 0)

That will give you a geo-group you can hand of as source to a particle network

I also tend to do a bit more work than the debris shelf tool is doing by deleting too fast or too slow moving pieces first using a delete node, delete by expression: length($VX, $VY, $VZ) < 2 -> delete selected and annother one that uses length($VX, $VY, $VZ) > 10 -> delete selected. The values you need here highly depend on your simulation.

Hope that helps! :)

Cheers

Philipp

Edited by Scratch
  • Like 1
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...