Home Website Youtube GitHub

Extracting weights from envelope via node editor?

Hi everybody,

I’m trying to extract normalized deformer information from an envelope to split facial shapes, but I’m having a hell of a time trying to get these values. Are there built in nodes I’m missing, similar to a ‘select in array’ node? Is this a custom node I have to build myself?

Thanks!

Dave

Hey Dave,

What have you tried so far? How familiar are you with the Maya API?

But you say a “node”. Are you trying to get some effect that you can hook up and tweak real-time? Are you familiar with BraveRabbit’s rampWeights? It is a tool that does what I think you are trying to do. http://www.braverabbit.com/rampweights/

Also, I started writing a tool a couple years ago:
blendshape_tools.py - https://github.com/chris-lesage/rigmarole-tools
It’s a tool that I use to split blendshapes with a nice curved falloff, and multiple splits. It is still messy and unfinished, and I stopped developing it after rampWeights came out! :slight_smile: (So proceed with caution, and please don’t expect much support for it. But it might give you some ideas. It’s written partially with the Python Maya API. It does not access skinCluster weights at all.)

Also mGear’s core skin.py accesses skinCluster information using Maya API. So you can search that code for some further ideas.

2 Likes

Hey excellent, I will look into those tomorrow. So far I just kept going further and further down the rabbit hole. I started by prodding around the built in nodes, and when I couldn’t [edit - find what I needed], I went in and was looking at tutorials to take an array and output a specific index from it, then it seemed like I would need to use callbacks and OpenMaya for that, so I started investigating that, but got stuck and wasn’t sure if I needed to plug in the “weights” plug (a float, but not a float array?) or the deformer weights “TdataCompound” or something like that plug(s), then had another rabbit hole to peer into to figure out how to add THAT attribute. I haven’t really operated in Maya in nearly a decade, it felt like I was operating blind.

The BraveRabbit plugin sounds promising. I’ll definitely check that out tomorrow.
(As well as the skin.py) Thanks for your insight!