bevyengine / bevyengine/bevy

Low-level framework for particles

Open
#20,569 1 comment 3 reactions 0 assignees View on GitHub
A-Rendering C-Feature D-Complex D-Domain-Expert S-Needs-Design S-Needs-Design-Doc
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

There have been discussions about upstreaming third-party crates for particle systems such as `bevy_hanabi` and `bevy_enoki`.

However, my personal feeling is that this is premature. I've worked with a number of particle systems in other game engines, and one thing I have noticed is that particle engines are highly opinionated: the set of features that are typically exposed via the API only represent a small subset of the possible space of features. To avoid over-complicating the developer experience, providers of particle systems have no choice but to provide a simplified model. This model includes a curated set of features which are chosen to have a high aesthetic impact.

Examples of design questions might be things like:

* Can particles spawn other particles?
* What visual parameters can be animated dynamically?
* What are the possible emitter shapes?
* What kinds of geometric primitives are allowed for particles?
* What kinds of forces are available for influencing particle trajectories?
* What options are there for aligning the particles with their trajectories?
* Can particles interact with non-particle entities in the world -- collisions with the terrain and such? For example, in *Sim City 4: Rush Hour*, the developers experimented with an erosion simulator that could slowly modify the terrain in response to water flow.

Rather than trying to build a single unified particle engine that satisfies every imagined requirement, it might be better to work towards a rich ecosystem of multiple competing particle engines, each with different features.

However, this does not mean that there's nothing for Bevy engine to do.

## What solution would you like?

It might be reasonable to define low-level, un-opinionated particle APIs that make it easier to construct a third-party particle engine. This would have various abstractions around shaders and instanced rendering, CPU and GPU support, and so on. (I don't want to get too much into the details as I am not an expert in this area). This low-level API wouldn't be targeted at game developers, but rather at authors of particle engine crates.

An initial step might be to examine existing Bevy particle crates and sketch out a common set of requirements that would encompass the current prior art.

@alice-i-cecile @NthTensor @mockersf

Contributor guide

Open the contributing guide

Research direction

Start by examining the existing particle crates bevy_hanabi and bevy_enoki, then compare the requirements they expose. Focus on the proposed low-level abstractions for shaders, instanced rendering, and CPU/GPU support; done would mean a decided common API direction rather than a single opinionated particle engine.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.