Skip to content

3D Models specifications

Dimitrios Ververidis edited this page Oct 17, 2017 · 14 revisions

Formats

The Wavefrom OBJ format is currently supported. FBX format support is under construction.

OBJ format

Some rules exist

.obj

  • myModel.obj
    • 'g' tag inside .obj file : All meshes should be 'groups' as the 'g' tag denotes. The 'o' (object) tag should not be used at all!
    • 's off' : the 's' (smoothing meshes) tag should be always off (not 's 1'). We do not want our models to loose their fidelity.

.mtl

  • myModelMaterial.mtl
    • The textures jpgs should be stored without path, e.g. 'map_Kd mymodeltexture.jpg'

    • 'newmtl building2_NoGlossy': The material names could include the special word 'NoGlossy' that removes any glossiness in Unity3D.

    • Multiple texture images. Multiple textures are supported such as

newmtl material1
Ka  1.0 1.0 1.0
Kd  1.0 1.0 1.0
Ks  0.0 0.0 0.0
d  1.0
Ns  0.0
illum 0
map_Kd material1.jpg

newmtl material2
Ka  1.0 1.0 1.0
Kd  1.0 1.0 1.0
Ks  0.0 0.0 0.0
d  1.0
Ns  0.0
illum 0
map_Kd material2.jpg

with the prerequisite than jpgs have names that are orthographically ascending, such as material1.jpg, material2.jpg. Otherwise the texture will be wrongly assigned.

.jpg

  • myModelTexture_xdpi.jpg
    • All textures should be saved in jpg format
    • The jpg should be rectangular up to 8192px
    • '_xdpi' is a magic word where x takes the values 'h' (high quality), 'n' (normal quality), 'l' (low) quality that automatically imports the texture jpg with the following parameters:
      • h: 8192px, 100% jpg compression
      • n: 2048px, 95% jpg compression
      • l: 256px, 90% jpg compression

Formats Advanced

This is addressed to the programmers of the plugin. If you are just a simple user do not follow these rules. They are automatically generated by the software during compiling the game.

.obj

  • myModel_Colliders.obj, myModel_CollidersNoOptimization.obj
    • if the 'Colliders' word is within the file name of the obj then the model is automatically imported with colliders. This is useful for objs that serve as terrains
    • if the 'NoOptimization' word is located in the file name then the obj will not be optimized by Unity3D. This is
Clone this wiki locally