PDA

View Full Version : mirror influence object weights


inverse catheter
03-01-2006, 03:32 AM
.


i 'm sure most are well aware of maya 's inability to mirror influence object weights ( default toolset ) .so .who 's got the best resources concerning overcoming this major weakness ?




.

john_homer
03-01-2006, 04:17 AM
its been a while sine I have delt with this..
but basically just make sure the transforms are in the appropriate place... so maya can find a match in worldSpace...
ie, not just have them all at 0 0 0.

.j

inverse catheter
03-01-2006, 04:24 AM
wellington ? .no shit .maybe you 're my neighbour .john .i 'll concede my ignorance .could you please elaborate .you 've had success mirroring influence object weights with maya 's default toolset ( no MEL hacks ) ?

john_homer
03-01-2006, 04:32 AM
no, maya sucks at it ;)

you need to set them up properly before skinning them. in regards to the transform node.

where you at?

.j

inverse catheter
03-01-2006, 04:54 AM
.

i might be misunderstood .like .if i 've got my influence objects ( nurbs ' muscles ' ) all set up .and all good .say .symmetry throughout the character .so i 'm painting in their influence .just as one would with a joints influence . 'cept .you can 't .as far as i 've found .mirror those ' muscles ' weights as you can joints

i 'm in need of a MEL solution .to be sure .and i 've started developing one .but i aint much of a coder .admittedly .and it 's pretty crude .here 's me hunting for a sleek .and solid solution

.

bro .i live up on the terrace .where 're you ?

john_homer
03-01-2006, 05:09 AM
hmmm.. the easy solution is to sort it before.. as I said.. sounds like your past that ;(

wouldn't be too hard to script... and possibly knowone has done it because there is no reason if you prepare it correctly.. so you may be a little screwed fro an existing solution..

I'd just throw in some temp joints (that mirror) transfer weights from inf -> the new joints.. mirror, remove the inf (which are now not weighted) rename the joints to what the infs were called... export weights (with a script from highend, not mayas export)...
open original scene, import weights.


miramar.

.j

inverse catheter
03-01-2006, 06:45 AM
.

maya .miramar .big monkies out your way a ?

john_homer
03-02-2006, 12:53 AM
all kinds of monkeys ;^)

.j

inverse catheter
03-02-2006, 01:00 AM
cheat it with some joints you reckon ? .there 's an ' outside the square solution ' .i can surely see the logic in how that would work .though .quite a lengthy process if there were so many influence objects one was trying to ' mimic ' in this way

john .if you have the time .would you be able to briefly outline how YOU would go about ensuring mirrored influence object weights ( positive to negative x .for example ) .you say : ' and possibly knowone has done it because there is no reason if you prepare it correctly ' .implying that it can be done without the aid of MEL .and .so far as MEL is concerned .the only difficulty i see in writing that script is calculating the ' mirrored ' pairs of verts in world space .a difficulty which is beyond me at this point .with my weak understanding of MEL

perhaps you could head me in the right direction there .examples of MEL that achieve this ?

thanks

john_homer
03-02-2006, 01:57 AM
.the only difficulty i see in writing that script is calculating the ' mirrored ' pairs of verts in world space .a difficulty which is beyond me at this point .with my weak understanding of MEL


there is no need to to compare verts (not thats its hard to) as maya does not take the shape of influence ojects into consideration for mirroring.. its simply done on the transform node. which is why that is all you need to worry about when settign them up (before skinning).. basically just make sure the pivot is in a suitable place (and matches the other side/mirror)

as I said. i havent done this in a while.. so I just had a play.. and found that maya is not that picky.. I actually had trouble making a scene that would not morror...
if you post one I can probably help you more.

as far as scripting a solution to your already skinned scene.. it may be a good project for you to learn/improve scripting...

basic theory.. not actually mel ;)

for each inf object
{
find the center/pivot.
create a joint there, parent it to appropriate joint in skeleton
add new joint as an influence.
transfer weights from inf to jnt
remove old inf object from cluster. and delete it from scene
rename jnt to the old inf name.
}

now you have joints rather than inf objects.. all weighted the same and named the same.

mirror the weights.
export.
import onto original scene (with infs).

.j

inverse catheter
03-02-2006, 02:35 AM
sorry .i mean comparing the verts of the skinCluster .the mongrel MEL that i knocked up enables me to :

>> select a vert on one side of the mesh .and the appropriate influence weights for that vert are recorded
>> select it 's counterpart on the opposite side .and the stored values are pasted in place

it works .but .what an ass job it would be to execute this .vert for vert .on an entire skin .i would be looking for an elegant way of performing something similar on all influenced verts .swallowed whole

i reckon i could macro that up .the MEL hint you just posted .i foresee the problem of a stunted workflow .though .having to export / import weights a bunch of times to experiment .why the f__k the alias guys never included this is beyond me .Mirror Skin Weights it says .not mirror joint weights only .maybe autodesk will wise up and just include it as an option .and a native PSD while they 're at it

thanks for your help .john .no doubt i 'll be hitting you up again .sooner more likely then later

CGTalk Moderation
03-02-2006, 02:35 AM
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.