From cbdd9faa8b214da5f0e7dc89285c8e6b737b4328 Mon Sep 17 00:00:00 2001 From: BD103 <59022059+BD103@users.noreply.github.com> Date: Sun, 25 Feb 2024 14:18:56 -0500 Subject: [PATCH] Increase 3D Lighting example's light intensity (#11982) # 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: before After: after --------- Co-authored-by: Alice Cecile --- examples/3d/lighting.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/3d/lighting.rs b/examples/3d/lighting.rs index 5582cf669d41c0..84ce0db711d11d 100644 --- a/examples/3d/lighting.rs +++ b/examples/3d/lighting.rs @@ -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) @@ -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() @@ -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, @@ -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()