3D models can be added into your Augmented Reality scenes using the CraftAR online creation tool and rendered with the Augmented Reality SDK in your mobile app. In this section, we provide best practices to prepare the 3D model files.
Supported formatsCurrently, the CraftAR content creator supports the Wavefront format (.obj). You can export your models from other formats using exporters for different 3D tools like maya, 3d studio or blender. The Augmented Reality SDK of CraftAR, also supports the Collada format for both Android and iOS. The SDK is capable of loading this kind of models and it f there is an animation, it plays it in loop mode.
Optimize your modelsIn order to provide an optimal user experience and good quality visualisation of your models, we recommend that you optimize them. Below there are some points to review when you prepare your models to be displayed on a mobile device:
- Reduce textures: big textures doesn't always mean better quality, mobile devices don't have such big screens as desktop computers. In addition, big textures are heavier and take more time to download and load into the scene. By default, the content creator reduces the textures if they are bigger than 1024x1024. We recommend adjusting the size of the textures to their level of detail.
- Baked textures: pre-computing the textures color with the lighting conditions and material properties improves the visualisation performance and quality.
- Optimize meshes: models with up to 70K polygons load smoothly in high-end mobile devices. Optimizing your meshes is essential to improve download time.
Load time in the SDKDownloading the 3D models over the network takes time. Optimizing your models is essential to improve the user experience. Still, it may take some seconds for the 3D models to appear on screen depending on their size, the number of textures and, of course, the network bandwidth. Since these factors can't be always controlled, at Catchoom we addresses those problems in order to provide the best possible user experience.
- Compression: models are compressed during network transfer to reduce the size. Many 3D model formats specify the geometry in an uncompressed textual or binary format. Compressing this information during transfer can reduce their size down to around 1/4 of the original size.
- Download status: the SDK provides interfaces to know the status of the download (see the doc for the Android SDK and the iOS SDK). This can help you to give the user feedback about what is happening.
- Texture size: the CraftAR service limits the size of textures that you upload to 1024x1024px and compresses them in jpeg format. By doing so, the size of the textures can be kept within a reasonable range in order to reduce download times.
- Caching inside the device: the SDK caches the models in the app's internal storage in order to avoid repeated downloads when the same object is scanned several times and the AR scene is loaded again.