Evaluating Linear Colour Space

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
Post Reply
User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Evaluating Linear Colour Space

Post by Interkarma »

I'm evaluating switching from gamma to linear colour space as a simple but effective improvement to the game's lighting sometime before 1.0. See screenshots below for an example.

Spoiler!
GAMMA
gamma.png
gamma.png (1.27 MiB) Viewed 1639 times
LINEAR
linear.png
linear.png (1.22 MiB) Viewed 1639 times

The difference is obviously not huge, but all surfaces pick up lighting just a little better with linear colour space. Note the tapestry on right-hand side and how pattern is darker and more distinct in second screenshot. Even without mods, the textures feel a little bit richer.

There are some issues that would need to be resolved. The tilemap shader for exterior terrain needs a fix to sample tiles correctly, fog and lighting will need re-tuning to look their best, and mods will almost certainly need to be recompiled. But the game otherwise runs fine with linear colour space and looks better for it.

If you run DFU in the Unity editor and would like to play with this yourself, enable linear from Edit > Project Settings > Player then setting "Color Space" to "Linear" under "Other Settings". Just ignore the terrain tiles for now, as I mentioned above this shader requires a fix to work correctly with linear.

I'm interested in feedback from other devs on the forums, whether you've worked on DFU or not. Linear colour is generally recommended for better lighting workflow. If DFU didn't begin in the Unity 4.x days, it's quite likely we would have started with linear from the outset.

Narf the Mouse
Posts: 833
Joined: Mon Nov 30, 2015 6:32 pm

Re: Evaluating Linear Colour Space

Post by Narf the Mouse »

I agree that linear colour space is better (math: more accurate, less "congested"). However, I would suggest possibly making it the focus of a major 0.X update, as it does sound like enabling it will break some things.

However, I'm also rather tired, so... :)
Previous experience tells me it's very easy to misunderstand the tone, intent, or meaning of what I've posted. If you have questions, ask.

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

Re: Evaluating Linear Colour Space

Post by Interkarma »

Yep, to clarify this isn't something I'm looking at anytime soon. Maybe as part of the alpha or beta milestones. I would definitely make it a focus of whatever point release it's a part of.

Sometimes I like to test the waters and line things up for later. :)

Narf the Mouse
Posts: 833
Joined: Mon Nov 30, 2015 6:32 pm

Re: Evaluating Linear Colour Space

Post by Narf the Mouse »

It's good. Just checking that we're on the same page. :)
Previous experience tells me it's very easy to misunderstand the tone, intent, or meaning of what I've posted. If you have questions, ask.

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: Evaluating Linear Colour Space

Post by Nystul »

go for it ;)
looks indeed better

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

Re: Evaluating Linear Colour Space

Post by King of Worms »

I like the results. I noticed the 2 torches in front - the sticks blend in the environment more realistically in the linear as well.
No opinion about the time of implementation, thats up to you guys .)

Post Reply