Home Website Youtube GitHub

Spine & Neck Max Stretch issues - need help please

Quick question @Tsahi

Does your skinning in Maya 2019 defaults to DualQuaternium when applying?
@chrislesage you actually opened the buggy file inside Maya 2018 and everythging was fine?

1 Like

Good call. It is using DQ weights, and turning if off fixes the weird backwards flipping effect.

However, there is still some weird skewing occurring even with Linear weights in Maya 2019.
image

Yes, I opened it in Maya 2018 and it works fine (MacOS and Windows)

If I may have the Maya file (2019 save) I can try to see if this is a mgear node issue related to compiling with Maya 2019. (again this is for debugging, can’t really promise right away if this is “fixable or not”) I do recommend trying the same file with Maya 2019.2

Yep. @Tsahi I took the liberty of sharing the file with Jerome.

@Jerome The skin default wasn’t DQ, it was classic linear.
When I added the face rigger I switche it to DQ to get proper eyelid deformation around the eyes.

On second thought, I did export and import the skin at some point, so it probably got reskinned as DQ.

Chris passed you the file. This is in production now and I have the authority to share it with support.
Just so please don’t share it with anyone or use it publicly or commercially for anything else.

Thanks!

Hello guys

This indeed seems to be more problematic than I though. I will be running some tests tonight and will try to find a solution for this.

2 Likes

I am still loocking into this. Yesterday I checked some of the mGear solvers from 2018 and 2019 but so far I haven’t been able to pin point what is exactly causing the problem .

1 Like

Hi @Tsahi @Jerome @chrislesage

I am following the thread. If you don’t find the solution please send me the data, I am also interested to know the source of this issue.

Cheers,
Miquel

1 Like

Hello @Tsahi @Miquel @chrislesage

So I have one tiny good news, and one big bad news.

  • The good news is that I found what is going on… yay
  • The bad news is that the bug is a Maya 2019 bug.

@Tsahi basically Maya 2019 shear attribute on the joints is not doing anything any more so mgears stretch/squash build-in system won’t work… I am quite shock about this I must admit…

I submitted the bug to Autodesk just now with a little video description.
https://we.tl/t-DQuSJ006Ts

@Tsahi Now for a solution. Basically because the joints shear attribute doesn’t work trying to by-passed it on the joint itself won’t work so what you need to do is that for each skin joint that has connections to the shear attributes you create a transform node (group) on top of the joint an connect the shear attributes into that group rather than the joints. This will solve the problem. If I have the time I will send you a code snipped for this.

Cheers and sorry for the bad news.

PS: I log every year more than 10 bugs to Autodesk and I see them often all been taken care of but the problem is always waiting for the release update and they just did one for Maya 2019 (2019.2) so my guess is that this won’t get solved till end of the year :frowning:

3 Likes

Nice work Jerome!

Disappointing but unsurprising. (I’m not shocked.) That is why studios should be slow and cautious to upgrade Maya.

Thanks @Jerome for the research on this. I can’t believe this kind of things happen in the most basic things in each Maya release :triumph:

1 Like

Very nice work @Jerome and thanks for taking the time to research this.
In the mean time I reverted to an older version, so I guess I’ll just stick with that for now to avoid more unexpected issues, and also due to time constraints.
If you do create a code snippet for it, please post it here.

Thank you all for being so responsive and supportive.

1 Like

@Tsahi not sure if you tried this. But since the issue is related with the shear, can you try to build the rig checking Force uniform scaling?

please let me know if this helps.

Thanks,
Miquel

6 Likes

That seems to solve the problem for me for new rig builds, thanks!

1 Like

I will test it to see if this solves it.
But I have some issues with post custom scripts, and I’m not very well versed with Python,
so I’m not sure I’ll rebuild the final character again.

Thanks Miguel!

Another option is to create a simple script to run over the rig and change the connections. If I have a little time I will do it. (But can’t promise anything )

NOTE: that maybe the deformation change a little when you do squash and stretch.

1 Like

I ran a quick test with “force uniform scaling” on and it looks like it works for the spine stretch issues.
Thanks Miguel.

2 Likes

Hi Miquel.
Did you ever get around to writing that script?
I am not a coder but I am trying to write my own script.
I am putting a group above each joints, then moving all the connections from the joint to the group.
It gets rid of the shearing.

The problem I am facing now is that some of the joints have joint orient values which I don’t know how to transfer to the group above the joint (the incoming connections that used to go to the joints seem to override anything I try), so the shoulders and hips where the joint orients change don’t rotate in the correct axis.

Is there a plan to fix this other than using uniform scaling?

Thanks for any info as to how I can approach this!

Hi Zan, what version of Maya you are using? Did you try to use uniform scaling? Are you still seeing shearing problems after using uniform scaling?

Here is a script I wrote that forces uniform scaling on joints. I wrote this for a completely separate problem, so there is no guarantee this is going to help you or even run properly. It queries which connection is coming in for the scaling, and then connects one single attribute to all 3 scale attributes. So for example, if it is a scaleConstraint, then the scaleX output of the constraint will connect to X, Y, and Z.

(If the connection is coming from a compound attribute, then I imagine this will fail. eg. .scale instead of .scaleX)

To use it, select the bones you want to force to be uniform scaling, then run the script.

import pymel.core as pm
# Force uniform scaling. Sample the scale connections
# And then connect all 3 to one single attribute.
attrs = ['sx', 'sy', 'sz']

bonesToFix = pm.selected(type='joint')
for each in bonesToFix:
    # First, skip any that are not connected at all
    if any([each.attr(scaleAttr).inputs() for scaleAttr in attrs]):
        scaleAttrs = [each.attr(scaleAttr) for scaleAttr in attrs]
        
        scaleInputs = [
                [scaleAttr, scaleAttr.inputs(plugs=True)]
                for scaleAttr in scaleAttrs
                if scaleAttr.inputs(plugs=True)
                ]
        
        firstScaleInput = [x[1] for x in scaleInputs if x[1] != []][0][0]
        for scaleAttr in scaleAttrs:
            firstScaleInput.connect(scaleAttr, force=True)

5 Likes

Hi Chris!
You are always first to help :slight_smile:
Im using maya 2020.
Uniform scaling works fine.
I want to have some controls to be able to scale in one axis only, so I was trying to script what jerome said would solve it, bit cant seem to quite get what I want. The main problem are the joints that have a different orientation so hips shoulders etc.