3D model export and setup tips using popular 3D tools

This article provides tips on setting up and exporting 3D models from popular 3D tools such as Maya, 3ds Max, and Blender.

3D model export tips

In Sansar, 3D models must be in FBX (.fbx) or OBJ (.obj) file format. Here are some tips on exporting FBX files using Maya, 3ds Max, and Blender.

Note: If your tool does not provide the ability to save tangents/binormals (such as Zbrush and Mudbox), you must first import your object to one of the supported tools and then export to Sansar.
Known issues: 
  • Avatar attachments may not be imported as OBJ at this time.
  • Objects exported as OBJ must currently use the Materials Settings window instead of Phong in order to set their textures.
  • When exporting objects as OBJ from Blender, the scale must be set to 100 or the object will appear too small in Sansar.
  • When exporting objects as FBX from Blender using ASCII rather than binary, textures are not saved. This is an observed issue with Blender as of 4/4/2018.

3D model export using Maya

Procedure for exporting an object from Maya as FBX:

  1. Select the object or objects you want to export. If you select multiple objects, they will be imported to Sansar as a multi-part object.
  2. Choose File > Export Selection from the menu bar. The Export Selection dialog appears.
  3. Open the dropdown for File Type Specific Option.
  4. Open the dropdown for Include.
  5. Open the dropdown for Geometry.
  6. Check the box labeled Tangents and Binormals.
Maya_FBX_export.png
Example FBX export from Maya

Procedure for exporting an object from Maya as OBJ:

  1. Select the object or objects you want to export. If you select multiple objects, they will be imported to Sansar as a multi-part object.
  2. Choose File > Export Selection from the menu bar. The Export Selection dialog appears.
  3. From the Files of type dropdown, select OBJexport.
  4. Keep all Options at the default settings.
  5. Enter a File name and click Export Selection.
OBJexportMaya.png
Example OBJ export from Maya


3D model export using 3ds Max

Procedure for exporting an object from 3ds Max as FBX:

  1. Select the object or objects you want to export. If you select multiple objects, they will be imported to Sansar as a multi-part object.
  2. Click the 3ds icon, then choose Export > Export Selected.
  3. Select a destination, enter a name, then click Save.
  4. When the FBX Export window appears, expand the Include tab.
  5. Under the Include tab, expand the Geometry tab.
  6. Check the box labeled Tangents and Binormals.
  7. Click OK to save.
3DS_Max_FBX_Export.png
Example FBX export from 3ds Max

3D model export using Blender

Procedure for exporting an object from Blender as FBX:

  1. Select the object or objects you want to export. If you select multiple objects, they will be imported to Sansar as a multi-part object.
  2. Choose File > Export > FBX (.fbx).
  3. From the Export window, expand the Export FBX panel on the left side.
  4. On the Main tab, check the box for Selected Objects.
  5. On the Main tab, press the Mesh button.
  6. Click the Geometries tab.
  7. Check the box for Tangent Space.
  8. Press the Export FBX button.
Note: If you receive a "missing TexCoord channel" message when importing the FBX file to Sansar, you may have forgotten to UV map your asset.

 

Blender_FBX_Export.png
 Example FBX export from Blender

Procedure for exporting an object from Blender as OBJ:

  1. Select the object or objects you want to export. If you select multiple objects, they will be imported to Sansar as a multi-part object.
  2. Choose File > Export > Wavefront (.obj).
  3. From the Export window, expand the Export OBJ panel on the left side.
  4. Set Scale to 100.00.
  5. Leave all other settings at default.
  6. Press Export OBJ.
OBJexportBlender.png
Example OBJ export from Blender

 

Phong shader setup tips

The 3D object you are importing should have Phong shaders applied. Sansar has a physically based renderer (PBR) and can use PBR texture maps when they are assigned to the proper channels of your object's Phong shaders. Here are some tips on setting up phong shaders using Maya, 3ds Max, and Blender. 

Note: Due to technical constraints, if you are exporting a model in OBJ format the Emissive and Metalness textures must be applied through the Materials Settings panel when you import the model to Sansar.
Known issue: Currently, all textures for models in OBJ format must be applied through the Materials Settings panel.

Phong shader setup using Maya

All textures (except incandescence) should be in .png file format.

  • Color - Diffuse. We also support alpha masking in the diffuse texture.
  • Ambient Color - Detail map. This should look like a repeatable normal map.
  • Incandescence - Emissive texture, in .exr format.
  • Bump Mapping - Normal texture used as Tangent Space Normals.
  • Specular Color - Roughness. A simple way to make this is to make a normal specular texture, then invert the black and white values. Black areas appear glossy and white areas do not reflect light.
  • Reflected Color - Metalness. This determines the color of reflected light.
Maya_Phong_shader_setup.png
Example Phong shader setup in Maya

 

Special procedure for exporting multi-part animated objects from Blender

When exporting a multi-part animated object from Blender, you must create an empty parent node and then parent the animated objects to the empty node. Otherwise, since Blender only exports one animation node, only one of the objects will animate.

To export a multi-part animated object from Blender:

  1. Create and animate your multi-part object as you normally would.
  2. Create an empty node by selecting Add > Empty > Plain Axis.
  3. Parent the animated assets to the empty node:
    1. Select all the animated assets.
    2. Select the empty node.
    3. Select Object > Parent > Object.
    4. In Set Parent To, select Object.
  4. When exporting, use the directions for exporting FBX above, but change Version to "FBX 6.1 ASCII". If you export as Binary, the animation becomes baked and only one object in the multi-part object will animate correctly. Note that when exporting as ACII, you must also set Scale to 100 in order to maintain a scale of meters in Sansar.
