3D models are the most widely used assets in Onirix. They can simulate accurately almost any object, so they are perfect for merging virtual elements into the real world.
There are plenty of 3D formats in the industry, many of them propietary and designed with a concrete purpose. For example, there are formats that are intended for just visualization, others are thought to be easily editable, others to load fast, but not many of them were thought to be interoperable.
Onirix supports many of the current 3D interoperable formats, but internally works only with glTF. This means, when you upload any 3D asset of any supported format, it is internally converted into glTF on its binary representation (.glb extension).
Onirix uses external tools to convert supported formats into glTF. Conversions may not be perfect, so if you're having problems with your models, you may try directly uploading a glTF file instead.
glTF is a modern format intended to be efficient, interoperable and with minimum file size and runtime processing by apps. Moreover, it's specification is open and developed by the Khronos Group which ensures its standarization and adoption by most of industry-leading 3D design tools.
Here it is the list of supported 3D formats:
|glTF (recommended)||.gltf or .glb||Open, efficient, supports PBR Materials and animations|
|Wavefront OBJ||.obj||Supported by many tools||Text representation (big file size and slow loading times), simple materials, no animations|
|Autodesk FBX||.fbx||Efficient, supports animations||Propietary format|
|Collada||.dae||Open, supports animations||Models are often buggy, as format specification is not clear which make exporters unpredictable.|
Whenever you upload a 3D asset, if it contains external files like materials or textures, you should pack everything inside a ZIP file, and upload that file. Ensure also the model references to that files are relative or they won't be linked and thus, some textures or materials won't be properly rendered.
3D models are mainly created by polygons, to which materials and textures can be attached to provide color and make them realistic.
As a rule of thumb, the more polygons and the bigger textures you use to shape your model, the more realistic it will get. However, Onirix experiences will run on mobile devices with limited computational power and memory, so it is important to find the balance between quality and performance.
These are our requirements for 3D models:
|Texture size||< 1K||1K*|
*Bigger textures than 1K are automatically compressed to 1K during model conversion.
When using WebAR instead of native apps, performance is even more important as the browser adds an extra layer of complexity, so ensure not to overpass recommend requirements.
If a scene contains several 3D models, requirements should be considered for the whole scene rather than for the individual models.
Since all assets are converted into glTF format, supported types of animations are those defined by glTF specification:
- Skinned animations
- Morph targets / Blend shapes (weights only)
glTF supports animating node transforms and Morph Targets weights. Animating other arbitrary properties like material colors or texture transform is not supported at this moment.
Morph targets animation support is still not implemented in Onirix App or Onirix SDK. Only available in WebAR for now.
Recommended tools and stores
Blender (2.8 or above): Blender is a free and open source 3D creation suite. It supports the entirety of the 3D pipeline: modeling, rigging, animation, simulation, rendering, and more. Besides that, it also supports exporting into glTF format, so if you are looking for a 3D creation tool to design your models for AR, this is definitely your best choice.
CAD Assistant: If you have models coming from CAD industry (STEP, DWG and other formats), this free tool will help you to convert them to any of Onirix supported formats.
- Sketchfab (Recommended) : Sketchfab is a platform to publish, share, buy and sell 3D contents. Like Onirix, Sketchfab is aware of the power of glTF format and has commited to spread its usage by converting all of their assets into this format. It is one of the biggest, and most promising 3D marketplaces out there.
- Turbosquid: A well-know marketplace for 3D assets.
- CGTrader: Another marketplace for 3D assets.
Tips and documentation for 3D models in Onirix
Textures in Onirix: optimization and issues.
Specific documentation on texturing in Onirix and how to work with different tools before uploading a model to Onirix.
Model origin: correct positioning
Sometimes when we download a model from an asset store or from a CAD tool, and upload it in Onirix, we can see that the origin is not well placed. Please refer to our model origin documentation to resolve these issues at Onirix.
Model scale: correct size
Sometimes the scale of the objects may not be correct when downloaded from an external library. Normally this kind of models have a 1:1 scale for their real dimensions, but in AR it would not be very usable, for example, to place a stadium in real size, you would have to adjust the size of the model. Please refer to our model scale documentation to fix this.
You can have a 3D object in .fbx, .obj, .dae formats from your preferred asset store but as we recommend, you want it in .glb format. Here's how you can do this conversion yourself if you wish.
Animations in .glb: NLA tracks
The way animations are stored in a 3D object with .glb format is by NLA tracks (Non-Linear Animations). In this section we explain this with more detail. Access the NLA tracks animations documentation page.
Lighting, reflections or other effects are lost when uploading models
Lighting, reflections, propietary materials and other postprocessing effects are usually bounded to your 3D designing software, so they are lost when exporting into any interoperable format. If you want to know what you will be able to export, take a look to the glTF format specification.
Model optimizations & loading time
Make sure your model meets recommended requirements. It's recommended to merge all geometries into one if your model doesn't contains animations, that will drastically reduce load times as only one node has to be processed.
Some other things you can keep in mind when optimizing a 3D model are the following: