bsn! prototypes, mixed lighting, and avian 0.2
2024-12-23
Happy Holidays! This week in Bevy we see bsn! prototypes, more provenance for change tracking, and of course, more no_std progress.
Times of Progress shows off some... progress... :laughing: and there are a number of fun shader demos like water and filters from the community.
Its also interesting to see more and more support for not just baked lighting, but mixed baked and realtime lighting. I feel like this is an underused aspect of Bevy at the moment and think I'll dive into it a bit more in the near future.
no_std
Following up on bevy_ecs gaining no_std support, bevy_app extends the functionality available on these targets to include the powerful App
and Plugin
abstractions. With this, library authors now have the option of making their plugins no_std
compatible, or even offering plugins specifically to improve Bevy on certain embedded platforms!
To start making a no_std compatible plugin, simply disable default features when including bevy_app:
[dependencies]
bevy_app = { version = "0.16", default-features = false }
Library authors are encouraged to do this anyway, as it can also help with compile times and binary size on all platforms.
track_change_detection for spawns/despawns
Last week change detection was extended to events, and this week change detection is extended to spawns and despawns in #16047. This additional information was then used to enhance error messages:
thread 'main' panicked at src/main.rs:11:11:
Entity 0v1#4294967296 was despawned by src/main.rs:10:11
Mixed lighting
Baked lightmaps can be created using software like Bakery and TheLightmapper while "real time" lighting is what you get when you put a light into a scene. #16761 introduces various stages of mixed lighting to combine baked and realtime lighting in different variations.
bindless lightmaps
The march towards bindless and multidraw continues with bindless lightmap support in #16653. The implementation allows binding up to 16 lightmaps at a time and falls back to binding them individually if bindless is not supported on the platform in use.
bevy_input_focus
bevy_input_focus continues to both be improved and made use of inside of Bevy to provide first-class input focus handling. This includes replacing bevy_a11y::Focus, generalizing bubbling, and a pluggable tab navigation framework.
Showcase
Bevy work from the #showcase channel in Discord and around the internet. Use hashtag #bevyengine.
bsn! prototype
showcase
A bsn! implementation meant as a learning exercise to become more informed about the future of scenes. This demo shows off a hot-reload mechanism based on patches.
matrix-style drones
showcase
This demo uses bevy_ecs to power a sand engine and shows off matrix-style drones.
Water shader
showcase
New to shaders and Bevy, this author chose to try to recreate the water described in this video
Guild Simulator
showcase
six months of effort have gone into this management/strategy game where you play the manager of a guild in a medieval/heroic fantasy world. Its a fully UI-driven game inspired by Potion Craft Simulator. An archive of the current state of the game is available on GitHub.
brushstroke tesselation
showcase
A rust translation of squiggy powers this brushstroke tesselation. You can define your own brush and use speed pressure, and other inputs to shape the final result.
The author is hoping to polish it up and get a release out in the future.
Times of Progress
showcase
Development on Times of Progress continues, with a recent upgrade to Bevy 0.15 and a new pause menu! The pause menu uses two custom UI materials for the "paper texture" and the animated button plus a sliced texture for the border. It's all vanilla Bevy UI. Additionally the pause menu uses a kuwahara filter.
Times of Progress was also featured in Rock Paper Shotgun
VSCode Bevy Inspector
showcase
This Bevy Inspector Visual Studio Code Extension first version is now available in the VSCode marketplace
The extension
- Displays Bevy entities and components right in your editor side view.
- Refresh data when wanted or via automatic polling with configurable delay.
- Destroy an entity simply by the power of a click (hover over an entity, the bin icon is to the right).
Source is available on GitHub
Crates
New releases to crates.io and substantial updates to existing projects
Avian 0.2
crate_release
Avian is an ECS-driven physics engine for Bevy.
Avian 0.2 is another massive release, with several new features, quality-of-life improvements, and important bug fixes. There is a comprehensive announcement post, as usual that you should read to get up to date on the changes.
i-cant-believe-its-not-bsn 0.3
crate_release
i-cant-believe-its-not-bsn is a testing ground for bsn-like behavior. the 0.3 version introduces the template!
macro, which you can see here.
fn counter<T: Component>(
num: usize,
name: &str,
increase: T,
decrease: T
) -> Template {
template! {
{ Text::new("You have") } [
{ TextSpan::new(format!("{num}")) };
{ TextSpan::new(format!("{name}!")) };
@{ another_template() };
];
increase: {(
Text::new("Increase"), increase,
visible_if(num < 100)
)};
decrease: {(
Text::new("Decrease"), decrease,
visible_if(num > 0)
)};
}
}
bevy_hammer_ui
crate_release
bevy_hammer_ui is a UI framework lets you use bevy_ui and adds the UiBuilder pattern to build widgets and an optional .style() pattern to provide an alternate way of defining styles (as opposed to custom props in Node)
gigs
crate_release
Gigs provides a simple abstraction for "graphics jobs", units of rendering work that only need to be done sporadically, on-demand. For example, a terrain generation compute shader would only need to be run once for each chunk of terrain. This crate helps avoid most of the manual extraction and resource prep boilerplate that comes along with this, and lets you focus on writing shaders.
Add ability to mute audio sinks authored by mgi388
Make `#[bindless]` in `ExtendedMaterial` actually enable bindless mode. authored by pcwalton
Add missing `#[reflect(Component, Default)]` to `SceneRoot` and `DynamicSceneRoot`. authored by pcwalton
Fix stale comment on `LoadContext::finish`. authored by andriyDev
Made UIRect initialisation functions `const` authored by Kees-van-Beilen
Fix rounding bug in camera projection authored by musjj
Use one `BevyManifest` instance in proc macros authored by raldone01
doc: fix camera link authored by attila-lin
Support `SystemInput` tuples up to 8 elements authored by ItsDoot
Rust 1.83, allow -> expect (missing_docs) authored by bas-ie
Move Volume and GlobalVolume to own file authored by mgi388
Rename AudioSinkPlayback::toggle to toggle_playback authored by mgi388
bevy_reflect: Remove `PartialReflect::serializable` authored by MrGVSV
Fix registering all reflection types that are components as reflection components authored by anlumo
`ScrollPosition` scale factor fix authored by ickshonpe
Remove benchmarks from CI test authored by sophrosyne97
Extend cloning functionality and add convenience methods to `EntityWorldMut` and `EntityCommands` authored by JaySpruce
Always `collect()` when using `QueryIterMany::sort` methods. authored by chescock
Fix inaccurate comment in custom_ui_material.wgsl shader authored by kurk070ff
`f32` -> `Rot2` in bounding volume docs authored by mweatherley
Fix `compile_fail` compile fail authored by BD103
Remove the type parameter from `check_visibility`, and only invoke it once. authored by pcwalton
Allow `extract_meshes_for_gpu_building` and `extract_mesh_materials` to run in parallel. authored by pcwalton
track_change_detection: Also track spawns/despawns authored by SpecificProtagonist
Update sysinfo requirement from 0.32.0 to 0.33.0 authored by mnmaita
Remove deprecated ECS items authored by ItsDoot
Expose `text` field from winit in `KeyboardInput` authored by Windsdon
Support declaring resource access in Queries. authored by chescock
Tab navigation framework for bevy_input_focus. authored by viridia
Introduce support for mixed lighting by allowing lights to opt out of contributing diffuse light to lightmapped objects. authored by pcwalton
Use frostbite's specular sampling direction for environment map light authored by JMS55
Remove COPY_DST from AsBindGroup uniform buffers authored by JMS55
Implement bindless lightmaps. authored by pcwalton
Fix typo in B0001 message authored by SpecificProtagonist
Improve ComputedNode accessibility authored by UkoeHB
Add `AssetChanged` query filter authored by tychedelia
Reworded the CONTRIBUTING.md doc authored by kurk070ff
Update the prepass for the bindless lightmap changes. authored by pcwalton
Feature flag testbed_3d code correctly authored by alice-i-cecile
Support scale factor for image render targets authored by msvbg
Remove `OnceLock` usage from `bevy_ecs` authored by bushrat011899
Add `no_std` support to `bevy_ecs` authored by bushrat011899
Change `GpuImage::size` from `UVec2` to `Extent3d` authored by Noxmore
Generalize bubbling focus input events to other kinds of input authored by alice-i-cecile
Beef up the InputFocusVisible docs authored by alice-i-cecile
Add `no_std` support to `bevy_app` authored by bushrat011899
Polish and improve docs for `bevy_input_focus` authored by alice-i-cecile
Add dashed lines authored by lynn-lumen
Document input focus helper methods authored by alice-i-cecile
implement EntitySet and iter_many_unique methods authored by Victoronz
Replace bevy_a11y::Focus with InputFocus authored by alice-i-cecile
Replace `impl_param_set` proc macro with a `macro_rules` macro authored by chescock
Faster entity cloning authored by eugineerd
`many_buttons` `display-none` commandline argument authored by ickshonpe
Revert "Make doc CI use nightly (#16147)" authored by alice-i-cecile
Remove `bevy_core` authored by bushrat011899
Move `Name` out of `bevy_core` authored by bushrat011899
Enable motion blur on WASM authored by aevyrie
Remove `SetInputFocus` helper trait authored by alice-i-cecile
make EntityHashMap and EntityHashSet proper types authored by Victoronz
Add benchmarks and `compile_fail` tests back to workspace authored by BD103
Remove unused generic in `DeferredWorld::trigger` authored by urben1680
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.
Pull Requests Opened this week
Fix meshlet shaders for bindless mode. authored by pcwalton
Get lightmaps working in deferred rendering. authored by pcwalton
Retain `RenderMaterialInstances` and `RenderMeshMaterialIds` from frame to frame. authored by pcwalton
Update linux dependency documentation for NixOS (and nix) authored by to-bak
BRP registry JSON schema endpoint authored by Leinnan
Stop using `ArchetypeComponentId` in the executor authored by chescock
Add `Text2d` picking backend authored by coreh
Introduce two-level bins for multidrawable meshes. authored by pcwalton
Unrequire `ComputedNode` authored by ickshonpe
many_components stress test improvements authored by hymm
Add a custom render phase example authored by IceSentry
Refactor `batch_and_prepare_binned_render_phase` in preparation for bin retention. authored by pcwalton
Issues Opened this week
Users can no longer get a `Res` from `&World` authored by ethereumdegen
`ui_material` example should show how to use `Globals` authored by rparrett
Rename `track_change_detection` feature of `bevy_ecs` authored by alice-i-cecile
Gltf help required authored by suprohub
Child "component" for required components authored by CoolSlimbo
the render layers: they are broken authored by brandon-reinhart
Mesh picking example (simple_picking) fails (runs incorrectly) authored by s0lst1ce
Add dynamic methods for working with immutable components authored by alice-i-cecile
Format requires transcoding: Uastc(Rgb), this is an error in `bevy_render` authored by suprohub
Regression with custom projections authored by rparrett
Provide a mechanism for selecting a VideoMode for FullScreen Exclusive authored by dev-inigmas
`file_watcher` feature cannot find assets folder in workspace authored by super-saturn
Reorganise Platform Support Dependencies authored by bushrat011899
`bevy_sprite` picking backend does not honor render layers authored by coreh
Materials not displaying correctly in `wireframe` example authored by rparrett
`Display::None` propagation bug authored by ickshonpe
Consider changing the default picking behavior of sprites to be non-pickable by default authored by coreh
Uncouple glyph storage from text processing authored by djeedai
Fails to run on FreeBSD: ERROR bevy_gilrs: Failed to start Gilrs. Gilrs does not support current platform. authored by yurivict
Error spawning non-deserializable components authored by matthunz
Artifact in sprite rendering authored by sofia-m-a
Make Transforms optional for Mesh3d, PointLight, Spotlight authored by HackerFoo
Consider renaming `NodeImageMode` to `ImageNodeMode` authored by mgi388
Duration is reflected as Opaque instead of Struct authored by jwright159
Fix MSAA on some mobile devices like Quest 2 and Quest 3 authored by MalekiRe
Truly Read-only Queries authored by ElliottjPierce
make register_component_hooks method for App authored by PhaestusFox