Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a property to control the bounce indirect energy in BakedLightmap #50827

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jul 25, 2021

3.x version of #51705.

Higher values will make indirect lighting brighter. A value of 1.0 represents physically accurate behavior, but higher values can be used to make indirect lighting propagate more visibly when using a low number of bounces.

This can be used to speed up bake times by lowering the number of bounces then increasing the bounce indirect energy. (This will be useful for godotengine/godot-proposals#2029.) Unlike BakedLightmapData's energy property, this property does not affect direct lighting emitted by light nodes, emissive materials and the environment.

I tested this PR with lights baked in Indirect mode and lights baked in All mode. I also tested emissive materials and environment lighting – everything works as expected.

This can likely be implemented in master's GPU lightmapper too.

Preview

3 bounces, indirect energy 1.0

2021-07-25_02 50 02

1 bounce, indirect energy 1.0

Darker compared to what we had before.

2021-07-25_02 52 22

1 bounce, indirect energy 3.0

Compensates for the fewer amount of bounces.

2021-07-25_02 51 32

3 bounces, indirect energy 16.0

Can be used for debugging purposes or artistic effects (perhaps with a less extreme value).

2021-07-25_02 50 22

@Calinou Calinou requested review from a team as code owners July 25, 2021 00:58
@Calinou Calinou added this to the 3.4 milestone Jul 25, 2021
@Calinou Calinou requested a review from JFonS July 25, 2021 01:00
Higher values will make indirect lighting brighter.
A value of 1.0 represents physically accurate behavior, but higher values
can be used to make indirect lighting propagate more visibly when using
a low number of bounces.

This can be used to speed up bake times by lowering the number of bounces
then increasing the bounce indirect energy. Unlike BakedLightmapData's
energy property, this property does not affect direct lighting
emitted by light nodes or emissive materials.
@Calinou Calinou force-pushed the bakedlightmap-add-bounce-indirect-energy branch from a26499c to 974d3aa Compare July 25, 2021 01:04
@akien-mga akien-mga merged commit 6a6b6fa into godotengine:3.x Jul 27, 2021
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants