A crucial aspect of creating compelling and smooth real-time 3D experiences in Twinnoverse is the proper handling and optimization of your 3D assets. This guide covers the currently supported file formats and provides essential best practices for optimizing your models.
Supported File Formats #
Currently Supported: .glb #
Twinnoverse currently supports the .glb file format for all 3D model uploads.
What is .glb? #
.glb is the binary file format representation of glTF (GL Transmission Format). A .glb file is a self-contained asset that packages everything needed to display a 3D model into a single file. This includes:
- The 3D model’s geometry (vertices, triangles).
- Materials and shaders (including PBR materials for realistic surfaces).
- Textures (images applied to the model).
- Animations.
Why .glb? #
We have standardized on .glb for several key reasons that make it ideal for web-based and real-time applications like Twinnoverse:
- Efficiency & Performance:
.glbfiles are compact and optimized for fast loading and rendering. Their binary nature allows them to be parsed quickly by the application, leading to a smoother user experience with less waiting. - Simplicity: By bundling all textures and other necessary data into one file,
.glbsimplifies asset management. You only need to upload and manage a single file per asset, eliminating issues with missing textures or incorrect file paths. - Web Standard: glTF is known as the “JPEG of 3D.” It’s an open standard developed by the Khronos Group (the same consortium behind OpenGL and Vulkan) and is designed specifically for the efficient transmission of 3D scenes and models on the web.
- Modern Compatibility: The
.glbformat is widely adopted. Many modern 3D tools, including a growing number of AI-powered 3D model generation services, can export directly to.glb, making it easier than ever to create and import assets.
Future Support: .fbx and .obj #
We are actively working on expanding our support to include other popular 3D file formats. The next formats we plan to support are:
.fbx(Filmbox): A widely used format in the animation and visual effects industry, known for its robust support for complex animations, rigs, and materials..obj(Object): A simple, text-based format that is broadly supported by almost all 3D modeling software. It is excellent for static models but has limited support for complex materials and animations.
Best Practices for Real-Time 3D Asset Optimization #
To ensure your Twinnoverse scenes run smoothly, it is critical to optimize your 3D models before uploading them. High-polygon, unoptimized models can severely impact performance.
Geometry Optimization (Polygon Count) #
The number of polygons (or triangles) in your model is one of the biggest factors affecting performance.
- Aim for a Low Polygon Count: There’s no single magic number, but always strive for the lowest polygon count that still achieves your desired visual quality.
- Complex, hero assets: 20,000 – 100,000 triangles.
- Background or simple assets: 1,000 – 15,000 triangles.
- Use Normal Maps for Detail: Instead of modeling fine details (like screws, vents, or surface textures), bake these details into a normal map. This creates the illusion of high-resolution detail on a low-polygon model.
- Retopology: If you have a very high-polygon model (e.g., from a 3D scan or digital sculpt), you should rebuild it with cleaner, more efficient geometry. This process is called retopology.
- Remove Hidden Geometry: Delete any faces or polygons that the user will never see (e.g., the inside of a solid object or the bottom of a model that always sits on the floor).
Texture Optimization #
Large, uncompressed textures consume significant memory and can cause long loading times.
- Use Powers of Two: Texture dimensions should always be “powers of two” (e.g., 512×512, 1024×1024, 2048×2048 pixels). This is more efficient for the graphics hardware to process.
- Choose the Right Resolution: Don’t use a 4K (4096×4096) texture for a small object. Use the smallest resolution possible that still looks good up close.
- For most assets, 2048×2048 is a good maximum.
- For smaller or less important assets, 1024×1024 or even 512×512 is often sufficient.
- Use Texture Atlases: If your model uses many small textures, consider combining them into a single, larger texture sheet (an “atlas”). This reduces the number of draw calls, which is a key performance optimization.
- Compress Textures: Use compressed texture formats like
.jpgwhere possible, but be mindful of quality. For.glbexport, the textures will be compressed within the format.
Material and Draw Call Optimization #
- Limit the Number of Materials: Each unique material applied to a model can result in an additional “draw call.” To optimize performance, try to use as few materials as possible. If different parts of your model can share the same material, they should.
- Combine Meshes: If a single asset is made of many separate objects or meshes, combine them into a single mesh where possible. This also helps to reduce draw calls.
By following these guidelines, you can ensure your 3D assets are lean, performant, and look great in your TwinnoVerse digital twin environments.
