trimesh.visual.objects

objects.py

Deal with objects which hold visual properties, like ColorVisuals and TextureVisuals.

Classes:

ColorVisuals([mesh, face_colors, vertex_colors])

Store color information about a mesh.

TextureVisuals([uv, material, image])

Functions:

concatenate(visuals, *args)

Concatenate multiple visual objects.

create_visual(**kwargs)

Create Visuals object from keyword arguments.

from_color(vertex_colors)

Convert vertex colors into UV coordinates and materials.

pack(materials, uvs[, deduplicate])

Pack multiple materials with texture into a single material.

trimesh.visual.objects.concatenate(visuals, *args)

Concatenate multiple visual objects.

Parameters
  • visuals (ColorVisuals or list) – Visuals to concatenate

  • *args (ColorVisuals or list) – More visuals to concatenate

Returns

concat – If all are color

Return type

Visuals

trimesh.visual.objects.create_visual(**kwargs)

Create Visuals object from keyword arguments.

Parameters
  • face_colors ((n, 3|4) uint8) – Face colors

  • vertex_colors ((n, 3|4) uint8) – Vertex colors

  • mesh (trimesh.Trimesh) – Mesh object

Returns

visuals – Visual object created from arguments

Return type

ColorVisuals