Export2Maya - Export Unity Scene to Maya Scene File

Export2Maya will export your Unity scene to the Maya Ascii file format, generating Maya scene files for you.

Asset store link:

Ver 2.2.0 supports the following:

  • Rewritten from the ground up
  • New Edge Generation Method - 3x faster
  • Skinned Mesh Export *
  • Blendshape Export - Single & Multi Frame
  • Mesh Normals
  • Mesh UVs
  • Mesh Lightmap UVs (with correct tiling and offset)
  • Mesh Vertex Colors
  • Per-Object and Per-Face Material Assignment
  • Terrain Export *
  • Directional Light Export
  • Point Light Export
  • Spot Light Export
  • Area Light Export
  • Display Layer Lightmap Association. Objects that share the same lightmap index will be grouped under different display layers for easy selection in Maya.
  • Includes accompanying Maya MEL script for easy scene setup once inside Maya.

Note - Skinned Mesh bind poses cannot be exported currently due to limitations in the way Unity stores bind poses for skinned meshes.
Note - Terrain detail meshes and grass are not currently supported yet. Planned for next version.
Note - Texture Export relies on your shader having standard named shader properties. Supported properties: _MainTex, _SpecGlossMap, _BumpMap, and _EmissionMap.

Screenshots:

1602636--96842--$a2d10eb0-52ab-47fd-b52e-4783b3dad677_scaled.jpg 1602636--96843--$23d64d15-804a-4b42-a689-62041f7ff48b_scaled.jpg
1602636--96843--$23d64d15-804a-4b42-a689-62041f7ff48b_scaled.jpg1602636--96844--$49989fc3-4c82-49dd-964d-1d3273f57e1a_scaled.jpg

As always if you find a bug, or have a suggestion to make this tool better, do not hesitate to contact me.

1 Like

Great that this has been released! I was reading the WIP thread every day for updates.

Something else I’d like support for is animations, I have an animated camera in my unity scene and I’d like to export that animation so I can render a video of it in maya.

@popMark - Ya know, I didn’t even think about animated cameras. This should be very easy to do, I’ll put it on the to do list.

Fishypants, will this export out Marmoset shaders correctly? Also any plans to add light exports? I’ve already setup a lot of lights in my unity scene, and it would suck to set those up again in Maya.

@Psychon - I have not used Marmoset yet, so I do not know how their shaders are setup. If they define their shader properties following Unity’s shader naming convention ( ie - they define _MainTex ) then it should grab the textures ok. If not then the shader itself will be exported but the textures will not. I’m currently working on a way to map which properties of your Unity shaders map to which properties of the Maya shaders. I’m hoping to have this done relatively soon.

Lights are added to the list of things to implement. I would say next version will include terrain export, lights, and cameras with animation data. With a follow up release with skinned mesh support and the improved texture export.

Thanks for the reply. Looking forward to next release.

Hi! Does this mean, that I can export my scene into Maya, render lightmaps to texture, save them back into Unity and go on. I.e., no additional work with unwrapping, atlasing and e.t.c?

@RyuMaster - Yes, this sort of workflow is possible, but keep in mind there will be some setup involved once inside Maya.

For example, if your mesh has lightmap UVs inside Unity then the UVs of your exported meshes will have a secondary “lightmap” UV set once you load them into Maya, which you can use to bake to (both Mental Ray and VRay support baking to alternate UVs). I would highly recommend VRay for baking lightmaps as you can create a render element of just the light data (which is what a lightmap is) which you can plug back into Unity. The only catch at the moment is there is no easy way to select all the objects that belong to each lightmap. (you would basically have to do it by hand, which can be tedious). You would have to select all the objects that belong to each lightmap, combine them, then bake to the lightmap uvset of the combined mesh. This will generate a lightmap texture that you can plug directly back into Unity and everything will line up correctly.

For the second release of Export2Maya, I am thinking of having the exporter group all the meshes of each lightmap under different display layers for easy selection inside Maya. Layers are nice because you can easily select the objects that belong to the layer and you don’t need to touch the object hierarchy.

If you are looking to use Export2Maya to bake lightmaps, I would recommend waiting until the new features are added, as it will make your life a lot easier.

Thank you a lot for the reply. Then I’ll bookmark this asset, and buy it immediately once light mapping workflow is ready.

So just to keep everyone updated, I have been taking notes on features that people are requesting. I can’t promise all of these in the next release (as I would like to have regular updates instead of waiting a long time for a massive update), but this is the official list of things that I will be adding at some point, sorted by whats most likely going to be included first:

Better Texture Export Technique: Better way to map custom shader attributes to Maya attributes.
Better Renaming Method using DG Paths: Right now it looks at any name and if there is a conflict it renames it, but this will mimic Maya’s rename functionality better.
Layers for Lightmap Grouping: This will make it easy to select which objects belong to which lightmap set in Maya, and make baking lightmaps in Mental Ray or Vray a LOT easier.
Lights Export: For relighting inside Maya.
Option to export objects as instances or meshes: Exporting each object as a unique mesh can be memory intensive. This will allow you to export meshes as instances.
Animation Export: Going to look at getting animation curve data exporting so your animations come across as well.
Terrain Export
Skinned Mesh Export

