Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Export2Maya - Export Unity Scene to Maya Scene File

Discussion in 'Assets and Asset Store' started by Fishypants, Apr 23, 2014.

  1. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Hey Spookytooth3D,
    Terrains are being worked on, but my time is limited at the moment due to work schedules. Hopefully I can have something out soon. I know a lot of people have been asking for terrains so that is going to be my priority for the next release.
     
  2. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    @justifun - Looks like Unity Team finally accepted the update to Export2Maya, and it is now live. Let me know how it goes and if it works well in Unity 5 now.
     
  3. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    it's transfer normal map ? i'am not maya user but just for this tool why not
     
  4. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
  5. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Finally got the initial implementation of terrains working :) This was a bit tricky to convert to Maya. Now I need to figure out a clever way to implement the grass and trees. Also need to figure out how I can optimize it a bit to speed up the export process, because as it stands now it is a little slow:
    terrain-export-feature_01.jpg
     
  6. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Woah, ok. I may have found a way to speedup the entire export process DRAMATICALLY. I'm currently converting the entire exporter over to the new method. To put it into perspective, exporting a terrain at 512x512 resolution took about 2 min before. With the new method the entire terrain exported in less than 1 second.

    This is pretty big, and should speed up the entire export process by about 120x.
     
  7. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Alright so, I have it converted to the faster method. Terrain export is about 120x faster with the new method, and regular mesh export is about 3x faster with the new method. I was hoping for a faster standard mesh export, but I believe the longest part involved with exporting meshes out of Unity is building the Edge List that Maya needs. If Maya could read meshes the way Unity stores the data, it would be 120x faster for standard mesh export as well, but alas, it can't o_O Oh well, at least the export is a lot faster than what it used to be, which will be nice if you have very heavy scenes. :)
     
  8. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    that's cool for sure goz unity like :) another think's about duplicate object can be maybie import and replace by prefab for save memory space
     
  9. S-0-L-0

    S-0-L-0

    Joined:
    Nov 9, 2012
    Posts:
    163
    does this work with exporting UMA characters with PBR?
     
  10. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    @S.0.L.0.
    If the characters are skinned meshes, then not yet. Skinned mesh export is being worked on currently.
     
  11. a.aristidou

    a.aristidou

    Joined:
    Dec 7, 2013
    Posts:
    1
    Does this work for animated human characters? We want to export animated characters to FBX format.
     
  12. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Hey there, skinned meshes and animation is not currently supported unfortunately.
     
  13. rktumuluri

    rktumuluri

    Joined:
    May 30, 2015
    Posts:
    23
    Hello Fishypants,

    Firstly many thanks for your package "export2maya". I am trying to add "photo realistic render" to an Arch-Viz project in Unity3D. So, I am trying the route of getting Unity3D scene data into Maya and performing a "render" in it. (via iray, vray etc).

    My initial experiment with "export2maya" worked. But did'nt get any control over "viewpoints" (i.e camera). Any suggestions ?.

    In my Unity3D scene I tend to have several "viewpoints" (i.e camera locations). Would like to be able to expose them in "maya" and make appropriate renders.
     
  14. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Hey there rktumuluri,

    As of yet Export2Maya doesn't export cameras (I'm actually surprised I didn't put it in there yet), but I can add it to the list of improvements. It shouldn't be too difficult to add. Hopefully I can get something working soon.
     
  15. rktumuluri

    rktumuluri

    Joined:
    May 30, 2015
    Posts:
    23
    Thx Fishypants !. We are working on Arch-Viz area and consequently a "high quality render" is very valuable. We are trying to use the renderers in Maya. In the next phase the idea is to get this into a cloud based renderer directly.
     
  16. popMark

    popMark

    Joined:
    Apr 14, 2013
    Posts:
    114
    Hi @Fishypants
    Any word on exporting animation curves for a camera fly through?
     
  17. bamncan

    bamncan

    Joined:
    Dec 15, 2013
    Posts:
    47
    Could this work with exporting a shader that was created by Shader Forge possibly?
     
  18. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Hey everyone,

    Just wanted to let you know that after about a year long hiatus with crazy work schedules, I am finally able to start back on this and update it.

    @popMark - will work to get that out asap.
    @bamncan - it could, possibly, as long as the naming conventions are consistent between all shaders that Shader Forge exports. I will look into it.
     
    popMark likes this.
  19. midnite8177

    midnite8177

    Joined:
    Jun 22, 2013
    Posts:
    1
    Fishypants - thank you for making this tool. I hope you get a chance to add the SkinnedMesh support it would make my life a lot easier. Also, I made a couple tweaks to Export2Maya to support my setup. I generate my Texture2Ds at runtime so I needed a way to get them on my meshes, here are my changes.

    First in GetTextureName I added:
    if( string.IsNullOrEmpty( localPath ) ) {
    return t.name + ".png";
    }


    Then I changed the code where textures were being written to disk, by first checking to see if the SourcePath existed as a file, and if it didn't I do:
    var unityTexture = (Texture2D)MayaTextures[ i ].UnityTexture;
    var tex = new Texture2D( unityTexture.width, unityTexture.height );
    tex.SetPixels32( unityTexture.GetPixels32() );
    tex.Apply( false );
    File.WriteAllBytes( MayaTextures[ i ].DestinationPath, tex.EncodeToPNG() );

    That makes it so my generated textures will get exported to file.
     
  20. bamncan

    bamncan

    Joined:
    Dec 15, 2013
    Posts:
    47
    Thanks, let me know your findings :D
     
  21. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Export2Maya_and_Export2FBX_poster_02.jpg
    First off, apologies for the long delay in updates. Last year was ... insane. Work deadlines left me with almost no time to work on Export2Maya nor have any free time. But the dark ages are over, and I am excited about some updates and wanted to share what I have been working on non-stop for the past month or so:

    Export2FBX:
    This will most likely be a separate product, but has been developed in tandem with Export2Maya, so almost all the features of Export2Maya will be available. There are some caveats due to the FBX File format, but for users who do not use Maya, or simply wish to export to the FBX File Format instead, this will be a win.

    Skinned Mesh Export:
    Finally! I was able to work out how to correctly convert transform matrices from Unity to Maya, meaning skinned mesh renderer export is now possible. The only caveat is with how Unity stores bind poses. Basically it destroys them upon import meaning as of now, there is no way to recover them and no way to export them. This is a bummer, and I am in talks with Unity Team to see how to remedy this.

    Terrain Export:
    Terrains will now export, along with textures and splat maps. Splat maps will be broken out into separate black and white texture maps for easier use and compatibility across applications.

    BlendShape Export:
    Mesh Blendshapes are exporting correctly. Single frame and multi frame blendshapes are supported.

    Camera Export:
    Camera export is now supported. I would say this feature is still in beta because the formula I am using I am not 100% sure about. It looks right, but I haven't completely tested it yet to know 100% sure that it will work in all use cases.

    Expanded Texture Map Export:
    Export2Maya originally was only able to detect the Albedo Map texture on Standard Unity materials. The following material texture maps will now be recognized and exported:
    • Albedo Map
    • Specular Map
    • Normal Map
    • Emission Map Export

    10-20% Faster:
    After stress testing the file write operations, I decided to rewrite it which yielded dramatic speed improvements. People exporting huge scene files should notice a huge difference.


    As of now, animations are still on the TODO list, as well as better custom shader export. I would like to clean up the exporters in their current state and release an update finally, with animation support following shortly afterwards. I don't have an exact estimate of when it will be released, but know that I am crunching on it every day now so hopefully very soon.
     
    Last edited: Mar 16, 2016
  22. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    @bamncan - Trying to find information about ShaderForge shaders, but not finding what I need. From what I understand, ShaderForge actually generates .shader files, right? Would it be possible for you to make an example shader and PM it to me so I can take a look at how they name their shader properties?
     
  23. bamncan

    bamncan

    Joined:
    Dec 15, 2013
    Posts:
    47
    Done
     
  24. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    @ bamcan -

    Hmmm so looking at the shader, the shader has the following properties:

    _LitTexture
    _Normal
    _DarkTexture
    _Hue
    _OutlineWidth
    _OutlineColor
    _Glossiness


    The _LitTexture, _DarkTexture, and _Normal are all non-standard shader property names, so Export2Maya will not know what those are unfortunately.

    I really wish that Unity would either enforce standard naming conventions on shader property names, or offer users a way to reliably tell what the shader property is used for. Right now as it stands, someone who writes a shader can call each property ANYTHING, with no rules or guidelines on what the property names should be.

    So for example, I could instruct Export2Maya to catch those names, but that will only work for that particular shader. If someone else wrote a shader that had a property name called _litTexture, that would break. Instead of _LitTexture, if they call it _MainTexture, or _Texture, that would break as well.

    It's pretty much impossible to tell what the property names are unless the shader author adheres to the standard naming convention, because the names could literally be anything the shader author wants.
     
  25. bamncan

    bamncan

    Joined:
    Dec 15, 2013
    Posts:
    47
    Personally, I would rather Unity adopt the newer shader coding instead of obsolete shader code.
     
  26. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Export2Maya_2.2.0_Logo.jpg Good news, Export2Maya 2.2.0 is ready. I'm updating the documentation right now and doing last minute checks on it before submitting the update to the asset store. Thanks so much for your guys patience while getting this new version out. Here is the new feature list:

    What’s New – Export2Maya 2.2.0
    Export2Maya Completely Re-Written from the ground up
    Overall speed increases 2x – 5x faster​
    Standard Mesh Export
    New Mesh Edge Generation - 3x faster!
    Using StringBuilder to build strings of edges
    Using List.BinarySearch for speed improvements​
    Skinned Mesh Export
    Same features as Standard Mesh Export​
    Blendshapes
    Single Frame Blendshape Support
    Multi-Frame Blendshape Support​
    Material Export
    Added support for the following standard material properties:
    _MainTex
    _SpecGlossMap
    _BumpMap
    _EmissionMap​
    Lights Export
    Directional Light Export
    Point Light Export
    Spot Light Export
    Area Light Export​
    Terrain Export
    Standard Terrain Mesh Export
    Standard Terrain UV Export
    Standard Terrain Secondary UV Export
    Standard Terrain Textures Export
    Standard Terrain Splatmaps Export​
    Camera Export
    This feature is currently in beta, as I feel it still isn’t 100% there yet
    The skinned mesh export and terrain export were quite difficult, and took quite a while to understand and to export correctly. Because of this, I feel that the price of Export2Maya will go up to reflect the new features that have been added. If you already own Export2Maya, then as usual the updates will be free of charge :) If you do not, then I would recommend getting it before the update goes live that way you get locked in at the lower price.

     
  27. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Hey everyone! Export2Maya 2.2.0 Just went live. As usual, if you run into any issues or bugs please email me and let me know.
    Export2Maya_2.2.0_banner.jpg
    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.
     
  28. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Just submitted a new version to the Asset Store. Small bug fix:
    Version 2.2.1 - Fixed a bug when GameObjects have no MeshRenderer component attached.

    Should be live soon. If anyone finds any more bugs please let me know so I can get them fixed. Cheers!
     
  29. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Ok, ver 2.2.1 is now live! :)
     
  30. ShamanUY

    ShamanUY

    Joined:
    Sep 23, 2014
    Posts:
    6
    Hi there,

    Is ExportToMaya able to export the geometry generated by a ParticleSystem?

    I am currently using Fluvio to generate fluids and I need the fluids to be exported to Maya.

    Thanks and congratulations on this asset.
     
  31. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Hey ShamanUY,

    Currently Export2Maya does not consider particle systems, although this shouldn't be too difficult to add. I'm not too familiar with Fluvio, is it generating a water surface mesh, or is it instancing geometry to particles? If it is generating a standard mesh then Export2Maya should grab it, but if it is instanced geometry then that feature will have to be added.
     
  32. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Some Exciting News!
    I just found out that the Asset Store will be featuring Export2Maya during it's 24 Hour Sale! If you are looking to get Export2Maya, don't miss your chance to grab it at 60% off! Details about the sale are as follows:
    • Date: June 27 2016, 3pm CET
    • Regular price: $60
    • Discounted price: $35
     
  33. primitiveType

    primitiveType

    Joined:
    Oct 25, 2012
    Posts:
    22
    Is there any chance that realtime support might be added in the future? I know that's unusual, but I need the ability to take the current scene during runtime and convert it to maya ascii, so that my server can render an image in the background while the user waits for it.
     
  34. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    @primitiveType - Could you describe a bit more about what you are trying to accomplish? Note that the export process, depending on scene complexity could take a while to complete. It really depends on how much data is in your Unity file. Small simple scenes should be fast to export, but more complicated ones with heavy meshes will definitely take longer and wouldn't be real time.

    I think more info might help, feel free to respond in the forum or send me a PM.
     
  35. olkeencole

    olkeencole

    Joined:
    Oct 2, 2009
    Posts:
    17
    This plugin looks amazing, man! You don't by any chance have any documentation of it online do you? I work for a university studio and we are trying to be a bit more selective when we buy assets on the asset store, although yours your asset looks great in every way. Please keep it up. :)

    Incidentally, you don't by any chance have any advice on where to start learning MEL scripting, would you?
     
  36. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    @olkeencole - I don't currently have the documentation online (although thats a great idea) but I can email it to you if you'd like. PM me your email and I will send it your way.

    As far was learning MEL scripting goes, MEL Scripting for Maya Animators and Complete Maya Programming: An Extensive Guide to MEL and C++ API are excellent sources to start learning MEL Script. Ironically if you are at all familiar with Java (not Javascript) Programming, you already know 98% of MEL. There's a few differences when it comes to concatenating strings (java uses periods "." where MEL uses pluses "+") but other than that the two languages are very very similar.

    I've been using Maya for the past 15 years professionally in the VFX industry so if you have any questions I can offer assistance. PM me any questions you have.
     
  37. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Hey everyone! Sorry about the delay but it appears that Export2Maya is now live in the 24 Hour Sale! If you were thinking about getting Export2Maya, now is a good time, as it is 42% off!
     
  38. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Using this workflow, the lightmap textures that are exported from Maya are then used in Unity as a shared texture atlas for all the geometry in the scene, and Enlighten is basically turned off, e.g. no bake, no pre-compute, no IBL, etc.?
     
  39. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    buttmatrix likes this.
  40. primitiveType

    primitiveType

    Joined:
    Oct 25, 2012
    Posts:
    22
    Sure. I am working on an editor of sorts, and would like users to be able to render their work in maya once they are ready. We have all of this working, but currently we have to manually write the maya ascii ourselves, and recent changes/additions to our dataset are causing that to prove cumbersome. I'd basically like to have every active mesh in the scene at runtime be converted to maya ascii. Time isn't a huge issue - the user can be expected to wait 10s or so. And furthermore, our scenes contain pretty basic meshes. Honestly they are mostly textured quads. There can be, say, hundreds of them worst-case. 95% of those will be quads, the rest will be relatively simple meshes. I just need it to generate the ascii so I can post it to our render server
     
  41. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    @primitiveType - Yeah this should be possible. I haven't tested it yet in game to confirm if it would work, but theoretically I could modify the exporter to recieve a list of gameObjects, instead of building a list from the active selection, which should do what you are asking. Let me run a few tests.
     
  42. AlbertTJames

    AlbertTJames

    Joined:
    Jun 29, 2016
    Posts:
    1
    60$.. what a great way to thank the open source community. Well done !
     
  43. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    On export, I always seem to get a few meshes that are white in maya, though textures are attached correctly in shader. Separating the offending meshes and recombining them makes the material read correctly in viewport. I also get meshes that import with no shading group attached (so they read green in viewport.) Easier fix by just assigning the correct materials to them, but Im wondering if anyone is seeing this issue or if it's something that is wrong in the unity project? (wouldnt think so, its pretty simple setup with mobile/diffuse mats.)

    One thing I would absolutely love would be to also have the export of colliders set up on the meshes (maybe as a toggle on export, so I could export just the scene geometry, and then just the colliders as a separate file?
     
  44. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    @Autarkis - Thats strange indeed, if you have an example mesh that is not exporting correctly, could you create a unity package and pm it to me so I can take a look?

    The colliders exporting separately could be useful, I will take a look.
     
  45. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    Sending you a link on PM.
    Another request would be to allow .mlt as an export format? I mean.. this is just me being lazy, so I don't have to resave the .ma files as .mlt ;)
     
  46. primitiveType

    primitiveType

    Joined:
    Oct 25, 2012
    Posts:
    22
    Any luck with this?
     
  47. mikkermik

    mikkermik

    Joined:
    Sep 10, 2016
    Posts:
    1
    We recently purchased Export2Maya for a large project. We need to export an entire level with textures, but the tool doesn't appear to work correctly:
    1) None of the materials are attached to any meshes
    2) The meshes and lights are not in the correct locations

    I've created a Camtasia video to show the basic issues:
    https://www.dropbox.com/s/eu4ikcnvgqsyvno/Export2Maya_Problem.mp4?dl=0

    We're using Unity 5.4.0f3.

    Any help would be greatly appreciated!

    -Mike
     
    Last edited: Sep 10, 2016
  48. NO1467

    NO1467

    Joined:
    Sep 13, 2016
    Posts:
    3
    Excuse me!
    I am a novice, there is a problem when using Export2Maya export fang binxing. Caused by a lack of experience in the hope to be able to get more information.
    After export model in Maya2013 figure as below:

    Any help would be appreciated!
     
  49. NO1467

    NO1467

    Joined:
    Sep 13, 2016
    Posts:
    3
    I'm sorry picture can't show!
    I can only approximate description.
    Export model in Maya like a thread. Looks very bad. See it I the whole people are very bad.
     
  50. NO1467

    NO1467

    Joined:
    Sep 13, 2016
    Posts:
    3
    Excuse me!
    Bring skinned Mesh renderer object is unable to export steps?
    I with skinned Mesh renderer objects are derived with a problem!
    Only simple without any animation model!