Dynamics / SOP paths

   6959   2   1
User Avatar
Member
3 posts
Joined: 8月 2015
Offline
Hi all,

A little puzzled trying to learn the free version Houdini in some spare time, if someone can shed some light that would be great.

Simple box and a grid both at object level, shelf tool to make the box an RBD object, and shelf tool again to make the grid a static object, drops collides yahoo dynamics are alive.

Being the inquisitive sort I am, wanting to understand the finer details I dig into the nodes and then see if I could recreate them without the help of the shelf tools.

I have come unstuck with the way the paths work or to be more precise, what's going on below.

Whats the difference between these RBD Object “SOP Path” parameters as they both work but give the name of different nodes and why use one over the other?

`opinputpath(“/obj/box_object1/dopimport1”, 0)`

and

/obj/box_object1/rest1

(auto selected by clicking the floating operator choser)

Obviously the rest1 node is one node higher up the chain than the dopimport1 so isn't this a different location to point at, a little confused why they both work exactly the same.

This second path format I would have expected to be.

/obj/box_object1/dopimport1

This didn't work and the link was broken as the RBD object dissapeared

According the the help opinputpath is simple an expression call to return the full path of a node connected to a given input.

Bonus question -

why does the shelf tool that creates a static object add an attribute create node at the end with the name “doppath” as a string variable holding the path to the DOP network?

I imagine its there for a good reason but Its not sinking in yet.


Thanks for any help you can offer.
User Avatar
Member
818 posts
Joined: 9月 2013
Offline
Great questions!

Mayaxini
Whats the difference between these RBD Object “SOP Path” parameters as they both work but give the name of different nodes and why use one over the other?

`opinputpath(“/obj/box_object1/dopimport1”, 0)`

and

/obj/box_object1/rest1
In terms of the data flow, you're entirely correct that they are exactly the same. Using opinputpath() simply makes the setup more adaptable to changes.

Imagine you want to insert a node between rest1 and dopimport1. If you are using the node path directly, you would also have to change the path in the dopobject node. By using opinputpath(), it simply means "whatever that's connected to dopimport1". So you can simply insert a node before dopimport1, and the dopobject will continue to fetch the right input. This also pairs up nicely with the “Transform Input Geometry” import style.

Another popular trick is using a null node as an output/terminator node for a series of SOP nodes. It's usually named something like “OUT”. In places that need to reference the SOP output, they would simply point to this null node. So that nodes can be easily added/removed to the SOP network, without having to update all its references.

Mayaxini
This second path format I would have expected to be.

/obj/box_object1/dopimport1

This didn't work and the link was broken as the RBD object dissapeared
The DOP setup works roughly this way:
1. Create the original box geometry in SOP
2. Fetch the original geometry into DOP for simulation
3. Fetch the simulated result back into SOP for outputting/displaying/rendering

#1 is done up to the rest1 node.
The role of the rbdobject node is #2, which is why it needs to point to rest1.
And the role of dopimport1 is #3, which is why it has parameters pointing to the DOP network.

So having rbdobject points to dopimport1 is contradictory. It's saying: get the geometry for simulating from dopimport1, while dopimport1 is supposed to be the simulated geometry.

Mayaxini
why does the shelf tool that creates a static object add an attribute create node at the end with the name “doppath” as a string variable holding the path to the DOP network?
The doppath attribute is mainly a metadata in the geometry that points back into DOP, so that given a geometry, it's easy to figure out which DOP node it came from or related to. This attribute is also set by dopimport1. This is mainly used for scripting purposes. For example, if you right click on the object in the viewport while in the Object level, there are some menus under “Jump To” that take you to some relevant DOP nodes. Without the doppath attribute, this menu wouldn't work.

Hope this makes sense!
Andrew / アンドリュー
User Avatar
Member
3 posts
Joined: 8月 2015
Offline
Great answers!

I don't think I could have received better answers, you nailed them.




Thank you very much Andrew.
  • Quick Links