Jump to content

SOP Solver with Deforming Geometry


Recommended Posts

I have a concept rig I was working out and the basic idea is I have animated geometry (in this case an animated figure in maya, exported via fbx) intersecting dynamically driven objects. When these objects collide with the geometry I want to create an accumulation map of where the objects have hit the geometry. The basic setup was to have the animated geo fed into a SOP Solver and have a point attribute called "accumulation" be incremented every frame by a "collision" value on the objects through an attribute transfer sop. The problem is though, in order to read the animation, deforming geo has to be turned on on the RBD object which means the rbd object with the initial "accumulation" attribute is reevaluated every frame, reseting the value. Is there a way to accumulate this collision value inside of the sop solver network?

Link to comment
Share on other sites

you can for example attach another geometry data to your object (named other than Geometry, say tempGeometry) which will be based on first frame(or initial pose) of your deforming mesh

use this data for sop solver for accumulation, you can bring into sop solver every timestep the deforming geometry for processing then copy or composite the attribute over the tempGeometry

in other words Geometry data will not be touched by SOP solver, but it will be used only for calculation (attrib transfer or whatever), the accumulated attribute will be stored in tempGeometry and since tempGeometry is not resetting every timestep (as Geometry does) it will hold the values perfectly

so at the end in SOPs you can just AttribCopy the attribute from tempGeomoetry to your deforming mesh

you can even use BlendShapes SOP in sop solver to deform tempGeometry according to actual Geometry shape (besides attribute calculation/composite) and that way you'll get fully deformed geometry with accumulated attribute in tempGeometry so just dopimport this data to SOPs and you are ok

Link to comment
Share on other sites

Sounds like you were on the right track.

What I have done in the past is to take a Static Object DOP (with deforming geometry turned on) and feed that into a SOP Geometry DOP. In the SOP Geometry DOP, have the Sop Geometry area point to the same geometry that the Static Object DOP. Put $T in the time field and under the data name field, put whatever name you want to (you will use that in a sec).

Now put down a SOP solver DOP. In the data name, put the same name that you did in the SOP geometry DOP and in the SOP path field, just put a period. Inside the SOP solver there will be a object merge node named "Dop Geometry". You won't have to mess with that. Put down another object merge node and in object one, point to your Static Object DOP (for example, if your static object DOP was named staticobject1, then you would put ..:staticobject1/Geometry in the object 1 field).

Now lay down a point sop. Put the object merge named "Dop Object" into the first input of the point SOP and the object merge you created in the second input of the point SOP. In the Position area of the Point SOP, just change the values to $TX2, $TY2, and $TZ2. Create another object merge and have that one point to the object that is going to be doing the hitting your geometry. After that, lay down an attribute transfer and have the point sop (the one that has two object merges going into it) go into the left input. Have the other object merge (that one you just created) into the right input. After that, just mess with the attribute transfer colors.

To make it easier on yourself, you can probably just make the object that is going to take all the accumulation one color (such as black) and the other object that is going to hit the surface another color (such as red). I dunno if this helps you at all but this is all I could remember on the matter off the top of my head. I don't have Houdini in front of me right now but if you need more help, I can see if I can throw together a file for you tomorrow. Good luck!


Link to comment
Share on other sites

yea i ended up just using a static version of the mesh in the sop solver being fed values from a SOP with the collision attributes which accumulated then those values were copied back to the animated geo like you said, all good

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.

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...