DPI and samples

Export the file

Let's go to file, export, select the glb / gltf format 1, assign a meaningful name and press save. Menu file export glb

Adjust DPI and samples

This pop-up window will open, where we can change DPI 2 and number of samples 3. Export glb options

The DPI adjusts the precision and realism of our texture, directly impacting the weight of our file. The higher the DPI, the higher the resolution of our texture will be but it will generate a heavier glb file. As for the number of samples, on the other hand, they act on image noise. A high number of samples leads to less noise on the textures.

When the keyshot window opens, it presents recommended values, calculated on the size of the file. It is also possible to include the ambient occlusion 4 if present in our model and in the event that the file has both geometry nodes, therefore complex materials, and textures, decide which of the two to give priority in the export phase 5. Usually it is advisable to use the values proposed by the program and go to My AR Studio.

Here, noticing a texture that is poorly defined or that presents annoying image noises, it will be possible to export a new file by changing the parameters.

There is no recommended number for PPE and samples, it must be evaluated from time to time depending on the model, it is possible that it is necessary to go through these steps several times before reaching the desired result.

Below is an example of wrong DPI and samples 6 and set correctly 7 Examples of wrong dpi settings (on the left) and right dpi settings (on the right)

DPI and Samples in detail

When we export a model in GLB, Keyshot will export its geometry and generate a series of textures that capture the characteristics of its materials. This is to make the materials compatible with augmented reality and real-time 3D engines like My AR Studio. The size and quality of the generated textures are managed through two parameters: DPI 1 and Samples 2.

GLB Export interface of Keyshot where you can set the number of DPI and samples

DPI are a unit of measure that indicates how many pixels of texture will be generated for each inch of real size of the model. The higher the DPI value, the higher the resolution of the textures. This means that the model will be more detailed and realistic but also that it will be heavier and will require more memory and computing power for its visualization.

Large models will automatically generate larger textures. In this case it is advisable to lower the DPI, looking for the best compromise between texture quality and weight of the exported GLB file.

Samples are a number that indicates how many times the texture is sampled to reduce its noise. Noise is an unwanted effect that makes the texture grainy and dirty. The higher the value of the samples, the lower the noise, and therefore the resulting texture will be cleaner.

For color textures only 16 samples are more than enough. However, in case you export an Ambient Occlusion texture, it is advisable to increase them to at least 64. The number of samples has no effect on the final weight of the textures, however increasing them will also increase the time required to generate the texture, and therefore the export process will be slower.