xmesh mx to my simplest workflow?


#1

I have problem with simplest materials’ transfer from xmesh mx (3dsmax2016) to xmesh my (maya2016).
Documentation says that material id’s and libraries are transfered to maya (as shading groups for example). If I load correctly saved animation (mx) into maya by xmesh, the only material is default lambert. There is no trace of additional shading groups or any distinction between sub-materials. Even with all needed channels selected in xmesh mx channels dialog.

Alembic works well in this case: Exporting object with multi/sub materials and importing abc file into maya creates shading groups with separate lambert material for each one. There you can set your colours to match your 3dsmax standard materials.

What is the best workflow 3dsmax --> maya with animated surfaces and multi-sub materials?
thanks,
nl


#2

XMesh does not recreate the Shaders (yet), although I had a test script that was writing out some 3dsMax, mental ray and V-Ray materials as Maya shaders. But it was just a Proof Of Concept.

What XMesh does is recreate Shading Groups from the Max Multi-Sub Materials.
If you look in Hypershade, under Shading Groups you will find one SG for each Max material exported.

For example, I created a Multi-Sub Material in Max with 6 different Standard materials, each with a different color, and assigned to a Box.
I then exported this to XMesh, and loaded it by running the content of the MEL file saved in the output folder.
I then created my own shaders in Maya, one for each Standard material in 3ds Max, and connected each Shading Group with each new shader.
As result, the XMesh in Maya displayed each side of the box with a different shader, just like the 3ds Max Multi-Sub Material.

You can probably write a MAXScript -> MEL or Python script that exports the relevant properties of the 3ds Max materials and creates shaders in Maya with similar settings. But that is not (currently) in the scope of XMesh, since there are a lot of shaders in Max and Maya that are totally incompatible.

Note that the information about the shading groups exported from 3ds Max is stored in the file with extension .matIDmap
In my case, its content looked like

[MaterialNames] 0=01 - Default 1=02 - Default 2=03 - Default 3=yellow 4=white 5=magenta 6=undefined

The relevant Shading Groups in Maya created by XMesh had the names
_01___DefaultSG
_02___DefaultSG
_03___DefaultSG
yellowSG
whiteSG
magentaSG

I believe that the 7th entry in the .matIDmap file is a bug since the Multi-Sub Material only had 6 sub-materials (as you can see from the names).
I only renamed the last 3 of the 6, the first 3 had default names.


#3

Forgot to mention:

If you pre-create Maya shaders with the same names as the ones listed in the .matIDmap file, and THEN you create the XMesh Loader, the Shading Groups created by the XMesh Loader will be connected to the existing shaders automatically.

For example, in a new scene I created a Lambert shader named “white”, another one named “magenta”, a third one named “yellow”, a fourth one named “_01__Default” etc. I set their Color attributes to the desired color values.
When I made the XMesh Loader, these shaders appeared on the mesh immediately.


#4

okay, thank you. I’ve made it - but it still is not that intuitive. One conclusion is to be very precise in 3dsmax materials naming and to keep names as easy as possible (without numbers to achieve mess while remapping mats in maya). I am sure that there are community scripts to automate the process.

By the way - xmesh my seem to be much slower in performance than mx. Is this normal?


#5

How could we improve this for you? I understand it would help you if we created a unique material for each shading group. Is there something else you’d prefer?

Where do you notice the difference? For example, when scrubbing the time slider?