From KeyShot to Augmented Reality

KeyShot has become a truly powerful tool for exporting GLB models for Augmented Reality. To maintain a high rendering quality you need tools such as Re-Tessellate, Mesh Simplification and know how to tune the GLB export panel settings such as the DPI.

From KeyShot to Augmented Reality

With the release of version 11, KeyShot has become a truly powerful tool for exporting GLB models for Augmented Reality. Features such as automatic creation of UV maps and material backing with Ambient Occlusion texture generation greatly simplify the user workflow. In this perspective, My AR Studio fits in as the ideal complement to quickly distribute your models across all platforms: web, Android, iOS.

However, to achieve the best possible result, it is important to always consider the main limitation of distribution on mobile: the weight of the GLB file. For example, depending on the signal quality, model download time may not be acceptable for the user. Or, on low-end smartphones, there may be frame rate slowdowns when viewing too complex models in AR.

There are two factors that determine the weight of a GLB file:

  • Geometry density (the number of polygons that make up a model)
  • Texture resolution (the pixel size of exported images)

The optimization process essentially involves reducing these quantities as much as possible while trying to maintain high rendering quality. Naturally, experimentation will be necessary because each model will have its own balance point, but KeyShot offers all the necessary tools to easily achieve the goal.

If the geometries are composed of NURBS surfaces, the Re-Tessellate tool will be used to decrease or increase the number of polygons composing them as desired. If working with MESH surfaces, the Mesh Simplification tool will be used, which, unlike Re-Tessellate, can only decrease the number of polygons, not increase them. If, after applying simplifications, the surface presents artifacts (such as "cuts" or shading deformations in curved parts), the Edit Normals tool can be used to repair the geometry.

For each material of the model, KeyShot will generate a new set of textures, independent of any textures used in the material. The resolution of the new set can be set using the dpi parameter in the GLB export panel. The dpi (Dots Per Inch) parameter indicates the number of pixels that will be generated in relation to the actual dimensions of the model. Therefore, it will be necessary to set its value inversely proportional: the larger the model, the smaller the dpi should be.

For example: a 10 x 10 cm model exported at 150 dpi will generate textures of approximately 600 x 600 pixels. A 1 x 1 meter model at 150 dpi will generate textures of approximately 6000 x 6000 pixels! A size too large for most smartphones.

At the following link, you can evaluate an object exported with 35 - 75 - 150 - 300 dpi. Use the button on the bottom-left to change the model, use the button on the bottom-right to enter AR mode.

After several exports, one might wonder: what is the ideal weight of a GLB file? Generally, in terms of download times and frame rate in AR, a GLB file should weigh about 5-8 MB, and geometries should range from 30,000 to 50,000 polygons. Of course, these numbers need to be calibrated in relation to each specific model, but they are a good starting point.

That said, there remains one last hurdle to overcome: material compatibility in AR. Some KeyShot materials are too complex for the algorithms used in real-time rendering, resulting in distorted rendering. This is where My AR Studio comes into play, which, thanks to its integrated PBR (Physically Based Rendering) material editor, allows you to identify and correct rendering problems. Allowing you to generate a compatible result across all platforms: web, Android, iOS.

Want to learn more? On our YouTube channel, there are dozens of tutorial videos available in Italian and English.

Here's the link to the playlist with all KeyShot tutorials (also available in Italian).