Babylon Exporter for Maya 2022 doesn't export material properly

Hello, all. I’m hoping someone can help me with this issue.

So, I recently updated Maya 2022. I reinstalled the Babylon Exporter app to work in Maya 2022 (I had to install the 2020 plugins since Babylon doesn’t have Maya 2022 stuff available yet). The exporter seems to work, except for one issue. None of the materials come through when I bring the GLB into the sandbox.

However, when I convert the materials to Arnold materials since they were Maya materials before (blinn, phong, etc.), they seem to come in fine.

The debug log, when I export, says that the other material types are unsupported or unrecognized when I have Maya materials. Arnold materials work just fine, however.

This was never an issue before. Does anyone know why that’s happening?

pinging @Guillaume_Pelletier

Has we do not support 2022 yet, so i do not know what happening, but i guess it’s an API behavior change which is happening almost at every Autodesk update. We will fix this soon with the official support of 2022.
Actually, the decision to import material is at first based on the precence of Lambert API so maybe something change on the SDK making the material not relaying on this API anymore.

        // Standard material
        if (materialObject.hasFn(MFn.Type.kLambert))
            if (materialObject.hasFn(MFn.Type.kBlinn))
                RaiseMessage("Blinn shader", 2);
            else if (materialObject.hasFn(MFn.Type.kPhong))
                RaiseMessage("Phong shader", 2);
            else if (materialObject.hasFn(MFn.Type.kPhongExplorer))
                RaiseMessage("Phong E shader", 2);
                RaiseMessage("Lambert shader", 2);

In the mean time, because it’s open source we would love to hear about help and contribution of the Community on this topic.
All the best .

1 Like

FYI I had a quick look and found this interesting behavior. Any developper will appreciate :grin:
So it is the same for animation and globally for every call to hasFn(…) function.
I suspect a wrong dll version between 2020 and 2022 which cause side effect into the native stack
We might check

  1. To autodesk if the SDK libs are to be updated with 2022
  2. If not, to Autodesk forum if it’s an identified bug.