As more features are added I will push out updated versions of the exporter :smile:

It would be also nice to have “Update” export. For the large scene, it might take several hours to export now. So, say if I add some new object later, of transform current one, it would be good to update only those two, without re-exporting whole scene again.

@RyuMaster - Hmmm, interesting idea. Could be very tricky to try to implement, but I will look into it. In the meantime as a workaround you could always select the new object and export it by itself. Even if it is parented under other objects, all the transforms of its parents will be exported as well so the object will line up in the same position. Then it would just be a matter of parenting the newly exported object to the old object in Maya and it should line up.

I do like the idea though of a simple “Update Scene” function. I’ll see if I can come up with something for that.

Been working on getting the lightmap workflow working with Export2Maya. Right now, it finds what lightmap index each object is assigned to, and creates a display layer inside Maya for easy selection and baking. Testing out generating lightmaps inside Maya using Vray. So far the results are working pretty well. Need to tweak a couple things as you can see a few objects didn’t get mapped correctly, but it has to do with how the objects are assigned to the layers. I will get this fixed then push out a new version of Export2Maya.

Screenshots! These were taken inside Unity, and all the lightmaps were generated inside Maya using Vray:


1 Like

Alright, got the lightmap quirk fixed. Also wrote an accompanying MEL script for use inside Maya that will convert your exported scene into a lightmap-ready bake scene. Haven’t run into any issues yet, so I will add the Lightmap Baking Workflow to the Export2Maya documentation and upload the new version.

Some more screens! I was impressed with how well Vray handled the Angry Bots scene. There is only 1 directional sun light and 1 sky light, the rest of the lighting is coming from the emissive materials.





Ver 1.0.1 is Released. Small update but includes the following:

Display Layer Creation - Display layers will be created for each lightmap texture in your Unity scene, and all the objects that use that lightmap texture will be linked to the display layer. This makes it easy to select and combine objects that all belong to the same lightmap texture.

Export2Maya.mel - Maya MEL script that will combine all the objects in your Maya scene for you based on the display layers it finds. Basically open your Maya file and run it and you will have a couple objects ready to bake lightmap textures to.

HI Fishypants,

I just bought Export2Maya and ran into a slight issue. I’m using the skyshop and shaderforge shaders and they export out as gray blinn materials. For my skyshop materials I’m doing things slightly differently where I’m not using a texture, instead I’m just using the diffuse color picker. On the other hand the shaderforge material does have a texture but that doesn’t work as well. Is there any chance you could add support for these?

@Psychon - Your problem sounds like Skyshop and Shaderforge use different shader attribute names than the standard Unity attribute names in the shaders. Export2Maya will look for the attribute _MainTex in the shader, and it uses this attribute to figure out what texture should be plugged into the Color attribute in the Maya shader.

This works great when people write their shaders to use the standard Unity shader attribute names, but when they don’t it becomes tricky trying to figure out what texture goes where.

For example, say one shader is written to use BaseColor as the main texture. Another uses CustomColor. Another uses Color. Since Unity lets you name your attributes any way you want, trying to guess at what attribute goes where becomes almost impossible.

My initial reaction was to get all these separate Unity tools and see how they are setting up their shaders and what their attributes are named, but I don’t think this is the best solution. This still wouldn’t solve the issue of any custom shaders people write, and if those Unity tools ever change, it will break Export2Maya and will need to constantly be updated.

I am thinking a better solution would be to create a shader definition file, so an additional tool inside Export2Maya that would look at all the shaders in your project and create a list. Then in the list you could select the shaders one at a time and map their attributes to the Maya shader attributes. This way whenever Export2Maya encounters a shader, it would look it up in the shader definition file and know which attributes to plug the textures into.

This is the best method I have been able to come up with at the moment. If anyone has any other suggestions I would be open to trying them out. It would be annoying to have to go through each shader and map it, but it would only have to be done once, then Export2Maya would know how to export the shader correctly.

I have been working on this shader attribute mapper since I finished up the lightmapping workflow, so hopefully I can get something out soon.

Hello Fishypants,

I just wanted to thank you for this tool. We needed to export the scenes so the art team could start fitting stuff into the level, so it was either creating a tool from scratch or using something that works properly.

Your tool worked like a charm, I hope you can continue updating the tool and we’ll definitely recommend it.

JP

@loko08 - Very glad to hear that Export2Maya is helping you guys out!:smile:

I am always working on it, and it will be continuously updated. Also if you have any ideas or feature requests let me know and I will add it to the list. I would like to make this tool as robust as possible. Cheers!

1 Like

Hello Fishypants, we are having a little issue with the scaling, it seems like on MayaLT2015. After exporting the scene, the scaling (using 1 meter on maya and 1 unit on Unity3D) need to be set to 0.85 in order for the scaling to fit.

Is this a bug?? or intended?

Thanks in advance