Open chrisspieler opened 1 week ago
I don't understand or see much a point in this
I don't understand or see much a point in this
It might be going too far to automatically rotate the light to match the sky. I was thinking too much about my specific use case.
What would definitely be useful is a method/button on directional light components that would come up with lighting that matches what's seen in the scene's skybox.
I view this feature request as the scene editor equivalent of the "Estimate lighting from HDR skybox" command that already existed in Hammer for light_environment
entities.
Right now when I add sunlight/moonlight to a scene, appropriate settings for the light will depend on what the skybox texture looks like.
And in some hypothetical future where we have real-time soft shadows:
I believe that all of this could be automated, and it would solve a minor annoyance I run in to virtually every time I add a skybox and a directional light to a scene.
This is not a mission-critical feature for anyone, but it is a convenient feature that already has a working implementation in Hammer.
What can't you do?
I can't easily align a Directional Light in a scene with a 2D Skybox in the same scene.
How would you like it to work?
Directional Light should have a new property named SourceSkybox.
Whenever SourceSkybox is set, a worldspace Rotation pointing away from the brightest point in the sky (e.g. the sun or moon) should be calculated. Each frame, the WorldRotation of the GameObject that holds the Directional Light component should update so that light appears to shine from that point in the skybox.
Oh, and I guess you could make the LightColor automatically match as well.
What have you tried?
Manually rotating the directional light and eyeballing whether the shadows look correct.
Additional context
No response