Skip to content

Improve Light Unit Slider UX #2122

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

Merged
merged 16 commits into from
Oct 8, 2020

Conversation

johnpars
Copy link
Contributor

@johnpars johnpars commented Oct 8, 2020

Purpose of this PR

This PR introduces various fixes, additions & improvements to the light unit UX as requested by artist and UX team, namely:

1) Replaced Icons

Icons
Icons for Fluorescent, Shade, Blue Sky were added to the temperature slider.

2) Preset Context Menu

ContextMenu
Clicking on the icon will present a list of presets to the user. Clicking on them will place the value in a recommended preset value in a value range, which is set by artist (in reference to this table).

3) Undo/Redo

Undo
Replicating the breaking case as pointed out by @iM0ve- it should now be fixed.

4) Fixed alignment of 6500 Kelvin

Before:
6500Broken

After:
6500Fixed
As the temperature tooltip states, 6500 Kelvin must be equivalent to the white point. Prior to this PR, this was not reflected in the new slider UI, but now it will be true.

5) Correction to spot reflector behavior

Before:
Reflector

After:
NewReflectorBehavior
Prior to this PR, spot light + reflector actually broke the nature of radiance units (like Candela), since they could be changed based on the shape of the spot light. After long discussion with artist + engineer, this is the acceptable way forward to correct the issue, with plans in the future for further improvement on the spot light case. Feel free to follow the conversation here and here.

6) The spacing between icon and slider was removed, so that it is aligned with the rest of the inspector.


Testing status

Tested these changes to the editor locally on two of my machines.

  • Undo/Redo
  • Ensure matching light unit behavior in HDRP 8.2
  • Have not tested making a build as this does not effect the runtime.

Comments to reviewers

  • To fix 4 required modelling an exponential curve that fits an f(0.44) value to 6500; this must happen so that the value matches the white in the temperature gradient. It uses pre-computed coefficients I derived offline and these are used to fit the curve. There is more info in the code comment, but want to confirm that this is alright. From a user perspective, it yields the desired result with no issue (as far as I could test).

@johnpars johnpars added the HDRP label Oct 8, 2020
@johnpars johnpars changed the base branch from master to HDRP/staging October 8, 2020 02:26
@sebastienlagarde sebastienlagarde requested review from a team and removed request for fredericv-unity3d October 8, 2020 07:10
@sebastienlagarde sebastienlagarde marked this pull request as ready for review October 8, 2020 10:17
@sebastienlagarde
Copy link
Contributor

@iM0ve I will merge this one for 10.1 package as it fix a wrong behavior so it is important, but still provide your QA pass feedback here. THanks

@sebastienlagarde sebastienlagarde merged commit 76669a8 into HDRP/staging Oct 8, 2020
@sebastienlagarde sebastienlagarde deleted the HDRP/improve-physical-light-unit-ux branch October 8, 2020 18:23
@iM0ve
Copy link
Contributor

iM0ve commented Oct 9, 2020

Testing seems sufficient, but I will check on the next 10.1 package revision

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

Successfully merging this pull request may close these issues.

3 participants