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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Exporting Model from Maya to Unity, and vice versa

Discussion in 'General Discussion' started by plaisime5651, Feb 17, 2016.

  1. plaisime5651

    plaisime5651

    Joined:
    Dec 4, 2015
    Posts:
    9
    I was wondering if someone could ellaborate how exporting models from maya to the unity game engine. Also I was curious if there was away to export assets or 3d primitive from unity and bring into maya.
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,510
    Pretty ballsy move to post a LMGTFY as your introductory post. No reason to think this won't be a valuable member of the community.

    @plaisime5651, exporting models is a process, the specifics of which will depend on what kind of model you're exporting, if you're doing anything with it after Maya (like texturing, rigging, or animating in another program), and if you want to continue working on the model or not.

    If you have Maya installed on the machine you're running Unity with, you can drag the Maya project file (not sure what the extension is) right into your Assets folder and Unity will import it for you. For production work, you'll want to export as FBX or OBJ. I honestly don't know the difference, but I always use FBX.

    There's no way to export primitives into Maya that I know of. The only reason I could think you'd want to do so is to get an idea of scale. Instead, create a primitive cube in Maya, export it and import it into Unity, and compare its size with a Unity primitive cube. Use that comparison to adjust your models' sizes in Maya accordingly.
     
    Teila and Ryiah like this.
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,141
    It's .MB for Maya Binary scene files and .MA for Maya Ascii scene files.
     
  4. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,327
    In unity it is very easy to scan through entire scene and read object transform data and mesh data.

    The data can then be used to build an *.obj or *.fbx file.

    Said file can then be imported into maya.

    Alternatively, you could write it into some sort sort of custom file format and then write maya importer for that file format. (unless autodesk went nuts and disable ability to import files/make import plugins-).

    So, it can absolutely be done in either direction, the thing is unity-->maya solution might not be already available and in that case you'll need to write it.
     
  5. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,510
    Which is what I should have said, since with programming, almost anything can be done. However, for someone asking how to export from Maya, my assumption was a fairly entry-level user, and my answer was given with that in mind.

    I can't think of why you would want to export a model from Unity anyway, other than comparing scales. If it's an imported model from the Asset Store or something, you can just import that model directly into Maya anyway. I guess if it was a generated model through some script, but most modelling apps have some type of scripting language built in.
     
  6. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,327
    Migrating a level to a different engine.
     
    TheTrueBenjamin likes this.
  7. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,511
    This would probably be ideal only if you don't have the source art assets to work with. Otherwise, there's no reason to do it this way, and should probably be seen as a last resort. Ideally, the project would have had an existing asset autobuild pipeline in place, and this would be the point that you would modify to get into the new engine.
     
  8. Deleted User

    Deleted User

    Guest

    Common practice to prototype / export from editor and add detail in a DCC..
     
    zombiegorilla likes this.
  9. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,327
    Both Unreal and Unity want you to grab many models/assets and build a level out of them in the scene editor. It is also the preferred way to do it, since you can instantly test gameplay/etc. And when you need to migrate THAT, you'll need export tool. It is not a very good idea to make entire level in maya/blender/whatever since hte beginning... you know - recreate scene, materials, transfer light settings, etc.
     
    McMayhem likes this.
  10. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,986
    I use this a lot : http://wiki.unity3d.com/index.php?title=ObjExporter
    (Oddly, for as old as it is, it still works fine )

    I do like @ShadowK mentioned. I often slap something together in editor with primitives / prototype meshes, then when it is all worked out, export and refine / recreate the final art.
     
    zyonneo, Kiwasi and (deleted member) like this.
  11. ThreeMusketeers

    ThreeMusketeers

    Joined:
    Feb 17, 2016
    Posts:
    7
    No idea why you wasted your time explaining that-the answer was in the LMGTFY. People who need a lmgtfy need a lmgtfy.
     
  12. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Same reason we didn't give you a lmgtfy on your first thread.
     
  13. ThreeMusketeers

    ThreeMusketeers

    Joined:
    Feb 17, 2016
    Posts:
    7
    Did you read the title? I wanted it *free*

    I had googled it, no luck. You had to pay. I'm now using Bitbucket.
     
  14. delinx32

    delinx32

    Joined:
    Apr 20, 2012
    Posts:
    417
    Maybe just contribute to some threads and build a rep as a decent guy/girl before starting with the lmgtfy stuff. If @BoredMormon did it then no one would have blinked an eye, but he has 7000 posts and a rep for helping people and contributing to discussions.

    Doing it with your first post just comes off as crass, and not the cool anarcho punk band from the 70s kind.
     
    aer0ace, Ryiah, Schneider21 and 2 others like this.
  15. plaisime5651

    plaisime5651

    Joined:
    Dec 4, 2015
    Posts:
    9
    The reason why I'm asking, is because I want to known how big I need to make object in maya. I also have another question concerning models with rigged. Can a rigged model be scaled to size on unity.
     
  16. zyonneo

    zyonneo

    Joined:
    Apr 13, 2018
    Posts:
    386
    I added a .obj file into unity.Dragged and dropped in hierarchy.Then added a material and changed its rotation.Now I exported as .obj file using 'EditorObjExporter' .When I checked its material is missing.Why?
     
  17. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    @zyonneo

    It's an old thread. Be sure to check the time stamp at bottom of last post.

    You are saying you exported a model from unity to maya as obj? OBJ won't carry the material with it. FBX carries the material, but I think in maya what will happen is it gos to default lambert and assigns the albedo texture.

    ALso be sure in maya you have hardware texturing turned on (press 6)
     
  18. zyonneo

    zyonneo

    Joined:
    Apr 13, 2018
    Posts:
    386
    I dont want to export to maya.I dont have maya.From unity is it possible to apply texture and material as .obj files.Later looking to convert to USDZ file
     
  19. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    you are asking how to apply materials and textures to a model in unity? if so, just google. Not trying to be a dick but this is 101 stuff that will appear easily and you'll find countless videos, documentation, and whatever else you need to understand how to do that.

    While you're at it, check out the unity learn section. Many beginner friendly tutorials that will show you stuff like this.
     
    Antypodish likes this.
  20. zyonneo

    zyonneo

    Joined:
    Apr 13, 2018
    Posts:
    386
    Hello BigTimeMaster my doubt was is it possible to export using Unity since I dont have maya as .OBJ files itself(along with animation and textures).From what I understand .obj files dont have animations and materials.Need to export as FBX.
     
  21. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    you can use the obj. Just google "apply materials to model in unity"
     
  22. zyonneo

    zyonneo

    Joined:
    Apr 13, 2018
    Posts:
    386
  23. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    you set the materials within unity. Just drag and drop more or less. Setting the materials in an external program and transferring via fbx is just an unnecessary convenience. There is some workflow benefits but it's more advanced stuff that won't matter right now.

    All you got to do is drag and drop your materials onto the model in scene view or hierarchy. THen you can make a prefab too.
     
  24. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,584
    Besides necroing, why you writing in this thread then, if thread is Maya related?
    Please create separate thread, which describes detailed problem, including what software you are using and how you create and export models.
     
  25. zyonneo

    zyonneo

    Joined:
    Apr 13, 2018
    Posts:
    386
    My question was towards zombiegorilla.I tried his solution given above (added a model with materials) and ended up without having materials.I asked a simple Why?