3D Modelling of a Workstation for Virtual Reality

For the purpose of this step-by-step guide, a CAD model of a ready-made object is adopted as an example. Specifically, the focus is on a conveyor unit component.

According to the scheme mentioned in the 3D Models for Virtual Reality chapter, the workflow must be subdivided according to the two possible methodologies:

  • GLTF + standard materials

  • GLTF + PBR textures

Finally, some recommended settings to keep the objects' hierarchy correctly organized are provided, since they apply to both the above-mentioned methodologies.

GLTF + Standard Materials

  • The Solidworks Assembly file of "Conveyor_Main" is imported to Solidworks Visualize.

    The “Group/Aspect” is the option to choose if the goal is to be able to assign different materials to multibody components; the conveyor unit is treated as a single object in the environment, but it's composed of several part with different materials: steel for the main structure, a black, rubbery ribbon for carrying the pallets, plus additional subcomponents.

  • By dragging and dropping materials from the library to the scene, it is possible to edit the appearance of the object.

  • As specified in the 3D Models for Virtual Reality chapter, only basic materials are used in this case, like opaque plastics for certain bodies (i.e., "Basic White Plastic") and "Steel" for the metallic areas: adopting more complex textures may cause undesired artifacts when the resulting GLTF is displayed in other environments such as VEB.js. In case more complex materials are used, make sure that they are rendered correctly by checking them in Babylon.js Sandbox.

  • Once all bodies have the desired material, the model can be exported to GLTF or GLB.

GLTF + PBR Textures

  • Solidworks Visualize is used just as a conversion tool from the native format to GLFT in order to retain hierarchy information, so before moving to the material setup, it's important to convert the CAD files into GLTFs by using the same the “Group/Aspect” import setting as before. At this point the model can be exported to GLTF, whereas the application of materials will be carried out in Blender, since it is able to manage the PBS texturing pipeline.

  • An intermediate step is to externally collect the material database that need to be applied, since Blender does not include it natively like other, specialized rendering tools. In the case of steel, CC0 Textures is a good source of free material textures available with a CC license. In this example, the workflow for steel is shown. Download a complete texture package for a metallic material that can be implemented as steel. In this case, the .jpg 1K option is chosen to minimize the final size of the GLTF model.

  • The GLTF model must now be imported into Blender. A basic shading mode is applied by default.

  • The "Rendered" viewport shading option and the Cycles rendering engine have to be preferred to display more realistic effects.

  • By enabling the Shader Editor it is possible to create materials from scratch.

  • By pressing in the empty area "Shift + A > Shader > Principled BSDF", the main node that merges different kinds of information coming from the textures is enabled.

  • Then "Shift + A > Output > Material Output" generates the node to display the material in the scene.

  • Finally, "Shift + A > Texture > Image Texture" generates the nodes that will contain the information of each of the downloaded maps.

  • At this point, it is possible to associate the downloaded textures to the corresponding settings of the "Principled BSDF" node.

  • Some additional nodes can be necessary between the textures and the main BSDF node and for mapping corrections: for example, the Multiply + Separate RGB ("Shift + A > Color > MixRGB"; "Shift + A > Converter > Separate RGB") nodes may need to be added to correctly display the Roughness and Metalness Textures.

    Further information about specific material settings can be found at the sources listed at the end of the 3D Models for Virtual Reality chapter.

  • The “Displacement” node controls the height of the bump mapping. The related value may need to be adjusted from case to case depending on the expected result.

  • The Node Graph for "Steel" is presented hereby. For any other material, make sure that textures levels are applied similarly to the corresponding nodes.

  • The full scene Blender file to check out steel and other materials is also provided.

  • The model is ready to be exported once each body has its material assigned. Blender allows different export modes, including GLTF, GLB or GLTF + a separate directory for textures. It must be noted that the Tangent option in the Geometry settings is disabled by default. It is always recommendable to enable it when exporting. A directory for Textures has to be specified in case the option GLTF Separate is chosen. More technical settings to be taken into account are reported in the following image.

    Compression options must be used carefully, since they reportedly ended up having geometry issues and unexpected artifacts. Again, use the Babylon.js Sandbox to verify the results.

Hierarchy Clean Up

An additional software called Gestaltor can be adopted to edit the hierarchy of the output models, possibly deleting the empty nodes that by default get created both by Solidworks Visualize and Blender at top level (i.e. "Node.001")

  • When importing a model in Gestaltor (i.e., the pin insertion station described in the previous use case), an empty father node appears to have been created after exporting the model, as highlighted in green in the image below, in the hierarchy tab.

  • A manual solution to clean up the tree is to move outside the empty node the components that are currently below it. The empty node can be later deleted, leaving the structure as shown below.

  • Finally, the model can be overwritten and saved.

Last updated