Search Unity

[3dStudio] one or more fbx for a large scene?

Discussion in 'Asset Importing & Exporting' started by ghiboz, Jul 20, 2016.

  1. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    hi all!
    i've got a usability question: I've created a large scene/world in 3ds max, the export from fbx and import into unity works, but my amletic doubt is: for performance (primary goal) and usability (secondary goal) is better create a single fbx with everything inside or create more fbx grouped by something like material or position?

    thanks in advance :rolleyes:
     
  2. Ironmax

    Ironmax

    Joined:
    May 12, 2015
    Posts:
    890
    The general rule is = Think object oriented, is your full scene made up with object that will never interact or move? Then sure make it a big static object. Otherwise each object should be a prefab.

    * in 3D studio you can use mix map, so you can have multiply materials on object. this works fine with Unity where you can just drag materials on the mixer.
     
    Last edited: Jul 20, 2016
  3. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    A lot of games use one huge, static model for their maps and populate them with moving parts from prefabs. It's perfectly alright to do it this way. A high number of materials cause more performance problems than a huge model. Just cull that thing with Umbra.
     
  4. Ironmax

    Ironmax

    Joined:
    May 12, 2015
    Posts:
    890
    Your right orb. High numbers of "different" materials can cause performance drop, tough, high number of object that uses same material does not. But a big object with 1 material assign, is always good for performance + you can do prerender texturmap to make a great shadow realistic environment with high performance in Unity.
     
  5. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    thanks very much!, so the way to have a single fbx is not wrong :cool:
     
  6. Ironmax

    Ironmax

    Joined:
    May 12, 2015
    Posts:
    890
  7. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    If you have reused geometry (like, 6 chairs of the same type placed around a table or a castle with 10 times the same modular wall piece) it can pay off to export this as an individual object.

    Otherwise Unity has no way of knowing that this is the same geometry with a different transform, resulting in (slightly) larger game sizes, depending on the amount of vertices, of course.

    Also, for culling (improve performance by only drawing things that are potentially visible on screen) it is advantageous to not go overboard merging everything. One model per room can be good, one model for a whole three-storey house might cause lots of needless vertices to be sent to the GPU because the other rooms are part of what Unity can only treat as a single giant stream of vertices.
     
    Deon-Cadme likes this.
  8. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    thanks @Cygon4 ,
    but some times ago I made a test importing a fbx made with 3ds max that containes some instances and in unity the 3ds instances are mantained.. is right?
     
  9. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    I'm not a 3ds Max user but, yes, if its FBX exporter supports instances, it should work.

    If instances work, it looks like this example (three objects, one mesh):

    instances.png
     
    ghiboz likes this.
  10. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465