bevyengine / bevyengine/bevy

Add a Bevy-native tool to generate (and bake) global illumination for light maps

Open
#12,233 4 comments 1 reaction 0 assignees View on GitHub
A-Assets A-Editor A-Rendering C-Feature D-Complex
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

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

Light maps (cube maps, irradiance volumes, reflection probes) are a class of assets used to "fake" pretty but expensive global illumination. Bevy has support for these now, but as #10057 says, we have no way to generate them ourselves:

> An easy way to generate reflection probe cubemaps is to bake them in Blender and use the export-blender-gi tool that's part of the [bevy-baked-gi](https://github.com/pcwalton/bevy-baked-gi) project. This tool takes a .blend file containing baked cubemaps as input and exports cubemap images, pre-filtered with an embedded fork of the [glTF IBL Sampler](https://github.com/KhronosGroup/glTF-IBL-Sampler), alongside a corresponding .scn.ron file that the scene spawner can use to recreate the reflection probes.

## What solution would you like?

1. Add features for global illumination to Bevy, even if they're slow.
2. Add a tool to generate the lightmaps and export them as assets.
3. Teach users how to use this workflow.

This is tagged with `A-Editor`, as while it is *possible* to do this using a non-GUI solution, it makes more sense as a component of a larger scene editor.

## What alternative(s) have you considered?

Existing third-party light baking tools exist, and can be used with Bevy.

These are generally harder to customize / integrate, and cannot be used to dynamically generate lightmaps as part of procedurally generated environments.

## Additional context

Pre-existing work:
- [bevy_solari](https://github.com/JMS55/bevy/tree/solari/crates/bevy_solari) by @JMS55: hardware raytracing GI
- [strolle](https://github.com/Patryk27/strolle) by @Patryk27: software raytracing for GI, see [reddit explanation](https://www.reddit.com/r/rust/comments/12u4ovi/strolle_pretty_lightning_global_illumination_6d/)
- [bevy_baked_gi](https://github.com/pcwalton/bevy-baked-gi) by @pcwalton, a C# + Rust workflow for generating lightmaps for Bevy

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.