Skip to content

Commit

Permalink
Increase 3D Lighting example's light intensity (bevyengine#11982)
Browse files Browse the repository at this point in the history
# Objective

- The 3D Lighting example is meant to show using multiple lights in the
same scene.
- It currently looks very dark. (See [this
image](https://github.com/bevyengine/bevy-website/pull/1023/files/4fdb1455d5a3371d69db32b036e38731342b48de#r1494653511).)
- Resetting the physical camera properties sets the shutter speed to 1 /
125, even though it initially starts at 1 / 100.

## Solution

- Increase the intensity of all 3 lights in the example.
  - Now it is much closer to the example in Bevy 0.12.
- I had to remove the comment explaining the lightbulb equivalent of the
intensities because I don't know how it was calculated. Does anyone know
what light emits 100,000 lumens?
- Set the initial shutter speed to 1 / 125.

## Showcase

Before:

<img width="1392" alt="before"
src="https://github.com/bevyengine/bevy/assets/59022059/ac353e02-58e9-4661-aa6d-e5fdf0dcd2f6">

After:

<img width="1392" alt="after"
src="https://github.com/bevyengine/bevy/assets/59022059/4ff0beb6-0ced-4fb2-a953-04be2c77f437">

---------

Co-authored-by: Alice Cecile <[email protected]>
  • Loading branch information
2 people authored and msvbg committed Feb 26, 2024
1 parent 7743726 commit cbdd9fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/3d/lighting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn main() {
.add_plugins(DefaultPlugins)
.insert_resource(Parameters(PhysicalCameraParameters {
aperture_f_stops: 1.0,
shutter_speed_s: 1.0 / 100.0,
shutter_speed_s: 1.0 / 125.0,
sensitivity_iso: 100.0,
}))
.add_systems(Startup, setup)
Expand Down Expand Up @@ -132,7 +132,7 @@ fn setup(
// transform: Transform::from_xyz(5.0, 8.0, 2.0),
transform: Transform::from_xyz(1.0, 2.0, 0.0),
point_light: PointLight {
intensity: 4000.0, // lumens - roughly a 300W non-halogen incandescent bulb
intensity: 100_000.0,
color: LegacyColor::RED,
shadows_enabled: true,
..default()
Expand All @@ -157,7 +157,7 @@ fn setup(
transform: Transform::from_xyz(-1.0, 2.0, 0.0)
.looking_at(Vec3::new(-1.0, 0.0, 0.0), Vec3::Z),
spot_light: SpotLight {
intensity: 4000.0, // lumens - roughly a 300W non-halogen incandescent bulb
intensity: 100_000.0,
color: LegacyColor::GREEN,
shadows_enabled: true,
inner_angle: 0.6,
Expand Down Expand Up @@ -185,7 +185,7 @@ fn setup(
// transform: Transform::from_xyz(5.0, 8.0, 2.0),
transform: Transform::from_xyz(0.0, 4.0, 0.0),
point_light: PointLight {
intensity: 4000.0, // lumens - roughly a 300W non-halogen incandescent bulb
intensity: 100_000.0,
color: LegacyColor::BLUE,
shadows_enabled: true,
..default()
Expand Down

0 comments on commit cbdd9fa

Please sign in to comment.