An excellent reference page for a breakdown of Blender exports and details can be found here.
- One thing to note about this reference is they are using the built in Babylon exporter and there are a few differences to what can be found in this document.
Our current platform does not accept any files that are over 2 GB. Ideal size of the file should be lower than 2 GB when uploading to the platform.
Organization is important when exporting assets from Blender or any other 3D software. When it comes to multiple pieces of geometry with different materials it is best to group them by material used on asset. The object also must be a polygonal piece of geometry – NURBs and other surface modeling creations will not export.
Going through the optimization process your geometry will most likely be changed to reduce its size for performance, but it is still a good idea to follow proper geometry workflow whenever possible. For faces of geometry use either triangles (tris) or quadrangles (quads), as this will give better results when run through the optimizer. Also check your geometry to make sure all normals are facing the correct way, that smoothing groups are assigned appropriately and that you are not getting any visual errors that would hinder your model.
It is best practice to create UVs for your assets even if you plan on using a pre-made material due to many materials having texture maps to enhance the material effect. UVs should be located on the base channel as we currently support 1 UV channel.
In a lot of 3D modeling software you can set the material to tile on its own. However, this tiling doesn’t often translate to an export, and in the case of gltF and usdz, it defaults all materials tilling to 1 x 1, which would make materials that have a pattern that is tiled 15 x 15 (as an example) come out as 1 x 1, and would look much larger.
There are two ways to go about fixing the tiling:
- You can use photoshop to create a file where the texture is tiled as much as you need.
- You adjust the UV Map to tile by scaling your UVs beyond the 1 value.
Materials and Textures
For Blender, the following node tree graph needs to be set up for the FBX to bake-in (embed) textures and materials into the proper channels for the converter to read:
Object coordinates > mapping node > image textures, and also change the Flat mapping to Box with a blend of .2 for each image texture.
This will properly export the FBX with PBR material. An example:
The exporter currently supports PNGs – any other texture file types will be converted to PNGs.
Typical game optimization helps achieve the best results. Stick to texture dimensions that are the power of two, 256, 512, 1024, etc. Running the .jpg textures through an external compressor can also bring down the size of your scene especially if you have many textures. Textures may be no bigger than 2048, or they will be automatically compressed.
- Some geometry comes out dark or black when exported. This is often times a result of the 3D Geometry being inverted or having a custom attributes somewhere attached. The best solution is to go into your native 3D software and make sure the geometry is not inverted. Another solution is to select all the faces that are problematic and detach them from the current model.
- If the materials didn’t come out looking right, please make sure that the material name is properly named, with the underscore present. There should not be any spaces in the material name.
FBX Export Pipeline:
Animation export pipeline for Blender follows a lot of the same guidelines that can be found for game engines. There are some things that must be done differently and some general ideas to keep in mind:
- There is no material animation support – material key animation in all forms do not translate. Also while material visibility can be used, it cannot be animated, including the visibility track in the graph editor.
- Animating vertex, either by keys or by a modifier does not work, if you want vertex animation it has to be done through the morph target modifier.
- It is still best practice to bake out your animation before exporting it as the exporter does not support some interpolation types like Step.
- None universal scaling is supported: it can be done with a lone object or even a bone skinned to a mesh, however it does not work through unfreezing the bone length and driving it through bone manipulation or constraints. Bone and skin modifiers are supported, which allows more complex animations.
- FBX does not support dummy objects and other types of none geometry so if your animation is based off these systems you will run into issues. Make sure you convert your objects to FBX supported objects or use Joints to avoid issues.
- The FBX will also base the animation length based off the total animation length, not what the timeline has as the length of the animation so all animation will need to be cleaned and presented at the exact length of the animation.