3D models: basic principles
Models should be in GLTF-binary format (.glb
files), though other formats might work.
Compression (using Draco) is supported and will generally speed up loading : faster network transfer and faster object parsing.
The Blender GLTF export is a good reference implementation and should generally be trusted.
Export for eCorpus
Blender is the best solution to convert files from pretty much anything to glTF because it embeds the official plugin from the Khronos group, the consortium behind the glTF format.
Export menu
The glTF plugin is installed by default with Blender. Make sure you are using a recent version of Blender, preferably 4.0 or higher.
Click on File > Export > glTF 2.0 to open the export window
You can choose to export only selected items or the whole scene.
Export Options
For advanced use cases, check out the official documentation at doc.blender.org.
The Binary format (.glb
) is recommended.
It is also possible to choose between Z up and Y up in the Transform menu for the scene's axis orientation.
Draco compression is supported and will generally speed up loading : faster network transfer and faster object parsing.
It is generally not useful to modify the compression settings.
Size
Recommended sizes (faces and map size):
- Thumb The lowest available representation. Always loaded first, with the goal of displaying a first representation of the model as quickly as possible. We recommend using a compressed GLB file with a total size of less than 200k.
- Low Used on older mobile devices. Maximum texture size: 1024 x 1024 pixels. Recommended mesh size: ~150k faces.
- Medium Used on newer mobile devices. Maximum texture size: 2048 x 2048 pixels. Recommended mesh size: ~150k faces.
- High Used on desktop devices. Maximum texture size: 4096 x 4096 pixels. Recommended mesh size: ~150k faces.
- Highest Used for quality inspection. Texture size: 4k or 8k. Mesh size: ~500k faces.
Import
Either import as a new scene or, to update an existing scene’s model :
curl -XPUT -u <username>:<password> -d @</path/.to/file.glb> https://ecorpus.holusion.com/scenes/<scene-name>/models/<filename.glb>
Then configure the model’s derivatives (ref needed).