Export_as_ASCII.png
Exporting as FBX 6.1 ASCII, with a Scale of 100.0.

  

Phong shader setup using 3ds Max

All textures (except Self-Illumination) should be in .png file format.

  • Ambient Color - Detail map. This should look like a repeatable normal map.
  • Diffuse Color - Diffuse. We also support alpha masking in the diffuse texture.
  • Specular Color - Roughness. A simple way to make this is to make a normal specular texture, then invert the black and white values. Black areas appear glossy and white areas do not reflect light.
  • Self-Illumination - Emissive texture. Must be in .exr format.
  • Bump - Normal map
  • Reflection - Metalness. This determines the color of reflected light.
3DS_Max_Phong_Shader_Setup.png
Example 3ds Max Phong shader setup

 

Phong shader setup using Blender version 2.79 and earlier

All textures (except Self-Illumination) should be in .png file format.

Blender 2.79 and earlier does not automatically generate a UV set. If you attempt to import an FBX with no UV set, Sansar fails to import with the message: "missing TexCoord channel".

To create a basic UV set in Blender:

  1. Select the object.
  2. Toggle the object into Edit Mode.
  3. Select the entire mesh.
  4. Choose Mesh menu > UV unwrap > Unwrap (or Smart UV Project), then press Ok.
  5. On the Material tab, create a material and set its specular to Phong.
  6. Switch to the Textures tab.
  • Diff Intensity - Emissive texture. Must be in .exr format.
  • Diff Color - Diffuse. We also support alpha masking in the diffuse texture.
  • Shading Mirror - Metalness. This determines the color of reflected light.
  • Specular Color - Roughness. A simple way to make this is to make a normal specular texture, then invert the black and white values. Black areas appear glossy and white areas do not reflect light.
  • Geometry Normal - Normal map.
Note: We do not currently support any channel for use with detail maps from Blender.

 

Blender_Phong_Shader_Setup.png
Example Blender Phong Shader Setup

Principled BSDF shader setup using Blender version 2.8 and later

Instead of Phong, use the default Principled BSDF shader with Blender 2.8. All textures (except Transmission) should be in .png file format.

  • Base Color - Diffuse. We also support alpha masking in the diffuse texture.
  • Normal - Normal map.
  • Transmission - Emissive texture. Must be in .exr format.
  • Roughness - Roughness. A simple way to make this is to make a normal specular texture, then invert the black and white values. Black areas appear glossy and white areas do not reflect light.
  • Metallic - Metalness. This determines the color of reflected light.
Blender_2_8_material_settings.jpg
Example Principled BSDF shader setup in Blender 2.8

Reducing polygon count for collision shapes 

Collision meshes should be very low-polygon cages that encapsulate the areas of a "render" mesh that you don't want avatars to be able to walk through. We strongly advise you not to use your render mesh as a collision mesh, since it will cause an unnecessary loss of performance. Here are some tips on setting up phong shaders using Maya, 3ds Max, and Blender. 

Reducing polygon count for collision shapes using Maya

  1. Import your 3D model into Maya.
  2. Select your model while in object mode.
  3. Click the Mesh button from the toolbar.
  4. If your model isn't already triangulated, select Triangulate form the mesh menu, then proceed before proceeding to the next step.
  5. Click the box next to the Reduce selection.
  6. Tick the Keep original box.
  7. Set Reduction Method to Percentage.
  8. Set the percentage amount to 75-90.
  9. Click the Apply button.
  10. Move the copy of the original back into the reduced models space.
  11. If needed, reshape the reduced model to fully encompass the original.
  12. If the resulting collision shape becomes too distorted from the original, undo the reduction and try a smaller percentage.
  13. Delete the original model.
  14. Select the reduced model.
  15. Select File > Export Selection.
  16. Export the reduced poly model as an fbx and name it 'originalModelName_collision' for easy identification.

Reducing polygon count for collision shapes using 3ds Max

  1. Import your 3D model into Max.
  2. Select your model.
  3. Open the Modify tab.
  4. Click the dropdown arrow for the Modifier list.
  5. Select "Optimize" found under Object Space Modifiers
  6. Increase the Face Thresh until the Last Optimize Status shows the Face count close to if not below 200 faces.
  7. Export the FBX file.

Reducing polygon count for collision shapes using Blender

  1. Import your 3D model into blender.
  2. Select your model while in object mode.
  3. Make a duplicate of the objects (for comparing against).
  4. Select one of the objects.
  5. Open the modifiers tab (blue wrench icon in the properties bar).
  6. If the model is not already triangulated, select the Modifier dropdown and select the triangulated modifier from the Generate column. Then, select Apply from the modifier. 
  7. Select Decimate from the Generate column of the modifiers dropdown.
  8. Select the Collapse button.
  9. Set the ratio to .1-.25 (make sure you are in Object mode to view these changes).
  10. Click the Apply button.
  11. If needed, reshape the reduced model to fully encompass the original.
  12. If the resulting collision shape become too distorted from the original, undo the reduction and try a smaller percentage.
  13. Delete the original model.
  14. Select the reduced model.
  15. Select file > export > fbx.

 

Was this article helpful?
25 out of 36 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.