VoxelBlockyModelMesh¶
Inherits: VoxelBlockyModel
Generates a model based on a custom mesh.
Description:¶
VoxelMesherBlocky does not require models to be cubes. Ultimately, model visuals are all meshes. This is the most versatile option to make a model. The workflow is to make these models in a 3D editor such as Blender, making sure they are confined in a box going from (0,0) to (1,1). Textures are assigned with classic UV-mapping.
Properties:¶
| Type | Name | Default |
|---|---|---|
| Mesh | mesh | |
| int | mesh_ortho_rotation_index | 0 |
| bool | side_cutout_enabled | false |
| float | side_vertex_tolerance | 0.001 |
Property Descriptions¶
Mesh mesh¶
Mesh that will be used for this model. Must not be empty (if you want an empty model, use VoxelBlockyModelEmpty). If it has more than 2 surfaces (2 materials) the next surfaces will be ignored. Surfaces must be made of triangles. Must be indexed (if you generate meshes with SurfaceTool, use SurfaceTool.index). Should ideally contain geometry within a 0..1 area. Only triangles located on the sides of that cubic area will be considered for neighbor side culling (see also side_vertex_tolerance).
int mesh_ortho_rotation_index = 0¶
Orthogonal rotation applied to the mesh when baking. Values are taken from the same convention as GridMap tiles.
(GridMap provides a conversion method from Basis, unfortunately it is not a static method so it requires a GridMap instance to exist. A helper method could be added in the future if requested)
bool side_cutout_enabled = false¶
When a neighbor voxel partially covers a side of this voxel, the occluded geometry of the side will be cut away. This only works if the shape of both sides is a rectangle. Note, enabling this option can actually produce more triangles than when it is enabled.
float side_vertex_tolerance = 0.001¶
Margin below which triangles located near one of the 6 sides of the voxel will be considered on that side. Sides get culled or not by comparing between triangles of neighbor sides.
Generated on Jan 26, 2026