Soup

From cgwiki
Revision as of 23:29, 26 February 2014 by MattEstela (talk | contribs) (Created page with "=== Arrays vs components vs dynArrays etc === This is still a bit murky, but its becoming a little clearer. From what I remember of houdini, points are points are points. May...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Arrays vs components vs dynArrays etc

This is still a bit murky, but its becoming a little clearer.

From what I remember of houdini, points are points are points. Maya and soup are a little more complex.

Components are sub objects like verts, faces, edges, CV's. , if you want to drive deformer membership, or a delete component node, or things that feed back into the maya domain, you're talking components.

Arrays are a soup specific thing. They're like per-particle attributes, but soupy.

DynArrays are maya dynamics, per-particle arrays. If you're fiddling with stuff to feed back into a particle system or nucleus, you'll be using one of these at the end of your soup network.

Where it gets confusing is starting with one thing, converting it to something else, then converting it back again.

Eg, I wanted to drive a copier node, but only make copies onto a few vertices, not the entire mesh. The copier input expects arrays. However to do selections you use a group, and groups use components. What to do?

A pointAttributeToArray node lets you take components and convert it to an array. So in this case the flow was

( mesh + boundingObject ) -> group -> pointAttributeToArray -> copier

Group node

I tried a simple thing of having a plane, and use a boundingObject to define a region, then use a displayComponents to see my selection. Took me ages to work out what I was doing wrong, here's the steps:

  1. Create your mesh
  2. Create a boundinObject, intersect it with the mesh
  3. Create a group node
  4. Create a displayComponents node (make sure the group node is NOT selected, otherwise it won't make the node)
  5. Connect plane.outMesh -> group1.inGeometry
  6. Connect boundinObject -> group1 (soup knows the connections to make
  7. Connect group1.outGeometry -> displayComponent.inGeometry
  8. Connect group1.outComponents -> displayComponent.inComponents
  9. You should now see all the components highlighted, but we just want the ones within the boundingObject. To do that...
  10. On the displayComponents node, change 'use components' to 'input component list'. Much better!

Group node to delete components

Another simple one, made sense in hindsight, but took a while until the 'aha' moment clicked.

  1. In a mel window, run 'createNode deleteComponent'. This'll do the delete operation, obviously.
  2. Run 'createNode mesh', to create an empty mesh that we'll use for output
  3. Connect group1.outGeometry -> deleteComponent.inputGeometry
  4. Connect group1.outComponents -> deleteComponent.deleteComponents
  5. Connect deleteComponent.outputGeometry -> polySurfaceShape.inMesh
  6. Hmm, no change. Maybe the other mesh and display nodes are getting in the way?
  7. Hide the original plane and the displayComponent node
  8. Still nothing. Turns out you can't delete verts, but you can delete edges and faces.
  9. On the group node, change 'component type' to mesh edges or mesh faces
  10. Success! You can scroll down on the group node and flip the 'invert' toggle to invert the delete.
  11. Move the boundingObject around, feel clever.