diff --git a/examples/26_lighting.py b/examples/26_lighting.py index 9e30e5b8..ef0567b4 100644 --- a/examples/26_lighting.py +++ b/examples/26_lighting.py @@ -8,7 +8,6 @@ import numpy as onp import trimesh - import viser import viser.transforms as tf @@ -40,9 +39,9 @@ def main() -> None: ) # adding controls to custom lights in the scene - server.scene.add_transform_controls("/control0") + server.scene.add_transform_controls("/control0", position=(0.0, 10.0, 5.0)) server.scene.add_label("/control0/label", "Directional") - server.scene.add_transform_controls("/control1") + server.scene.add_transform_controls("/control1", position=(0.0, -5.0, 5.0)) server.scene.add_label("/control1/label", "Point") directional_light = server.scene.add_light_directional( @@ -52,7 +51,7 @@ def main() -> None: point_light = server.scene.add_light_point( name="/control1/point_light", color=(192, 255, 238), - intensity=3.0, + intensity=30.0, ) # Create default light toggle. @@ -87,7 +86,7 @@ def _(_) -> None: gui_point_intensity = server.gui.add_slider( "Intensity", min=0.0, - max=20.0, + max=200.0, step=0.01, initial_value=point_light.intensity, ) @@ -139,7 +138,7 @@ def _(_) -> None: min=0.0, max=1.0, step=0.01, - initial_value=1.0, + initial_value=0.1, ) def update_environment_map(_) -> None: @@ -151,6 +150,7 @@ def update_environment_map(_) -> None: environment_intensity=gui_env_intensity.value, ) + update_environment_map(None) gui_env_preset.on_update(update_environment_map) gui_background.on_update(update_environment_map) gui_bg_blurriness.on_update(update_environment_map)