Motion Blur, Visualizations, and beautiful renders
2024-04-29
This week in Bevy we've got new Motion Blur bundles, a few interesting new examples, and some great looking games and visualizations.
Especially exciting this week is that the Bevy Foundation has reached an exciting milestone in enabling Alice to start full-time on May 1st. This is not the end of the road in funding, rather it is the beginning of the beginning of the short-term plans outlined in the Foundation announcement and is a good sign for the beginning of what I hope is a substantial future for Bevy, in my opinion.
If you want to see Bevy succeed, like I do, and can afford to: You can donate to Bevy today.
Per-object Motion Blur
New support for per-object motion blur was added to the core 3d pipeline. This is a post-process effect that uses the depth and motion vector buffers and can be enabled by adding the MotionBlurBundle
to a camera entity.
There's also a brand new example showcasing the new motion blur effect, added in the same PR.
New Animation example
How do you run animations in response to user input?
This new example, shows off a number of useful Bevy and Rust features including single-use Timers, generics in systems, spritesheet animation with texture atlases, and run conditions for systems that run in response to user input.
.add_systems(
Update,
(
// press the right arrow key to animate the right sprite
trigger_animation::<RightSprite>.run_if(
input_just_pressed(KeyCode::ArrowRight),
),
// press the left arrow key to animate the left sprite
trigger_animation::<LeftSprite>.run_if(
input_just_pressed(KeyCode::ArrowLeft),
),
),
)
Gizmos
Gizmos now work in FixedUpdate
as you would have expected. This marks a change away from being a purely immediate mode implementation, although now Gizmos will work as expected even in schedules that don't run every frame and can be implemented for custom Schedule
s.
gizmos.arrow_2d(
Vec2::ZERO,
Vec2::from_angle(sin / -10. + PI / 2.) * 50.,
YELLOW,
);
Documentation Improvements
Documentation rendering can be affected by seemingly innocuous code, such as this PR which brings the expected documentation from the bevy_reflect
standalone crate into bevy::reflect
's documentation. The (internal, not user-facing) module exports changed from
pub mod foo {
pub use bevy_foo::*;
}
to
pub use bevy_foo as foo;
AppExit
AppExit
is now more specific about the exit reason, which means it is now an enum.
pub enum AppExit {
/// [`App`] exited without any problems.
Success,
/// The [`App`] experienced an unhandleable error.
/// Holds the exit code we expect our app to return.
Error(NonZeroU8),
}
Meshlets
The experimental Meshlets feature got a new, basic level of detail system this week. Level of detail refers to the ability to render more or less detail in objects that are closer or further away. There's some really useful comments and references on the PR, so check it out if you're interested in diving deeper into the work here.
Grid Tracks
GridTrack
and RepeatedGridTrack
gained the ability to be defined in viewport-based dimensions: VMin
, VMax
, Vh
, and Vw
. These define sizes as percentages of the viewport in different ways.
Misc
- An example for
ButtonInput
withKeyCode
,MouseButton
, andGamepadButton
, including multi-key combinations. EventReader
now supports parallel iteration usingEventReader::par_read()
- mutable
AnimationClip
functions were exposed allowing Bevy to modifyAnimationClip
s via code.
Alice's Weekly Merge Train is a maintainer-level view into active PRs, both those that are merging and those that need work.
Showcase
Bevy work from the #showcase channel in Discord and around the internet. Use hashtag #bevyengine.
Flight Sim
showcase
The beginnings of a Flight Simulation with rapier_3d using realistic forces.
The Discord thread for this one includes a few people building Flight Sim tech, including a link to some resources such as this video.
Runtime Lightyear Networking
showcase
A work-in-progress of a networking example with lightyear where the client and server configurations (i.e. the network topology) can be freely modified at runtime. A dedicated server that maintains a list of lobbies; clients can join lobbies and start a game.
Mixed Reality RC Cars
showcase
This showcase uses Bevy and a Quest 3 to control a RC car for the author's master thesis.
Documenting Bevy Apps
showcase
This repo hacks together a rustdoc json interpretation that shows documentation about more Bevy-app specific implementation details, such as Components and where they're used. The author is looking for feedback on if others find this visualization useful, so be sure to let them know if you're interested.
bevy_reactor nodes and pipes
showcase
Nodes and pipes rendered with the help of bevy_reactor, a fine-grained reactivity crate for Bevy. The data in the nodes is fake, but the controls are real. The splines between the nodes are being drawn with a custom shader that computes SDFs for quadratic curves and stores the control points in a storage buffer.
Rust Stream API visualized and exposed
showcase
This is a post and a set of visualizations built in Bevy explaining the Rust Stream API.
VR Climbing Game
showcase
Prismic is a federated and open source social VR sandbox and this is a climbing game demo using its scripting system. Best seen in video form or played, so check it out in the thread.
Bevy is looking beautiful today
showcase
An EnvironmentMapLight, Skybox, and point lights stuck inside balls makes up this demo. Oh, also the 3.57M triangle gun mesh. Shadow casting is off and there are 14 lights.
The demo also makes use of assets from the bevy_dev crate.
Design editor powered by Bevy, SVG and React
showcase
This web app is communicating between the frontend and the "backend" (Bevy) layer via events (wasm bindgen).
Voxels Rewrite
showcase
This showcase is almost an entire rewrite of the system used before to store chunks, generate chunks, and the entity system, to be much more modular than what is was before. This image here (and the video in the thread) is a test to make sure the chunk data is correct, and it is!
Dekirisu's Animal-Crossing Inspired Game
showcase
A number of different updates were posted for this game this week on Mastodon including
Pixelization with a toon shader
showcase
This demo contains a pixelization effect on the camera achieved through scaling up a low-res render as well as a toon shader with colors that are converted to lch before being quantized so the lightness between different hues matches. The toon shader includes normal-based and depth-based outlines.
To Build a Home - Steam Page
showcase
A mix of the Sims and Dwarf Fortress, so you choose your own adventure, To Build a Home gets a new house, new objects and sprites, and a new character model in this showcase this week. There's a Steam Page up so go wishlist it if you're into this kind of game.
Raytracing
showcase
This initial raytracing demo has a very cool debug statistics overlay powered by Apple's Metal Performance HUD.
Make the Hero
showcase
This game was previously features as a demo for bevy_flurx and has received some great improvements to the readability of the gameplay. Merge tiles to construct the number, then move on to the next level.
Morton Intervals
showcase
This is a visualization of an algorithm for morton range tests. The visualization is an interesting case of not much research material being available so the visualization was needed to verify that the behavior made sense.
The goal is to publish this as an alternative to bevy_spatial, a crate for tracking entities in spatial indices.
Multiplayer Bingo!
showcase
This is a Bingo game built in 3-days using a server-client model and the QUIC protocol. The networking implementation is provided by bevy_quinnet.
Asteroids!
showcase
An implementation of the classic Asteroids game using gizmos for visuals.
Source is available on GitHub and the game is playable on itch.io
Crates
New releases to crates.io and substantial updates to existing projects
bevy_ios_notifications 0.1 release
crate_release
Rust crate and Swift package to easily integrate iOS's native Notification API into a Bevy application.
bevy-input-sequence v0.4.0
crate_release
bevy-input-sequence recognizes input sequences from keyboard and gamepad. In 0.4 you can now run one-shot systems in response to an input sequence and there are now more examples.
bevy_rts_camera 0.5.0
crate_release
bevy_rts_camera added ability to pan the camera by 'grabbing' the ground the dragging in this release
bevy_aesprite_ultra
crate_release
A new Aseprite binary loader for bevy! Featuring hot reloading from binary files for animations.,compatibility with bevy_ui, and support for one shot animations by providing events, when animations finish or loop.
command.spawn(AsepriteAnimationBundle{
aseprite: server.load("player.aseprite"),
animation: Animation::default()
.with_tag("walk-right")
.. default()
});
Devlogs
vlog style updates from long-term projects
Educational
Tutorials, deep dives, and other information on developing Bevy applications, games, and plugins
use a u64 for MeshPipelineKey authored by mockersf
Make SystemParam::new_archetype and QueryState::new_archetype unsafe functions authored by james7132
Fix doc when state is missing authored by cBournhonesque
Small CI improvements authored by BD103
Bump async-task authored by Zeophlite
Additional doc aliases for `WindingOrder` in `bevy_math` authored by TheNullicorn
Improve output of example showcase patches CI workflow authored by rparrett
Added `ButtonInput` docs usage example authored by Earthmark
Remove unecessary lint `#[allow(...)]` authored by BD103
Correctly handle UI hierarchy without a camera authored by salvadorcarvalhinho
Parallel event reader authored by yyogo
Switch monolithic lib to module re-exports authored by NthTensor
ButtonInput docs - performance cost adjustment authored by Earthmark
Make `AppExit` more specific about exit reason. authored by Brezak
Contextually clearing gizmos authored by Aceeri
Improve par_iter and Parallel authored by re0312
Clarify comment about camera coordinate system authored by greytdepression
Remove async-task as a dependency authored by james7132
Expose mutable Animation Clips authored by nzhao95
install rust target for arm ios simulator authored by mockersf
Meshlet continuous LOD authored by JMS55
Remove unused push constants authored by JMS55
new example: sprite animation in response to an event authored by awwsmm
Simplify runner app exit code. authored by Brezak
Use `ptr::from_ref` and `ptr::addr_eq` in macro authored by BD103
Make dynamic_linking a no-op on wasm targets authored by james7132
Add `#[track_caller]` to `Query` methods authored by BD103
Update and clarify a Maintainer merge rule authored by superdump
Restructure `ci` modules authored by BD103
Per-Object Motion Blur authored by aevyrie
Fix custom pipeline in mesh2d_manual rendering other meshes authored by rparrett
Better SystemId to Entity conversions authored by iiYese
Use Vec3A for 3D bounding volumes and raycasts authored by NiseVoid
chore: fix some comments authored by findmyhappy
Throttle render assets authored by robtfm
Added vmin and vmax to the gridtrack impls, repeatedgridtrack impls authored by franklinblanco
Remove `version` field for non-publish crates and update descriptions authored by BD103
iter_with_data authored by matiqo15
asset throttling: don't be exhausted if there is no limit authored by mockersf
Switch to ui_test in compile fail tests. authored by Brezak
Fix `CameraProjection` panic and improve `CameraProjectionPlugin` authored by doonv
UI: pass the untransformed node size to the shader authored by mockersf
Cleanup extract_meshes authored by re0312
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
Implement volumetric fog and volumetric lighting, also known as light shafts or god rays. authored by pcwalton
Remove crossbeam-channel as a runtime dependency authored by james7132
new example: multiple sprites, one entity authored by awwsmm
Allow `AssetServer::load` to acquire a guard item. authored by mintlu8
`Curve` implementation for cubic curves authored by mweatherley
Add 2d opaque phase with depth buffer authored by IceSentry
Motion vector animated mesh authored by JMS55
Deprecate dynamic plugins authored by BD103
Example setup for tooling authored by mockersf
Use BinnedRenderPhase for Opaque2d authored by IceSentry
Fix motion blur on wasm authored by rparrett
Integrate `Curve` with `bevy_animation` authored by mweatherley
Use `LinearRgba` for user-facing APIs, rather than `Color` authored by alice-i-cecile
WIP: Update accesskit requirement from 0.12 to 0.13 and accesskit_winit from 0.17 to 0.19 authored by mnmaita
Store render target size in `View` authored by JoJoJet
Add DefaultQueryFilters authored by NiseVoid
Implement filmic color grading. authored by pcwalton
Implement a SystemBuilder for building SystemParams authored by james-j-obrien
Issues Opened this week
Mesh is missing requested attribute: Vertex_Normal error authored by EngoDev
Mutable Animation Clips authored by nzhao95
Time is faster for unfocused windows authored by cuppachino
0.13 error (in desc) but v 0.12 works authored by JasonPaulGithub
`App::configure_sets` should work the same way as `.before` and `.after` authored by alice-i-cecile
`TextLayoutInfo` doesn't contain every processed glyph authored by eidloi
Add tvOS support authored by darkwater
Add a convinence macro to create a color from a hex code / const function with comptime error authored by A-Walrus
User-mode data execution prevention (DEP) violation when loading Dynamic Plugins authored by cz-kaga
Loading a glTF scene doesn't use the correct UV map for ambient occlusion authored by jf908
Rename Rect.inset() to Rect.inflate() authored by viridia
Likely overpadded motion blur struct authored by torsteingrindvik
Rounded corners are not clipped authored by viridia
Asset change detection escape hatch to make `Mut<A>` possible authored by djeedai
Reflect everything by default & make it opt out authored by iiYese
Bloom causes massive performance hit (>50% framerate reduction) authored by lgrammer
Point light docs should explain fields authored by torsteingrindvik
Incorrect UV map used when using Lightmap component authored by GitGhillie
Crash when using Camera2DBundle without HDR + TonyMcMapFace tonemapping authored by Zarthus
3D causes wgpu error spam in console when using GLES authored by inodentry
Bevy chooses CPU render device instead of integrated GPU authored by ByteNybbler
Provide a MapEntities implementation that doesn't require mutable access to the EntityMapper authored by cBournhonesque