Qt Creator Manual | Adding Models

Qt Creator Manual 4.12.0

Setting Node Properties ◦ Using Materials and Shaders

# Adding Models

A Model component loads mesh data from a file. You can modify how the component is shaded by adding materials to the model.

A model can load static meshes from storage or one of the built-in primitive types: cube, cone, cylinder, plane (rectangle) or sphere. You can drag and drop a model from the Library to a 3D scene.

You can change the model type in the Source field in the Properties view. Select the button to add custom model types to the list.

To enable picking the model against the scene, select the Pickable check box. Picking transforms the screen space x and y coordinates to a ray cast towards the specified position in scene space.

To use the geometry of this model when rendering to shadow maps, select the Casts shadows check box. To allow casting shadows on the model, select the Receives shadows check box.

## Tessellation

To dynamically generate additional geometry for the model, select the tiling mode in the Tessellation mode filed. Tessellation is useful when using a displacement map with geometry, or to generate a smoother silhouette when zooming in. You can select either a Phong or an NPatch tessellation generator.

Specify an edge multiplier to the tessellation generator in the Edge tessellation field and an inner multiplier in the Inner tessellation field.

To display a wireframe that highlights the additional geometry created by the tessellation generator, select the Enable wireframe mode check box.

## Adding Materials to Sub-Meshes

A model can consist of several sub-meshes, each of which can have its own material. Select the material from the list in the Materials field. Select the button to add materials to the list. For more information about materials, see Using Materials and Shaders.

Setting Node Properties ◦ Using Materials and Shaders