(0.13.1) Gamma inconsistent between DOS and Unity

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
User avatar
Freak2121
Posts: 56
Joined: Fri Sep 08, 2017 6:14 am

(0.13.1) Gamma inconsistent between DOS and Unity

Post by Freak2121 »

Hey! I had just gone back to try out Daggerfall on actual DOS with a CRT, and I noticed some inconsistencies regarding gamma especially with retro rendering. I adjusted the exposure, white balance, etc to match what I saw before snapping the pictures.

It's a whole bunch of pictures so I put them in spoilers.
Spoiler!
It's most apparent in dungeons.


Dungeons in DOS:
Image
Dungeons in Unity:
Image
Dungeons in Retro Rendering:
Image


Night time is also a bit weird


Night time in DOS:
Image
Night time in Unity:
Image


The UI is also somewhat washed out in Unity compared to DOS, take a look at the dirt pile in the upper right corner, and the contrast in the stone texture.


UI in DOS:
Image
UI in Unity:
Image



Interiors are pretty much perfect, maybe slightly too yellow but it's really minor.


Interiors in DOS:
Image
Interiors in Unity:
Image
I admit this is a case of extreme nitpicking, and is a pretty low priority, but I feel like a lot of the atmosphere in the dark areas like dungeons has been lost. Old purists like me would be very happy if the dungeons could resemble the DOS version more.

User avatar
Interkarma
Posts: 6592
Joined: Sun Mar 22, 2015 1:51 am

Re: (0.13.1) Gamma inconsistent between DOS and Unity

Post by Interkarma »

Hmm I don't recall my old CRT monitors ever looking that brown and muddy. The dungeon shots don't look that different to me overall - mainly just brighter near camera and darker in distance, something I've noted in other topics. I already aim to reproduce this lighting curve a bit better in DFU.

What jumps out most to me is the sky background in night pics. Not sure why that presents so grey in DFU. This is just a 2D background, it's not part of world and not lit. I'll take a look at that when I can. I wonder if UI could also benefit from a palettization shader. That's worth looking into.

I still have some work to do with lighting review in 0.13. Just to set expectations, what you see in 0.13 is very close to final in DFU under my stewardship. Once I'm done with 0.13 in next few weeks, I'll be moving on from rendering.

User avatar
King of Worms
Posts: 4313
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: (0.13.1) Gamma inconsistent between DOS and Unity

Post by King of Worms »

Interkarma - just a reminder - please dont forget the underwater fog before you move on from the render - Its very bright and does not look good and consistent with the rest of the environment/water surface, thank you :)

mcarss
Posts: 18
Joined: Sun Aug 07, 2016 12:31 pm

Re: (0.13.1) Gamma inconsistent between DOS and Unity

Post by mcarss »

For comparison pics to help, you need to put your camera in manual mode, lock the ISO, f-stop, shutter speed and white balance. Note the brightness of the edge of your monitor shifts for each photo, the night pics being the worst offender. I'm not saying the problem isn't there, but the issue looks to be exaggerated.

User avatar
Freak2121
Posts: 56
Joined: Fri Sep 08, 2017 6:14 am

Re: (0.13.1) Gamma inconsistent between DOS and Unity

Post by Freak2121 »

That was the plan. The issue is it's damn near impossible to capture what a CRT shows without having to adjust per scene. I adjusted for what was visible with my eye. Keeping it at the same exposure is less representative IMO because it loses a lot of details in darker areas, for example, in the night scene you can very easily see the texture on the ground with the naked eye, but on a camera you need to up the exposure to capture those details. CRTs have black levels comparable to OLEDs.

Anyway, I do believe this has to do with a CRT's gamma response. On DOS it's exactly as it was in 96, but on Windows it's adjusted to be linear like on a modern display.

Image

This might actually be easily fixed with some post-processing now that I think of it.

User avatar
Interkarma
Posts: 6592
Joined: Sun Mar 22, 2015 1:51 am

Re: (0.13.1) Gamma inconsistent between DOS and Unity

Post by Interkarma »

King of Worms wrote: Sat Oct 23, 2021 12:01 pm Interkarma - just a reminder - please dont forget the underwater fog before you move on from the render - Its very bright and does not look good and consistent with the rest of the environment/water surface, thank you :)
Hey KoW, thanks for reminder. I've created a new topic about this here.

User avatar
Interkarma
Posts: 6592
Joined: Sun Mar 22, 2015 1:51 am

Re: (0.13.1) Gamma inconsistent between DOS and Unity

Post by Interkarma »

I've taken a look at sky background. Source images from NITE*.IMG are all around RGB 20,20,20 in flat dark-grey areas. Using a dropper tool to compare RGB values, I'm seeing the same exact same display output values in both classic and DFU. Flicking between screenshots from DOSBox and DFU on the same display shows the same sky colours for both versions of game.

I've also checked UI and the colours do render out very slightly differently (e.g. a value of 127 might come out 126 or 128). Not sure of cause there but it's practically imperceptible without using colour sampler. Even flicking back and forth between inventory images taken in classic and DFU do not produce any significant colour differences I can see with naked eye. Example below of straight screenshots to show that colours are being represented properly in UI in classic (left) vs DFU (right).

inventory.jpg
inventory.jpg (299.5 KiB) Viewed 163 times

I don't see anything like the output in your photos on when comparing on same display. I understand this is probably down to differences in how an old display device is processing input (gamma response as you say) compounded with the difficulties in photographing the display to match what the eye sees.

I'm not sure I can do much more here. The comparisons shown are unique to your environment and photographs, and don't really represent DFU on a modern display. I think for sanity's sake, I can only tune using actual screenshots, not photographs of someone's display. That way madness lies. :D

User avatar
Freak2121
Posts: 56
Joined: Fri Sep 08, 2017 6:14 am

Re: (0.13.1) Gamma inconsistent between DOS and Unity

Post by Freak2121 »

I see. Thanks for looking into it! I do think just a post-processing change as a mod would be better anyway.

Post Reply