Showing posts with label crowds. Show all posts
Showing posts with label crowds. Show all posts

Wednesday, 22 January 2025

skinned geo as agent layers for crowds/fbx

A brief how-to-add-proper-skinned-geo to a crowd agent..
Get the Rest Pose (T pose) of the agent. (You can just use a skeleton if you have one, and then use "Agent From Rig" to turn it into an agent.)
Put your desired geometry (the red trouser leg in the screenshot) into position.
Joint Capture Biharmonic it! This is how you skin stuff with kinefx.
You can preview the deformation with a RigPose and Bone Deform sop.

Give the skinned geo a name attribute (string on primitive).
Add it as a shape on an agent layer as you do with props. Note that the skinned stuff should not be packed. I don't know why, but you can merge it along with the packed rigid props & the Agent Layer node will pick up the name attribs.

crowds in solaris/karma

 Bring in crowd from obj using SOP Crowd Import node (here it's still packed agents). Create Instanced SkelRoots is preferred I think


Stylesheets don't work with Karma/Solaris (as far as I know!) To target props/shapes in a crowd you're best off using Collections. Here we're making collections of the hammer prop. 
It's important to tick Allow Instance Proxies in Collection!
The syntax is %reference:/path
In the example it's %reference:/crowd/agentdefinitions/ball/shapelibrary/l_hammer


Here's the stage scene outliner thing

Assign the materials to the collection by typing in the name. Eg. %hammer

Be sure to expand the Material Binding and tick Include Descendant Primitives in Collection
You might have to change the Strength to Stronger or Weaker than Descendants too.


I couldn't see a good way to access point attributes (eg. per agent float/int values) but Material X does read them - so I guess use switch RGB and stuff like that?
This seems to be the user data equivalent-

This seems to be the best switch RGB equivalent-

Just plug em in like this - just like Arnold

And ta da...attributes and collections targeting different bits of a crowd!




Tuesday, 21 January 2025

multi layers and props agents more info!

Bit of new info I learnt from this handy video https://www.youtube.com/watch?v=CVMu-6sRqvY
I was finding I couldn't layer my props previously. So I'd only be able to have a "hat" or a "sword" agent, but couldn't seem to combine them, despite their bindings being separate. The answer *seems* to be this.... bind all possible shapes! here's how we do it.

1 - use agent animation unpack to get a bind pose. I then timeshift it to frame 1 (you might use 1001) to remove time dependency

2- get all your geo and transform them to where you need them. Eg. sword at left hand, hat at the head positions

3- mergepack them all, and give them appropriate names

4- capturepacked geo, specifying each named packed prim + joint to capture to

5 - now in the agent layer you can specify multiple props/shapes and group them up.
 - note you no longer have to specify the joint in this node, as the props have bindings already
-remember to assign to default