Search Unity

Pros and Cons of different 3D model formats. FBX, DAE, ect.

Discussion in 'Asset Importing & Exporting' started by Thedudely, Jul 28, 2015.

?

Which file type(s) do you use for most, if not all of your models and why?

  1. FBX

    74.4%
  2. OBJ

    14.9%
  3. DAE

    11.4%
  4. BLEND

    11.6%
  5. Other. (Please elaborate in comments.)

    3.5%
Multiple votes are allowed.
  1. Thedudely

    Thedudely

    Joined:
    May 11, 2013
    Posts:
    2
    So I've seen one or two threads on which file type people should use and most people have said to use FBX. Well I did some testing on a simple model from Google Sketch Up which revealed that out of all the file type I tested (OBJ, DAE, and FBX) that FBX had the biggest file size followed by DAE and then OBJ with the smallest file size. I then converted all these files into FBX using auto desk FBX converter 2013 (because someone told me that Unity just converts non-FBX files into FBX anyway.) Now the results showed that the OBJ file that was converted to FBX was still smaller than the other formats converted to FBX (how ever the standard OBJ file was still the smallest.) Note that this was a small, texture-less, simple model exported from Sketch Up. I also noticed that FBX had scaling issues when imported into Unity. All of them. Even the ones that were other file types then converted to FBX. However, when I took the OBJ file and converted it to FBX via Blender it worker flawlessly, unlike the OBJ to FBX via FBX converter. This all got very confusing but I walked away thinking there must be some reason everyone recommends FBX. (Unless everyone uses FBX because everyone's been told to use FBX...) So anyway, why does everyone use FBX and what are it's advantages? I know OBJ must have some disadvantages, but so far it's worked the best for me. What are the pros and cons of any relevant file types for that matter? What do any of them do differently? TLDR: What distinguishes the different file types? What makes some better for some things and some better for others? Is one just better than all of them in every way, if so then why?

    Actual TLDR: What do different 3D model formats do differently? What are there pros and cons of each one?
     

    Attached Files:

  2. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    I use FBX because its so universal. Fbx can be a clunky experience between different versions of its SDK though. Obj doesn't support animation which is likely why you are seeing smaller file sizes. Its fine for static models although if you need a second UV set you will want FBX. Can't speak for .collada sorry. Never used it.
     
    Thedudely likes this.
  3. Teo

    Teo

    Joined:
    Oct 31, 2009
    Posts:
    564
    OBJ can't store any kind of animation or anything defined.

    FBX is an exchange format for Autodesk apps, while DAE is for a true general usage. For both FBX,DAE, almost nobody respect full specification, either exporter, either imported. And we all know results.
     
    Thedudely likes this.
  4. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    FBX and Collada DAE are both full scene formats, there's no point in comparing them with obj.

    I avoid anything that only exports DAE, it's buggy and unpredictable. Sony started it, then abandoned it to open source caretakers, who then made "bits" of it commercial IIRC. Some people have issues with FBX, but when it's supported correctly it's extremely reliable. I'm not saying don't use DAE, I'm just saying I've developed a habit of avoiding it through bad experiences. I simply trust FBX more, and some of that comes from integrating both SDKs into proprietary software engines.

    That doesn't mean don't use obj, but don't always put FBX (or DAE) over it. It's still useful and simpler to transport, but it has additional limitations such as no vertex color support in the standard definition (there's an enhanced definition, but fragmentation).

    Re: File sizes, don't read "smaller is better". FBX and Collada in ascii are both xml formats. The larger file may be saving more information, or just using longer labels. Obj only stores geometry information and is natively a binary format. None of which matters inside Unity anyway, because all the data you use is imported to Unity's native format.

    But there is no silver bullet, as @Teo points out, everyone supports file formats to varying levels of competence, and both FBX and DAE are extremely complex formats. The "professional" level of the software doesn't always mean one thing or another either (Modo has very inconsistent FBX support for instance because of the way it's scene data is represented internally)... use what is best supported by the software you're using, both in Export at one end and Import at the other.
     
    Last edited: Jul 28, 2015
    SametJR, OllyNicholson and Thedudely like this.
  5. hammer

    hammer

    Joined:
    Jul 11, 2012
    Posts:
    62
    There is no SDK for reading/writing DAE files. That's why there are so many buggy interpretations of it.

    FBX has a SDK, so everybody reads and writes FBX files the same way. But, it's not open-source like DAE.
     
  6. Teo

    Teo

    Joined:
    Oct 31, 2009
    Posts:
    564
    DAE is just an XML file. Is not hard to read/write, if you fallow the Collada specifications, is relative easy to use it.

    But, FBX is other story, indeed comes with SDK, the problem is that FBX wasn't designer for a true exchange format, was designed for exchange between Autodesk apps, and contains a lot of Autodesk specific data. That's some times really difficult to extract what you need from it.
     
  7. hammer

    hammer

    Joined:
    Jul 11, 2012
    Posts:
    62
    I disagree. FBX has history, it wasn't "designed" for Autodesk products.
    https://en.wikipedia.org/wiki/FBX

    It has several bits of technology in it. Filmbox, Motionbuilder, 3dsmax, Maya, etc...

    The most important fact is that it has a SDK. A single SDK that everybody uses. There are no wrong interpretations of the format. Consistency makes life a whole lot easier. These are things the DAE implementors did not understand.

    The only negative I see is that it's closed source.
     
    Last edited: Aug 14, 2015
    tachyon-particle likes this.
  8. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Short version : Use Fbx with Autodesk DCM.

    Fbx : Use this for skinned meshes - static meshes with vertex colors. Best DCM are pricey and come from Autodesk, other DCM may or may not work.

    Obj: Use this for transfer static meshes between programs for retopo / normal baking. Every DCM supports it. Does not support skinned meshes or vertex colors.

    DAE : Do not bother, it is a waste of time and money.

    File sizes become irrelevant for the final build, since the models regardless their format are converted into unity's internal mesh representation.

    @Pix10
    Obj is not a binary format, it is ASCII, you can open it with notepad and play if you like. It is so small because it contains the "bare minimum".
     
  9. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    @Ippokratis My bad, you're right. There is/was the .MOD binary flavour, but it's a closed format...not much use for it I guess.
     
  10. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    There are/were at least one or two Collada based interfaces (from memory, the FBX SDK isn't much more than a bunch of interfaces). We used FCollada from Feeling Software back in the day. It was poorly documented though, and they soon started to make it commercial - which sort of defeats the point if you're looking for an open source format. Not sure if they're still developing it. It had some interesting stuff such as support for particle systems (if you were willing to pay extra), but no idea if the premium side was worth the effort. We went FBX after a single project using DAE.
     
  11. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    I'm not sure of the technical details, but I'm pretty sure that vertex colors work with .objs, at least in Autodesk software and Zbrush. . That's now Zbrush users export their polypaints.
     
  12. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    There might be custom obj definitions that those two programs share, but the standard definition, what every program is guaranteed to use is this one:

    https://en.wikipedia.org/wiki/Wavefront_.obj_file

    From this, unity uses ( last time checked in 4.x ) geometry, uv, normals, materials. So, if you e.g use vertex colors to store ambient occlusion in Wings and save the file as obj you will get no vertex color information.

    If something changed since last time I checked them out, let me know.
     
  13. hammer

    hammer

    Joined:
    Jul 11, 2012
    Posts:
    62
    Yes, ZBrush exports vertex colors, but this is written in a custom format that only Zbrush understands. They hijacked the .obj format for their own purposes. Other apps will simply ignore it, since it's written like a comment.
     
  14. Korok

    Korok

    Joined:
    Dec 19, 2011
    Posts:
    179
    sometimes I lost my skinning info using DAE, you can't have animations with OBJ so I think fbx is the best
     
  15. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    OBJ has no animation as mentioned, but stable, can be read correctly by any 3D tools.
    FBX is a closed format, free tools like Blender must hack it way through. Sometimes it works, sometimes not. I guess it belongs Autodesk.
    DAE (Collada) is a free format. Should be the standard format, but somehow Autodesk is not interested, why? ;)
    Blend: Makes no sense in Unity, Unity converts it to FBX in the background anyway. Use FBX or DAE instead, they can be understand by another tools like Substance Painter. But always keep your .blend file.

    So, FBX/OBJ, due to the not well supported DAE format. Even with Blender FBX/OBJ.

    Hint: DAE is not unstable, the tools are.
     
    Last edited: Jun 27, 2017
    Siccity and fabioj like this.
  16. Honorsoft

    Honorsoft

    Joined:
    Oct 31, 2016
    Posts:
    81
    Just to add a little info on some (free) model formats I've used with Unity...

    3MF (3D Manufacturing Format) is an open-source 3D object format developed by the 3MF consortium, which was founded by Microsoft. A 3MF model is basically XML files and textures packed into a zip file with a "3mf" extension. Some good features of it are that it is "human-readable" and you can edit the XML files that make up the model in any text editor, as you can with Wavefront OBJ, Collada DAE and ASCII FBX files, but 3MF can also contain multiple objects (a 3D scene for example) that are not "attached" so you could load or reference individual objects separately if needed.

    GLTF (GL Transmission Format) is a royalty-free model format developed by the Khronos Group Inc. It is quickly gaining support and following among 3D artists and software platforms because of it's efficient modern method of transmitting model data. Instead of XML, the GLTF format uses the JSON standard. Partly for that reason, it is gaining popularity because of it's use of java, which is widely used on modern mobile devices and software platforms such as Three.js, Babylon.js, Node.js, and works well with OpenGL which is widely used on mobile devices. GTLF is also now supported by some popular game engines, such as Unity and Godot. Many major companies are currently using the GLTF format to make such things as interactive 3D advertisements embedded in webpages. There is also the GLB format which is the binary version of GLTF and has the extension GLB (and is not "human-readable" in ASCII).

    And about the COLLADA DAE format...
    DAE (Digital Asset Exchange) was originally developed by Sony Computer Entertainment and later acquired by the Khronos Group. It is also a "free" format (under the SCEA Shared Source License 1.0) and like GLTF, it is XML-based. The current COLLADA standard now supports character skinning, morph targets, rigid body dynamics, kinematics, physics, OpenGL ES materials, and also supports shader effects for multiple shading languages including the Cg programming language, GLSL, and HLSL. It has been around for a lot longer than formats such as GLTF so it has already gained a lot of popularity and support among users and 3D software, API's, etc..

    Also, someone wondered why Autodesk wasn't interested in making DAE the standard, and the answer is that DAE wasn't designed to be as "full-featured" or multi-platform compatible as formats like FBX and GLTF, simply because it was created long before the new standards and web-technologies requiring a model format that is more efficient, faster, and supports more advanced features. Autodesk has even joined the development group behind GTLF (3D Formats Working Group), and has started using the GLTF format, along with other major companies like Microsoft, Facebook, etc..

    Since this is a Unity forum, I should mention that GLTF and DAE are supported by Unity, but I am not sure about the 3MF format, although it's simplicity and readability would make it easy to import and export.

    *EDIT: I should mention the XPS format (and related ASCII and MESH formats), They feel like a cross between OBJ and FBX, containing skeletal data, but referencing external textures. I especially love ASCII formats because I have noticed that a lot of times most 3D editing software (free and paid) leaves errors in the models when exporting, like including incorrect pathways to the textures, or even including personal information about your computer within the model file, so being able to simply open your model up in Notepad to fix it is very useful.
    I have found free code on github to parse an XPS file so I know it's possible, just haven't tested it yet.

    *I'm not an expert on 3D modelling, I'm more of a programmer, and some of this information might get outdated eventually. Just really some general observations that I've noticed that might help someone.

    -So which one(s) do I use most? FBX is my go to rigged model type, hands down. I don't find DAE or GLTF/GLB standardized yet. What I mean is there are differences in the way the format is imported/exported by different 3D software. For example the GLB that you export from one software doesn't load the same (or at all) in other software. I confirmed that exact problem in both Microsoft 3D Builder and Microsoft 3D Viewer's exported GLB's, even though the software is made by the same company, they don't export GLB's that are fully "compatible" with each software. DAE's also have a lot of "variances" in the way the format is written, a common minor problem are flipped UV's. FBX isn't open-source, so it's format tends to stick to the owner's standard. Some other formats do have benefits sometimes. I also like to use OBJ's for unrigged models, partly because OBJ's have some great software for editing (way better than anything modern).
     
    Last edited: May 6, 2022
  17. OleksandrMartysh

    OleksandrMartysh

    Joined:
    Dec 13, 2015
    Posts:
    25
    There are some information from my project. I had a big city model (streets, buildings, roads etc) both in FBX and GLTF formats.
    Windows build with FBX: size = 118mb, performance = 410fps
    Windows build with GLTF (embedded textures & materials): size = 913mb, performance = 310fps
    Windows build with GLTF (extracted textures & materials): size = 333mb, performance = 310fps

    Also, Unity3d doesn't support GLTF files our from the box. You have to use some third-party plugin for it.

    As you can see my builds with GLTF files have significant bigger size and worse performance. I really don't know who and why did create GLTF format. It is absolutely useless for Unity developers.
     
  18. George-Ing

    George-Ing

    Unity Technologies

    Joined:
    Jan 14, 2020
    Posts:
    78
    Hey OleksandrMartysh!

    That's curious, files are traditionally converted from their native format (e.g. FBX/GLTF) to native Unity data. In that sense - all things being equal - we would expect roughly equivalent performance regardless of the source file format.

    I'd be curious - if you look at the triangle count of your FBX / GLTF submeshes in Unity, do they differ?

    To add my own 2c to this thread for anyone who joins it later on - we would currently recommend you use ".fbx" with Unity. FBX is our most widely used format and sees the biggest development investment from us. We are however currently looking at alternatives to ".fbx" so stay tuned!
     
    OleksandrMartysh likes this.
  19. OleksandrMartysh

    OleksandrMartysh

    Joined:
    Dec 13, 2015
    Posts:
    25
    Nope. The vertices/poly counts are the same for FBX and GLTF submeshes.