first of all thank you for XMesh in Maya. This helps us a lot in our everyday production and it is the backbone of the geometry interchange between 3ds Max and Maya.
Right now I’m working on a workflow to interchange the material IDs between 3ds Max and Maya. From Maya to 3ds Max it works really nice. The parameter ‘materialIDMap’ on the ‘saveXMesh’-function in Maya allows us to recreate a exact copy of the geometry (poly mesh with material IDs and shading groups in a multi sub material) in 3ds Max.
Now I wanted to also set up the tools for bringing the material IDs from 3ds Max to Maya. Based on the multi sub material XMesh exports the material ID list, but it seems like Maya doesn’t load it. Is this not supported yet or do I oversee an option. Any help is highly appreciated!
Best regards,
Christian
Edit: We are using XMesh MY 0.4.2 in Maya 2012 and XMesh MX 1.0.2.46378 in 3ds Max 2012. I just saw that there has been a new version published for Maya which I will test now.
Okay, after downloading XMesh MY 0.4.3 my questions have been answered. Thank you for the update!
Best regards,
Christian
Edit: I had to realize that there was not a difference between the versions, but a problem with our naming since we skipped the underscore at the end of the material and material ID file name. Nevertheless my problem has been solved.
Here are some topics I encountered in recent days.
First some 3ds Max related ones:
[]In Maya is the ‘materialIDMap’-parameter of the ‘saveXMesh’-function very helpful. It would be quite handy to have the same parameter in 3ds Max so the shading groups are not derived from the assigned materials.[/]
[]Are there any news regarding an ‘export in worldspace’-parameter for the ‘SavePolymesh’-function in 3ds Max? Our current workaround is applying a worldspace-modifier to the object which works, but it would be nice if the function offers a parameter for this.[/]
Here are the Maya related topics:
[]It looks like there is a difference in the behavior of the shading groups depending on the XMesh files being loaded while a namespace is set or not. We are using customized importers which are looping over the XMesh files to import each of them. One of the importer just loads the files into the maya scene without further changes, the other importer sets a namespace before the files are loaded. While loading the XMesh files into an empty scene existing shading groups are reused. This is not the case if the files are loaded when a namespace is set. If this is the case a new shading group is created for every material of every file.[/]
[]A shading group is assigned to an object even if it is not used by it. This can be the case when a material is set in the multi sub material inside 3ds Max while the material ID is not used on the object. Here might be the ‘materialIDMap’-parameter during the export in 3ds Max helpful.[/]
[]I’m not sure if the last point is a problem with XMesh or not. For modeling in Maya we only want the poly mesh without the XMesh-Loader. As soon as the construction history is deleted on the transform-node the shading group assignment gets lost. A workaround is storing the shading group assignments, clearing them, deleting the construction history and restoring the shading group assingments.[/]
Let me know in case you need further explanation for one of the topics.
SetMaterialIDMapping <node>MeshNode <value>FromMaterialIDList <value>ToMaterialIDList
I suspect that, using this method and some scripting, one could write something equivalent to the materialIDMap parameter that we provide in Maya.
Do you think this command is sufficient for your needs?
Yes, this is on our wish list. We’ve done some work to improve our polymesh saving in 3ds Max, but we still need to expose it to maxscript.
Thank you for mentioning this! I will look into this problem.
I assume these extra shading groups are causing problems for you? Perhaps we could add an option to the 3ds Max XMesh Saver to avoid saving unused materials.
In the XMesh alpha, we included a command that would create a Maya polymesh from an xmesh file, without creating an XMesh Loader. I’ll try and see if this command would solve your problem.
It doesn’t really look like it does the job. The nice thing about the ‘materialIDMap’-parameter in XMesh MY is the ability to map a shading group to the Material ID. Right now XMesh MX uses the material names for the shading groups in Maya which works, but doesn’t make much sense since Maya uses a different names for the shading groups and the materials. As a workaround we are using the slot names in the multi sub material for naming the shading groups which is also not the best solution.
The problem is not the export of the Material from Max - we are using a blank multi sub material for the interchange, but the linking of the objects and shading groups in Maya. XMesh MY creates a shading group for every material ID in the multi sub material - which is fine, but every object is linked to all even if it only uses one of them. This is not really a problem, but a little bit annoying while handling the material and shading groups linked to an object, e.g. return all the materials used by an object.
Is there anything we could map the 3ds Max material names to in Maya that would make sense?
Or do you need some way to specify a mapping from 3ds Max material names (or IDs) to Maya shading group names? Or is there some alternative that I’ve missed?
From my point of view it makes the most sense that XMesh is mapping by default the material ID, material names and shading groups like it is doing right now. I don’t think there is another way to do this somehow reliable. On the other side as a pipeline TD I would like to completely customize the mapping. The ‘materialIDMap’-parameter how it is used in XMesh MY and which takes just a list of values is in my opinion the perfect solution. I would really like to see the same solution in XMesh MX.
I want to make sure that I understand. In Maya, we provide a materialIDMap parameter that lets you map from a material name in Maya to a material ID in 3ds Max. In 3ds Max, you want a materialIDMap parameter that lets you map from a material ID in 3ds Max to a material name in Maya, right?
Yeah, basically. In Maya the ‘rendering sets’, the names of the ‘shading groups’ are mapped to a material ID by the materialIDMap. It’s not the material itself. This is important since Maya makes here a differentiation. That’s also the reason why I would like to have the materialIDMap parameter in 3ds Max so I can build the name of the ‘shading group’ which will be used in Maya and map it to the material ID.