Search Unity

Dynamic Lighting System

Discussion in 'General Graphics' started by marc_a_hernandez, Apr 29, 2022.

  1. marc_a_hernandez

    marc_a_hernandez

    Joined:
    Apr 5, 2022
    Posts:
    1
    Hello, I'm currently working on a project which is looking to take advantage of the HTC Vive Eye, eye tracking system to affect lighting. The goal is to utilize the players gaze location to adjust the exposure of the seen depending on the brightness of the general area they're looking at.

    Currently, we are adjusting the exposure by using a Volume profile with an exposure component attached to it, and setting the mode to automatic histogram and the metering mod to center weighted. However, in my attempt to integrate the eye tracking system, I've changed these setting to Curve Map and Procedural mask. I have a script that is able to track the location of the eyes and draw a sphere gizmo to where the gaze is in world space and then translate those coordinates to Viewport space.

    After, I reassign the center of the procedural mask to be the location of the sphere. This works adequately when raycasting from the mouse position, however, when taking the gaze location it appears that the minimum and maximum values are never reached. The direction that the mask moves is correct but it can never reach corners or the edge of the Debug view (found in window -> analysis - > rendering debugger -> lighting ->exposure -> Debug mode -> metering weighted).

    Additionally, the lighting seems to update and change at times but not during others. This change is much more noticeable when taking mouse position rather than the gaze position. At times the exposure never changes. We're using unity version 2021.2.0f, tobii XR SDK 3.0.1 and the Vive SRanipal SDK version 1.3.3.0.

    I'm not very experience with lighting systems so any advice would be greatly appreciated, also if there are alternative methods that I could try feel free to let me know!