Skip to content

Fixes #39 Scene lighting needs improvement #85

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Yahiewi
Copy link
Contributor

@Yahiewi Yahiewi commented May 12, 2025

This PR adds a Lights folder to give the user the option to manually control the lighting parameters for the three different light sources (Directional, Ambient and Hemispherical) as well as to visualize them using helpers.
For this, there was a need to modify the base CSS class to accommodate the new folder and add make the control panel scrollable and its close button visible.
This way, the user can adjust the lighting settings to their needs depending on the model being viewed.
I also tweaked the initial settings for the lighting to give the models a more "realistic" feel with better contrast and shadows.
For models that are completely white (like the Panda model), changing the background color of the scene (as lighting will have a much less important effect here) is a good solution that improves the contrast and visibility of the object.

Copy link
Contributor

Binder 👈 Launch a Binder on branch Yahiewi/jupyterlab-urdf/lighting

@IsabelParedes IsabelParedes added bug Something isn't working enhancement New feature or request labels May 12, 2025
angleStep
)
},
target: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

99% of the time, the robot will be at the origin, so we can probably remove these $x$, $y$, $z$ options


// Hemisphere light controls
this.controls.lights.hemisphere = {
skyColor: hemisphereFolder.addColor(hemisphereSettings, 'SkyColor'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the text displayed in the GUI, make the labels separate words

Sky Color

@@ -51,6 +53,9 @@ export class URDFControls extends GUI {

this._jointsFolder = this.addFolder('Joints');
this._jointsFolder.domElement.setAttribute('class', 'dg joints-folder');

this._lightsFolder = this.addFolder('Lights');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there exists a Scene folder already that affects some of the lights, it makes more sense to add the new folders to Scene instead of creating a new Lights folder.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, since Joints is the main priority and now that the gui is getting longer, the folders should be reorganized in this order.

  1. Joints
  2. Workspace
  3. Scene

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants