Using meshes

A mesh is a collection of vertices, edges, and faces that define the shape of a solid object in 3D with flat faces and straight edges and the triangles that form the surface between the points. A mesh can have many clusters of triangles that each have their own materials.

Primitive meshes

In Kanzi Studio you can create primitive meshes. Kanzi creates primitive meshes from a set of parameters, while it stores imported meshes in vertex buffers. The main purpose of these primitives is to use them for prototyping. A primitive mesh always has only one cluster and thus only one material.

These primitive meshes are available in Kanzi:

Using imported meshes

You can import meshes you created with third-party tools. Use the Model node to show the imported meshes in your Kanzi application. See Importing 3D content.

After you import meshes to your Kanzi Studio project, Kanzi Studio stores the imported meshes in the Library > Meshes. Kanzi Studio lists the file containing the meshes in the Library > Resource Files > 3D Assets (<ProjectName>/3D Assets on the hard drive). See 3D content

Kanzi loads the mesh data to memory only when it needs the mesh. When you change the loaded data, Kanzi saves the changes you made to the mesh.

In Kanzi Studio you can see the mesh data only for the meshes you imported. The parameters of the primitive meshes are specified in the properties of each mesh.

Note that when a mesh has more than 65536 vertices, Kanzi splits the mesh into sub meshes.

Attribute mappings

Attribute mappings is a mesh property that specifies how the attributes in the mesh vertex buffer are handled when rendering the geometry. Attribute mappings map the shader attributes to vertex buffer attributes. Attributes are usually automatically deduced using the semantic of vertex attribute. For example, position attributes of a vertex buffer are mapped to position attribute of the used shader.

When using more than one texture on a single mesh, you have to manually set which texture coordinate attribute in the vertex buffer maps to which shader attribute.

See also

3D content

Importing

Material types and materials

Shaders

Using Morph resources