Target file metrics (ranked in order of importance)
Textures:
-
- Recommended: 1024px x 1024px, and a maximum of 8 textures per file.
- Maximum: 1024px x 1024px, up to 16 textures OR 2048px x 2048px, maximum of 4 textures per file.
Object Count:
-
-
- Recommended:
- For environment object: Less than 10
- For single object: Less than 3
- Maximum:
- For environment object: 20
- For single object: 5
- Recommended:
-
Vertex Count:
-
- Recommended:
- For environment object: Less than 100k
- For single object: Less than 30k
- Maximum:
- For environment object: 300k
- For single object: 50k
- Recommended:
Triangles:
-
- Recommended:
- For environment object: Less than <60k
- For single object: Less than 15k
- Maximum:
- For environment object: 180k
- For single object: 30k
- Recommended:
Shaders:
-
- Recommended: Unlit
- Supported: Unlit, Metallic/Roughness and Specular/Glossiness PBR
Shadows:
-
- We support real-time shadows only on mobiles (Android/iOS) but it does not have the best quality
- We recommend baking lighting into textures for a more impressive model
How to optimize textures
- Try downsizing the textures first.
- You can use gltf-transform (installation instructions here) to downsize textures. For example, to resize to 1024x1024, run:
gltf-transform resize --width 1024 --height 1024 model.glb model.resized.glb
The smaller the texture the less memory will be used. We recommend no larger than 2048x2048 in most cases, and a maximum of 1024x1024 when possible. If you must use 4096x4096, use it sparingly and test it on low-end mobile devices.
- You can use gltf-transform (installation instructions here) to downsize textures. For example, to resize to 1024x1024, run:
- Export as jpg instead of png if there is no need for an alpha channel
TIP: If you want to embed special textures like water, glass, or mirror, please see this article.
How to optimize download size
- Follow the steps for optimizing textures first.
- You can use gltf-transform (installation instructions here) to downsize textures. For example, to resize to 1024x1024, run:
gltf-transform draco model.glb model.draco.glb
My model was uploaded, but the textures are missing. How do I fix this?
You'll need to re-zip your file to merge it with the textures.
- Take your model (.glb, .gltf, or any other supported file type) and in your files, select the textures and the model, right-click, and then zip the model.
- Directly drag and drop the .zip file into Spatial. Your textures should now appear on the model.
How to optimize models
Using Blender you can use the Decimate Modifier. You'll want to decimate your model if there are too many vertexes or triangles. This will help reduce your file size significantly.
- Draw call: Merge objects as much as possible. Note that the merged model needs to have one material. If one object has multiple materials, the draw call will be the same. (per object * per material)
- Vertex count: Weld vertices if they are not hard edge lines. And you can use some tools to reduce the vertex count. (i.e. Decimate Modifier in Blender)
- Pixel overdraw: Pixel overdraw sometimes impacts much on some platforms. Try to avoid using transparent(alpha-blend) objects and if it's transparent, keep the area small as much as possible.
For more advanced decimation tools see the recommendations below.
Decimation resources
- Simplygon:
- It has various APIs and is quite scriptable. But that’s historically been used for large game titles and has traditionally been licensed per shipping title (Microsoft’s recommendation)
- MeshLab:
- An open-source option with automatic mesh optimization (Microsoft’s recommendation)
- Sketchfab Help
- Pixyz
File Conversion
How to convert your 3D file to GLB
GLB, glTF, and FBX are supported, but GLB is our recommended file type.
Explore the tools below to convert your models.
Conversion Tools
- GitHub - Facebook Incubator FBX to glTF - need to use it through the command line
GLB Packer - use this to convert from glTF to GLB(especially useful if taking models from Sketchfab, or if using non-embedded glTF) - Blender - is free and open-source software that you can use to create a glb file. Blender’s glb exporter results are quite accurate
- Article on converting Step files - .stp files to glTF
- Creators 3D Online Conversion Tool
Export Settings/ Embedding
All the textures should be embedded in one fbx or glb. Separate texture files won’t be loaded.
- Some software embeds media automatically so this setting may not be visible, check to make sure.