Bevy Meshem is a Rust crate designed to provide meshing algorithms for voxel grids, enabling you to create cohesive 3D mesh structures from a grid of cubic voxels

Overview

Bevy Meshem

Crates.io, docs

Bevy Compatibility:

Bevy Version bevy_meshem
0.11 main

Bevy Meshem is a Rust crate designed to provide meshing algorithms for voxel grids, enabling you to create cohesive 3D mesh structures from a grid of cubic voxels. Similar to the mechanics in Minecraft, Bevy Meshem offers a powerful and flexible way to visualize voxel-based environments with efficient mesh generation. Currently in pre-release stages of development.

Features

Meshing Algorithms:

Bevy Meshem comes with a collection (currently 2, less is more..? :) of meshing algorithms that allow you to generate complex meshes from voxel data efficiently.

Seamless Bevy Integration:

Designed to seamlessly integrate with the Bevy game engine, Bevy Meshem is tailored for use in game development, ensuring easy incorporation into your Bevy-powered projects.

Performance:

Bevy Meshem focuses on performance, utilizing Rust's performance benefits to create meshes quickly and efficiently, even for large voxel grids.

Currently supported meshing algorithms

"The Naive Method"

Iterate over the grid and generate a matching cube for each voxel (Also reffered to as the "default" as this method doesn't offer any optimization) examples: (screenshots from examples/simple_example.rs) Naive method screenshot

10x10x10 grid, each voxel is built out of 24 vertices, and the entire mesh is built out of 24000 (expected, 24 * 10 * 10 * 10)

"Culling"

A slightly more sophisticated method, while iterating over the grid, we don't add any vertices and indices that are hidden behind other voxels. This is roughly the method that Minecraft uses in its engine, though the specifics are obviously unknown. examples: Culling method screenshot

10x10x10 grid, but in contrast to The Naive Method, only 2400 are rendered.

Not supported: "Greedy Meshing"

Greedy Meshing is even more effecient than Culling, but it makes very limiting compromises, making it somewhat undesirable. Support for this method is likely to be added in later stages.

Requirements & Installation

  • You must be familliar with the Bevy game engine, and of course the Rust programming language.
  • You know the drill - add this incantation to your project's Cargo.toml file:
    [dependencies]
    bevy_meshem = "0.1.1"

Usage

The example in examples/simple_example.rs shows what you need to do to get started.

Design Goals

Flexibillity, Stabillity, User experience and Performance. These values will always come before more features.

Contributing

Contributions are very welcome! This project is currently in its early stages and operates closely with the Bevy rendering API. As a result, it may have some stability challenges. However, your contributions can play a significant role in enhancing and stabilizing the project.

Credits

Thanks to mikollysenko writing this informative article! https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/ And to the Bevy Community, for building an awesome project!

You might also like...
🛠 SmartGPT is an experimental program meant to provide LLMs

🛠 SmartGPT is an experimental program meant to provide LLMs (particularly GPT-3.5 and GPT-4) with the ability to complete complex tasks without user input by breaking them down into smaller problems, and collecting information using the internet and other external sources.

F-Fetch targets low systems. Written in Rust. It's very simple, designed so you can pick it up and replace it.

F-Fetch F-Fetch targets low systems. Written in Rust. It's very simple, designed so you can pick it up and replace it. First Look ~/.config/ffetch/con

A CLI tool that allow you to create a temporary new rust project using cargo with already installed dependencies
A CLI tool that allow you to create a temporary new rust project using cargo with already installed dependencies

cargo-temp A CLI tool that allow you to create a new rust project in a temporary directory with already installed dependencies. Install Requires Rust

Collection of immutable and persistent data structures written in Rust, inspired by the standard libraries found in Haskell, Closure and OCaml

PRust: (P)ersistent & Immutable Data Structures in (Rust) This library houses a collection of immutable and persistent data structures, inspired by th

bevy_scriptum is a a plugin for Bevy that allows you to write some of your game logic in a scripting language

bevy_scriptum is a a plugin for Bevy that allows you to write some of your game logic in a scripting language. Currently, only Rhai is supported, but more languages may be added in the future.

Rust crate that allows you to display status & progress information in a terminal

status-line This crate allows you to display status & progress information in a terminal This crate handles the problem of displaying a small amount o

zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets you're watching easily into watchlists for easy access on your terminal.
zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets you're watching easily into watchlists for easy access on your terminal.

zigfi zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets

A crate to help you copy things into raw buffers without invoking spooky action at a distance (undefined behavior).

🗜 presser Utilities to help make copying data around into raw, possibly-uninitialized buffers easier and safer. presser can help you when copying dat

A crate that allows you to mostly-safely cast one type into another type.

A crate that allows you to mostly-safely cast one type into another type. This is mostly useful for generic functions, e.g. pub fn fooS(s: S) {

Owner
Adam
Can't stop the gods from engineering 🌶
Adam
Rust library for putting things in a grid

rust-term-grid This library arranges textual data in a grid format suitable for fixed-width fonts, using an algorithm to minimise the amount of space

Benjamin Sago 61 Nov 4, 2022
A Rust library for drawing grid-based user interfaces using ASCII characters.

grux A library for drawing grid-based user interfaces using ASCII characters. // Provides a uniform interface for drawing to a 2D grid. use grux::Grid

Matan Lurey 4 Jan 10, 2023
A library for 3D grid coordinates: for games

Positioning rustdocs A library for manipulating coordinates on a 3D grid. This will contain code that I'll often end up repeating in games. Currently,

Samuel Schlesinger 7 Dec 6, 2022
Grid-based drum sequencer plugin as MIDI FX in CLAP/VST3 format

dr-seq Grid-based drum sequencer plugin as MIDI FX in CLAP/VST3 format. WARNING: This project is in a very early state. So there is no guarantee for a

Oliver Rockstedt 6 Jan 29, 2023
Wrapper around atspi-code to provide higher-level at-spi Rust bindings

atspi Wrapper around atspi-codegen to provide higher-level at-spi Rust bindings. Contributions Take a look at our atspi-codegen crate, and try inpleme

Odilia 3 Feb 7, 2022
A Rust CLI to provide last publish dates for packages in a package-lock.json file

NPM Package Age A Rust CLI which if you provide a npm lockfile (package-lock.json to start), it will give you a listing of all of the packages & the l

Benjamin Lannon 1 Feb 4, 2022
Provide types for angle manipulation in rust.

angulus Provides types for angle manipulation. Features serde : Serialization/deserialization support via serde. Example use angulus::{*, units::*};

Tristan Guichaoua 2 Sep 2, 2022
Provide CRUD CLI for Moco Activities with Jira Cloud Sync Option for faster time tracking.

Moco CLI Provide CRUD CLI for Moco Activities with Jira Cloud Sync Option for faster time tracking. Available commands Login Jira Must be called befor

Emanuel Vollmer 7 Nov 18, 2022
A library to provide abstractions to access common utilities when developing Dioxus applications.

?? Dioxus Standard Library ?? A platform agnostic library for supercharging your productivity with Dioxus. dioxus-std is a Dioxus standard library tha

Miles Murgaw 5 Nov 9, 2022
Just provide a macro for a certain programming language.

Trust me, this is safe! A macro wrap unsafe keyword into safe! macro. Always trust programmers. use std::alloc::{alloc, dealloc, Layout}; use trust_m

null 4 Dec 13, 2023