3D Models for Virtual Reality

3D models, defined according to what described in the section 3D Models of Assets, are not ready to be used in a VR environment. In fact, specifications related to materials and the behavior of light for rendering are required.

Several file formats exist to support VR. The recommended option is GLTF, an open standard developed and maintained by the Khronos Group. It supports many features, i.e., 3D model geometry, appearance, scene graph hierarchy, and animation. Many CAD environments are capable of directly export models in the GLTF format.

By default, the unit of measure in the GLTF standard is the meter.

In order to be ready for the use in a VR environment, 3D models of assets must be further elaborated to define materials and properties for the rendering. Depending on the expected outcome and the level of realism to achieve, two options are possible:

  1. GLTF + standard materials for basic 3D representation.

  2. GLTF + PBR textures for high realism.

GLTF + Standard Materials

Basic materials can be applied with regular rendering software such as KeyShot and Solidworks Visualize and later exported to GLTF.

GLTF + Standard Materials using SolidWorks Visualize

SolidWorks Visualize is a software supporting the definition of VR-ready models. When importing a Solidworks Assembly file (SLDASM) to Solidworks Visualize, a dialog pops up to select the desired grouping method to instantiate the hierarchy of the sub-components. This hierarchy must match the specifications described in the section related to 3D models of assets, while providing the user the capability of applying different materials to the different sub-components.

For this purpose, the most efficient import setting option is by “Group/Aspect”.

Thus, drag and drop commands in the software environment can be used to assign materials to the components in the 3D viewer/hierarchy tree. Further information related to how assign materials can be found in the official Solidworks Visualize Manual.

It is recommendable, if possible, to use basic materials (e.g. opaque plastic materials), since more complex appearances (paint materials, translucent, etc...) may cause unwanted artifacts when the model is exported to the GLTF format.

Finally, the user can export the resulting models in either the GLTF or GLB formats.

GLTF + PBR Textures

Physically based rendering is a technique enabling an increased level of detail by adopting high resolution textures applied to the GLTF models.

GLTF + PBR Textures using Blender

Blender is a free and open-source 3D computer graphics software tool set.

Differently from other rendering tools, Blender does not natively include materials to be applied. Thus, materials have to be collected exploiting online sources such as CC0 Textures, providing an extensive catalog of realistic looking materials that can be freely downloaded under a Creative Commons license. Each material can be downloaded either in JPG (lighter) or PNG format, with different texture resolution (from 1K to 8K). These settings will have a huge impact on the overall size of the final GLTF model, so it is important to make a trade-off between quality and size of the models. As a general rule of thumb, opaque materials with overall regular textures like metals, paints, and rubber can be downloaded with minimum resolution without showing clearly visible defects once applied to the model: the JPG/1K setting is valid in most cases. Complex materials ready for the PBR method are composed of a multilayer array of different textures (namely images) associated to different visual properties that will be eventually embedded in the model: Color, Displacement, Metalness, Normal, Roughness.

The steps to obtain realistic VR models are the following:

  1. The setup of the material is performed through the Shader Editor interface, where each level of the texture is assigned to their specific nodes. It may be necessary to fine adjust some parameters if textures appear to be off scale.

The user can decide to export the resulting models in the GLTF, GLB, or GLTF with separate directories for texture resources. By right-clicking the root node of the model and choosing “Select Hierarchy” all the subcomponents downstream will be selected. The "Compression" option might be needed to reduce the size of the resulting models, though it can also create some unwanted result, so it's recommendable to check the exported models afterwards.

More details can be found in the use case 3D Modelling of a Workstation for Virtual Reality.

Further resources

Further information can be found in dedicated online resources:

Khronos Art Pipeline for glTF

THE PBR GUIDE

Blender 2.8 PBR Texturing for Beginners

Last updated