#mesh #texture #loading #graphics #atlas #binary #wgpu


An efficient binary mesh format which is both small and extremely fast to read

9 unstable releases (3 breaking)

new 0.4.0 Apr 13, 2024
0.3.1 Mar 24, 2024
0.3.0 Nov 4, 2023
0.2.3 Dec 20, 2022
0.1.3 Dec 20, 2022

#136 in Graphics APIs

Download history 3/week @ 2024-02-14 9/week @ 2024-02-21 4/week @ 2024-02-28 1/week @ 2024-03-06 3/week @ 2024-03-13 101/week @ 2024-03-20 24/week @ 2024-03-27 17/week @ 2024-04-03

146 downloads per month
Used in bevy_chair


833 lines


An efficient binary mesh format which is both small and extremely fast to read.

Textures are supported by loading them from an atlas and mapping mesh uvs to the region.

Comes with wgpu integration, if using bevy see the [bevy_chair](https://lib.rs/bevy_chair) loader plugin.

loading and drawing meshes with wgpu

let bytes = fs::read("chair.chr")?;
// MyVertex implements the Vertex trait to specify what features are loaded into memory
let mesh = MeshReader::new::<MyVertex>(&atlas, Some("fallback"))
	.create::<MyVertex>(&device, &bytes)

// in render pass code
mesh.draw(&mut pass);

Fallback texture name is specified with the fallback parameter of MeshReader::new.

If it is not specified, decoding the mesh will fail instead of using a fallback texture if any unknown textures are specified.

creating meshes

The easy way is use chair_exporter.py as a blender addon to export your models from blender.

Use the optimal settings for accuracy and size as you see fit.

For minecraft-like meshes you can easily do short pos, uvs and normals as they are all low-detail.

For more complex ones this will lose accuracy, so using floats may be prefered.

Vertex paint mode can be used for per-vertex colours and exported.


~459K SLoC