sloggo
hey guys, hoping to pick your brains on this one

I want to write a plug-in that provides live feedback on a couple of properties while creating blendshapes (such as surface compression/tension, or even just "amount moved from base shape"). Ive written nodes in the past that affect vertex color and pass it on the output mesh, but this case seems a bit different in that one of the input attributes is the vertex positions of the final mesh (which is being edited).
 
I'd love any guidance on best approach here! Im looking for examples for how tools like the softmod seem to draw colors on the mesh without creating a colorset - any suggestions on where I should be looking would be appreciated!
 
Is the key here just understanding how tweak nodes work? is it as simple as making sure there is a tweak node and my plugin sits after it in the chain?

Reply 0 0
pshipkov
I think you are looking for something like the tensionMap node in SOuP.
You can make it work by hooking your base geo to the inGeo2 attribute on the node.
Then slap tweak node on your target mesh you are sculpting and connect tweak.outputGeometry to tensionMap.inGeometry. Then turn-on the display colors flag on the sculpted mesh.
This is slightly different that what you ask, but worth checking to see if that's the desired overall result.

TO make it work like how the soft-selection draws stuff - take a look at the *context classes.
Basically you want to create your own context and or manipulator(s) that do something in the scene, draws some stuff on screen based on user actions.
Reply 0 0
sloggo
Beautiful, thanks for the prompt reply, and it answered my question perfectly!

Where I mentioned softmod I meant literally the softmod deformer, as opposed to soft-selection when manipulating mesh components, as it shades the model differently. Softmod tool, when you're playing with its falloff, gives the appearance of vertex colors shading its faces (unlike soft-selection which looks like highlighted edges/vertices). Do you think both are implented with custom GL drawing via the context? as neither seem to temporarily introduce a colorset.
Reply 0 0
pshipkov
Take a look at the mpxlocator class and its view3d method and other things. Check the related devkit examples.
Reply 0 0
Reply