Skip to content
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

Color temperature and brightness time based automations #67

Open
Goobwabber opened this issue Jan 4, 2024 · 8 comments
Open

Color temperature and brightness time based automations #67

Goobwabber opened this issue Jan 4, 2024 · 8 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Goobwabber
Copy link

Looking to finally replace LuxVR with OyasumiVR but am missing the ability to set color temperature automations and also have both color temperature and brightness change at different times. These are a pretty big necessity for me because otherwise I will not get naturally tired and fall asleep in VR. Also I'm pretty sure that OyasumiVR overrides LuxVR's brightness settings anyways.

@Raphiiko
Copy link
Owner

Raphiiko commented Jan 6, 2024

This seems like a nice feature to add for sure, I wasn't aware of LuxVR, but being able to automate it in a similar way for vr sleeping purposes seems like a useful thing to have.

Also I'm pretty sure that OyasumiVR overrides LuxVR's brightness settings anyways.

I wouldn't quite say "override". If you have an Index, OyasumiVR mainly controls display brightness (the setting itself in SteamVR), the LCD backlight. Below 20%, or on any other headset, OyasumiVR controls image brightness. This basically just comes down to a black overlay plane being rendered just in front of the player's eyes (You can see this in the SteamVR environment when getting your controller too close to your face: it'll clip through). The brightness is controlled by how opaque that plane is. I'm pretty sure this is how other brightness overlays like OVRAS work.

Color temperature though, is a bit of a different issue. I'm just not quite sure how LuxVR does it. To do proper color temperature accurately, you'd somehow have to something like modify the existing image data and override what's being shown to the user. I am genuinely not sure how to do that.

Maybe a very basic way to accomplish this would be to use a plane in front of the eyes, much like the brightness overlay, have it colored somewhere on a scale from yellow to blue, and have its opacity be determined by how close you are to neutral (less transparent on the extreme ends, fully transparent in the "middle"). Maybe this could be how LuxVR does it, however I wouldn't call this accurate. You wouldn't be adjusting the color temperature of the image really, just slapping on a semitransparent color, and you absolutely wouldn't be able to really tie this to any meaningful/accurate number in kelvin.

Maybe this would be sufficient, maybe not, I'll at least have a closer peek at LuxVR, see if I can figure out how it does its thing. In the meantime, if you or anyone else has any idea of how to achieve this through OpenVR, feel free to drop a comment!

@Raphiiko Raphiiko added enhancement New feature or request help wanted Extra attention is needed labels Jan 6, 2024
@Goobwabber
Copy link
Author

Hello, sorry for the response two months later, I haven't been logged into github. I know that OVR Advanced Settings has a setting where you can change the image's individual rgb values. So I'm assuming that there is a way within OpenVR to do so. I checked the documentation but I am unfamiliar with it so I wasn't able to find anything at a brief glance.

@Goobwabber
Copy link
Author

image
Heres an image of the UI in OVR Advanced Settings that allows you to change the RGB values. As you can see, they are not all at 100%, so I think that this may be the same thing LuxVR uses to change the color temperature.

@Raphiiko
Copy link
Owner

I've tried looking at LuxVR's source code, but as it seems to be a Unity project I barely have an idea what's going on there.

I've also looked a bit at OVRAS's source how their color adjustment works, and that indeed seems to be what I expected: An overlay (similar to the brightness overlay) right in front of the user's eyes, with a transparent color on it: Not much adjusting the image, but more just overlaying a solid color.

I'm currently abroad without access to VR, but when I'm home I'll see if I can get similar results with OVRAS as with LuxVR. If the same effect can be achieved with both (indicating LuxVR probably does a similar thing), I'd say this is quite doable.

@sctanf
Copy link

sctanf commented Apr 10, 2024

I think OVRAS and LuxVR both have two ways to adjust color, by changing individual RGB gain similar to brightness gain (better) or an option to use "overlay" with transparent color (worse)

@Raphiiko
Copy link
Owner

Raphiiko commented Apr 10, 2024

Ah I see now indeed, for Index/Vive/Vive Pro it's apparently possible to adjust the gain per color channel. Interesting considering the Index only has a LCD with a single backlight zone.

I'd be interested to look into implementing the color-overlay method, as that's something I could see myself using. Whether I'll end up spending the time on implementing hardware control for the Index, at this point probably not, but I'll try to set it up in a way that adding support for other methods can be done more easily.

@sctanf
Copy link

sctanf commented Apr 10, 2024

Color/RGB gain does apply to other devices, such as Bigscreen Beyond, maybe it is acting on the image/compositor and not in hardware. I am not sure what "overlay" option is meant for, actually, the result is just bad when trying to use it

@Raphiiko
Copy link
Owner

Raphiiko commented Apr 10, 2024

Hmm, ok that does open up more options. Makes me wonder why OVRAS documents it as only supported on certain hardware.
Maybe it's just not effective on wireless solutions (e.g. virtualdesktop/steam link/oculus link), but I just don't see why that would be HMD specific if it's done in software.

I'll have a play around with it when I get back home next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants