This Week in Bevy

What happened this week in the Bevy Engine ecosystem

Links

Occlusion Culling, Procedural Generation, and skyboxes

2025-02-24

This week in Bevy we see some nice ergonomic improvements to the defaults for Scene entity despawning, opt-in configuration for runtime validation of shaders, and occlusion culling in more places.

In the showcases, procedural generation ranks highly as always, with more landscapes and even spiral staircases.

And in the crate releases we see more attempts at better ergonomics though a revived bevy_skybox, new config loading, and generic materials.

Scene Entity Despawning

#17938 changes the behavior when despawning scene root instances.

The old behavior is recoverable by using SceneSpawner::despawn_instance(), so this is a straightforward "pick which behavior you want" sort of change.

Configurable Checked Shaders

#17767 introduced unchecked shaders to Bevy, which increases performance since most shaders in a development pipeline are trusted code. Not all Bevy applications run trusted code, and recovering the ability to validate shaders for behavior like infinite loops is useful if you plan on running user-submitted shaders (like a Playground style application would).

#17824 makes this "checked" vs "unchecked" behavior configurable.

Occlusion Culling

Occlusion Culling skips the vertex and fragment shading for objects that are behind other objects (and therefore, guaranteed to not be visible. Occlusion Culling landed in #17413 and was extend to work on directional light shadow maps and the deferred rendering pipeline

Showcase

Bevy work from the #showcase channel in Discord and around the internet. Use hashtag #bevyengine.

sdf anti-aliasingsdf borders

SDF anti-aliasing

showcase

Anti-aliasing and improving resolution using Signed Distance Fields. The work calculates an SDF from a pixel image.

headless bevy_renet

Headless bevy_renet on k8s

showcase

The bevy_renet multiplayer example made headless, running in a container, and deployed to Kubernetes.

tree generation

Procedural Tree Generation

showcase

Procedural tree generation that you can play with on the web, showing contours and triangles or generating new trees.

landscape lod and mipmapping

Procedural Terrain LoD/Mipmapping

showcase

Procedural Terrain Generation with Level of Detail and Mipmapping. Render distance ~128km.

greedy meshing

Greedy Meshing

showcase

A fork of Tantan's greedy meshing repo, this project updates to Bevy 0.15, works on de-hardcoding the block types, and adds transparency.

student tank battles

Student Tank Battles

showcase

An educational tool for students to learn Java, data structures and algorithms.

The game runs on a Rust server with Bevy handling the game logic. It supports multiple lobbies, allowing several matches to run simultaneously with players and spectators. There is also a spectator client in Bevy that connects to the server, receives game state updates, and renders them in real time.

The students get to program their own bots by writing Java-based AI for tanks, using a custom library that was built to handle all the networking. Their focus will be on strategy. navigating, targeting, and outmaneuvering opponents to win.

grid

Grid cells

showcase

An unintentional creation using green and blue cells that's reminiscent of a kind of goopy semi-attractive water.

bevy_html_lite demobevy_html_lite

font sizes and observers

showcase

A showcase of bevy_html_lite behaviors including font sizing and observers.

ascii 3d signage

Ratatui 3d Signage

showcase

3d signage working in ratatui-based unicode renderer, including zooming in and out.

pathfinding

2d colonist simulator prototype

showcase

An early prototype of grid-based pathfinding for a 2d colonist simulator game in the style of Rimworld/Dwarf Fortress.

The implementation features box selection, right mouse button click and drag, and avoiding obstacles en route - though the units don't avoid overlapping each other yet.

mission control earth

Mission Control Earth

showcase

A Mission Control-style view of Earth, drawn using an unlit black sphere and gizmos.linestrip_gradient. This is for a game about designing trajectories for spacecraft.

torp moving objects

Torp: Moving Objects

showcase

The player can now move objects from one spot to another. Moving objects have a chance to break, which reduces with citizen skill.

web slinging through the web

Web Slinging through the Web

showcase

The web slinging implementation we saw last week, embedded in a browser extension that finds all the text on a webpage and adds a collider for each letter

noumenal ray tracingnoumenal ray tracing smooth surfaces

Noumenal

showcase

Raytraced smooth surfaces for noumenal, including correct depth for rounded shadows. The images showcase switching between flat shading to show the difference at low detail.

procedural dungeon meshprocedural dungeon mesh inside

Room Mesh Dungeon Generation

showcase

Mesh generation for a procedural dungeon including interior rooms. The rooms that the stairs will form between are generating with their synchronized positions.

mountainbytes demoparty

Spherical Harmonics Demo

showcase

A demo for the MountainBytes demoparty, rendering an oscillating shape made of spherical harmonics by passing coefficients with a storage buffer.

A video of the session is on YouTube and the source code is available on GitHub

spiral staircase

Procedural Staircase

showcase

A procedural staircase that can use variables to control the height, radius, number of steps, and stair width. Colliders for the staircase are still a work in progress.

Crates

New releases to crates.io and substantial updates to existing projects

skybox

bevy_skybox

crate_release

bevy_skybox existed before Bevy's skyboxes did. Now its being revived on top of Bevy's skyboxes as a quick and dirty way to take a skybox net you found an image of somewhere and use it to make your prototypes prettier.

bevy_animation_graph

bevy_animation_graph 0.6

crate_release

bevy_animation_graph is a third party animation library for Bevy implementing UE5-style animation graphs, and which comes with an egui-based editor.

0.6 introduces dynamic animation node registration, which allows you to create your own animation nodes by implementing the NodeLike trait, better debugging tools, new nodes, and more.

fade_gen

crate_release

Generates filters that fade to the given color for seldom_pixel.

bevy_dyn_component

crate_release

Bevy supports dynamic components, or components created and registered at runtime instead of statically by implementing the Component trait. This includes guarantees you need to uphold with unsafe. bevy_dyn_component crate incurs a small amount of runtime overhead to track this for you. It works by registering a new dynamic component patterned after an existing one, and then ensuring that you're always using the correct pattern to interface with it.

#[derive(Component)]
struct Template;

// `marker0` is now a new component with
// the same layout as `Template`
let marker0 = world.dynamic_component::<Template>();

// `my_entity` now has a `marker0` component on it!
let my_entity = world
    .spawn(())
    .insert_dynamic(marker0, Template)
    .id(); 

// This is essentially `Query<(), With<marker0>>`
let mut query = QueryBuilder::<()>::new(world)
    .with_id(marker0)
    .build();
let with_marker0 = query.iter(world);

// Make sure our query is picking up the right entities:
assert_eq!(with_marker0.next(), Some(my_entity));
assert_eq!(with_marker0.next(), None);

bevy_materialize

crate_release

A crate for loading, storing, and applying type-erased materials in Bevy.

GenericMaterial3d(asset_server.load("materials/example.toml"))
bevy_trenchbroom

bevy_trenchbroom v0.6

crate_release

A TrenchBroom (Quake level editor) and now ericw-tools (Quake level compiler) integration for Bevy, able to load .map and .bsp files.

0.6 brings a massive API overhaul, bsp support, lightmap and irradiance volume animation via compute shaders, and a better material system (via bevy_materialize)

Bevy Config Stack v0.1.0

crate_release

A configuration plugin for Bevy. Load ron files and store them as Resources for access.

bevy_websocket

crate_release

Run a Websocket server inside of your Bevy App.

Devlogs

vlog style updates from long-term projects

npc simulator

NPC Simulator

devlog

Progress report on a game in which you are an NPC.

to build a home

To Build a Home

devlog

The fourth devlog of To Build a Home, the upcoming 2D life simulator inspired by the Sims and Dwarf Fortress. This time we talk about characters having responsibilities, from watering plants to going to work.

No Educational this week
Pull Requests Merged This Week
Contributing

Want to contribute to Bevy?

Here you can find two types of potential contribution: Pull Requests that might need review and Issues that might need to be worked on.

How do I contribute?

Pull Requests Opened this week

Issues Opened this week