| Crates.io | bevy-sculpter |
| lib.rs | bevy-sculpter |
| version | 0.18.0 |
| created_at | 2025-12-04 15:13:04.345287+00 |
| updated_at | 2026-01-14 19:49:22.139232+00 |
| description | SDF-based voxel sculpting and Surface Nets meshing for Bevy |
| homepage | |
| repository | https://github.com/ChousX/bevy-sculpter |
| max_upload_size | |
| id | 1966578 |
| size | 813,070 |

SDF-based voxel sculpting and Surface Nets meshing for Bevy.
⚠️ Early Development: This crate is under heavy development. Expect breaking changes between versions until 1.0.
| bevy-sculpter | Bevy |
|---|---|
| 0.18 | 0.18 |
| 0.1 | 0.17 |
use bevy::prelude::*;
use bevy_sculpter::prelude::*;
use chunky_bevy::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(ChunkyPlugin::default())
.add_plugins(SurfaceNetsPlugin)
.insert_resource(DensityFieldMeshSize(vec3(10., 10., 10.)))
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
// Create a chunk with a sphere
let mut field = DensityField::new();
bevy_sculpter::helpers::fill_centered_sphere(&mut field, 12.0);
commands.spawn((
Chunk,
ChunkPos(ivec3(0, 0, 0)),
field,
DensityFieldDirty,
));
// Camera and lighting...
}
The crate provides several brush types for modifying density fields:
use bevy_sculpter::helpers::*;
// Hard CSG operations (instant)
brush_sphere(&mut field, center, radius, true); // Add material
brush_sphere(&mut field, center, radius, false); // Remove material
// Smooth continuous brushes (for held input)
brush_smooth_timed(&mut field, center, radius, rate, delta_time, falloff);
// Surface smoothing
brush_blur(&mut field, center, radius, strength, falloff);
// Terrain flattening
brush_flatten(&mut field, center, radius, target_height, strength, falloff);
Run the interactive sculpting example:
cargo run --example sculpt
Controls:
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Surface Nets implementation inspired by fast-surface-nets-rs by bonsairobo.