wire deformer to skinned weights


#1

I was wondering if anyone knew of a tool that would extrapulate the wire deformers ability to joints/skinned weights?

I see similiar things done with converting clusters and softSelect deformers to joints/skin binding and wanted to know if anyone had done it with a wire deformer

example:
a line of 6 joints is skinned to a Curve with matching CVs.
The Curve is used as a wire deformer to influence some geometry.
Some magic, or a script, is applied and the deformed geometry is now controlled by the joints using extrapulated weight information from the wire deformer.
Make sense?


#2

hello,
so regarding your problem i dont see the point you want to do the “trick” .
Whire deformer is a curve that influence a geometry , you can only paint weight from 0 to 1 of the whole curve , you dont have controll over the single weights of each cv in the wire deformer .
If you check a my old post on my blog here :
http://www.giordanoanimator.com/blog/?p=27
I explain how to save and reload wire deformer weights . If you print out the wights map you save with the script you will see each vertex only holds a single value from 0 to 1 it doesnt hold multiple values one for each vertex of the curve .
So that means you cant convert from wire deformer to skin cluster . If each wire deformer vertex was influencing the mesh you could actually save the wire deformer map and change the name of the influence from the vertex name to the joint name and that would actually make the trick (but you will get different result due to different behavior of wire and joints )
At the end i think it s not possible to convert from wire weights to joint weights .


#3

hello sabathyus

What you want to do is possible with the help of the API: in python you can loop through all the points that are influenced by your wire deformer and find the closest point to your curve with MFnNurbsCurve.closestPoint . This will gives you a U parameter value .

If your 6 joint lies on your curve then you can convert this parameter value as a weight:
Lets say that 50 point lies between the range 3 and 4 : the vertices near the parameter 3 has more weight from the bone3 etc you get the idea it’s quite easy.

One observation giordi: this trick is indeed quite clever it can also be extended to nurbs surface. About your blog post you don’t even need to read or copy this weight vertex by vertex:
you can plug attribute of the same type into each other ( if there are connectable of course )


#4

@tontonsuspect: regarding my blog post yeah changing connection is pretty fast and usefull i use that kind of script at work when we want to change the influences without changing the weights map. like going from a skeleton A to a skeleton B (with same or different mesh doesnt matter ) , but in my case in the post i had to detach the skin do some fixes reattach and reload the same exact weights so i fixed it with a couple of lines of code .

regarding mayay API with  the use of  MFnNurbsCurve you can get out  the world poit too lying on the curve that can come out pretty handy .Anyway i think your convert  wont work because at the end you wont get  neither close to same behaveiour then the wire. 

Thr point to convert clustr to skin cluster and so on is that cluster and joint can get same kind of deformation .
Wire and skin cluster cant. if i didnt missunderstand the curve that controll the wire deformer has been skinned under a line of 6 foints . so using that way will also give a WAY different result then the one he has now with wire deformer.

But the tecnique you said might work with  a wire not skinned on the bones . But i m afraid the result will be a linear deofmration which the wire deformer isnt (due to nurbs curve behaviour)

Ps if he want s to do tontonsuspect tecnique i think is possible without  the need of calling maya API

PPs but yeah great tip tho!


#5

Hi
More straight forward thing would be to bind the mesh with the same joints with maximium influence sharing. Then copy the skin weight from the wire curve to the mesh.
Rgds


#6

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.