Nick Petit
npetit
About Me
Connect
LOCATION
Not Specified
WEBSITE
Houdini Skills
Availability
Not Specified
My Badges
SideFX Staff
Since Feb 2008
Recent Forum Posts
Houdini for product design risk assessment Nov. 4, 2024, 11:12 p.m.
For 1), on the RBD Bullet Solver node, in the output tab, enable Impact Data. Press the "Fetch Impacts" button - this will create a object merge pointing to the impact points from the sim.
With these points, impactobject and parentobject attributes tell you which objects are involved in the impact event.
Ground, when ground or heightfield collisions are enabled, is always 0
Collision Geometry (plugged into the 4th input) is 1 when ground collisions are enabled else 0
RBD Geometry is 2 when collisions and ground collisions are enabled, 1 when only collisions or ground collisions are enabled, or 0 when neither collisions nor ground collisions are enabled.
The impactprimnum and parentprimnum tell you which prims from their respective ground/collision/rbds objects are involved in the impact.
So, say you have 3 RBD pieces (object 1), a box (primnum 0), a sphere (primnum 1) and a lense (primnum 2), falling on top of one another and a ground collision (object 0), if you want to find all impacts that involve the lense, you'll have to find all impact points that have
(@impactobject==1 and @impactprimnum==2) or (@parentobject==1 and @parentprimnum==2)
With these points, impactobject and parentobject attributes tell you which objects are involved in the impact event.
Ground, when ground or heightfield collisions are enabled, is always 0
Collision Geometry (plugged into the 4th input) is 1 when ground collisions are enabled else 0
RBD Geometry is 2 when collisions and ground collisions are enabled, 1 when only collisions or ground collisions are enabled, or 0 when neither collisions nor ground collisions are enabled.
The impactprimnum and parentprimnum tell you which prims from their respective ground/collision/rbds objects are involved in the impact.
So, say you have 3 RBD pieces (object 1), a box (primnum 0), a sphere (primnum 1) and a lense (primnum 2), falling on top of one another and a ground collision (object 0), if you want to find all impacts that involve the lense, you'll have to find all impact points that have
(@impactobject==1 and @impactprimnum==2) or (@parentobject==1 and @parentprimnum==2)
How to update Houdini nodes to latest version Nov. 4, 2024, 4:37 p.m.
Unfortunately these particular LOP nodes are a little quirky. Their definition hasn't changed. They have a small set of default parameters which will be updated for you when the definition changes, but most of the other parameters get built dynamically when the node is created.
The "Arnold", "Karma", "Renderman", "Husk" folders and all the parms below them fall in that category.
The only way for you to "update" those nodes is by either replacing it with a fresh new instance and recreating the channel references, parm defaults etc that you had setup, or by editing the nodes' parm interface and adding those new folders and parms.
If you look at the various nodes' onCreated script, you'll see there is a handy function that handles creating all the missing parms.
In the case of the RenderVar LOP:
If you replacewith your own hou.Node object, it'll recreate the missing Husk parms on your node.
One caveat is it won't remove any old and deprecated parm, so it's always good to compare all the parms on your updated node with the parms on a fresh new copy.
The "Arnold", "Karma", "Renderman", "Husk" folders and all the parms below them fall in that category.
The only way for you to "update" those nodes is by either replacing it with a fresh new instance and recreating the channel references, parm defaults etc that you had setup, or by editing the nodes' parm interface and adding those new folders and parms.
If you look at the various nodes' onCreated script, you'll see there is a handy function that handles creating all the missing parms.
In the case of the RenderVar LOP:
import loputils loputils.addRendererParmFolders(kwargs['node'], 'Aov')
If you replace
kwargs['node']
One caveat is it won't remove any old and deprecated parm, so it's always good to compare all the parms on your updated node with the parms on a fresh new copy.
Obtaining LOP instancer 'invisibleIds' attribute within SOPs Nov. 4, 2024, 4:24 p.m.
When you LOP Import the instancer prim and unpack to polygons, it'll bring in a packed USD for each instance with a "usdvisibility" string attribute set to "invisible" for all invisible instances.
In SOPs, you can use all the usd_* VEX functions to get any attrib/primvar etc from any prim on the stage.
Here's an example that shows both the usdvisibility attribute being accessible in a SOP Modify LOP and a sopnet, and another example showing how you can get the instancer attributes onto the instances in SOPs.
With regards to invisibleIds, keep in mind that if your instances have Ids you'll need to first get the Id attribute per instance and check if it can be found in the invisibleIds array as opposed to simply using the instance index as I am doing in the example.
In SOPs, you can use all the usd_* VEX functions to get any attrib/primvar etc from any prim on the stage.
Here's an example that shows both the usdvisibility attribute being accessible in a SOP Modify LOP and a sopnet, and another example showing how you can get the instancer attributes onto the instances in SOPs.
With regards to invisibleIds, keep in mind that if your instances have Ids you'll need to first get the Id attribute per instance and check if it can be found in the invisibleIds array as opposed to simply using the instance index as I am doing in the example.