|
Post by mmblpie on Oct 6, 2019 18:28:41 GMT
I'm generally a lurker and observer, but I felt compelled sign up for this forum to make a contribution on colorspace. Mostly because I didn't bother learning much about it until working on my raytracer, and I regret not learning about it sooner.The bottom line is: color reproduction and perception is not linear, and 8 bits per color channel isn't much for handling that non-linearity. When you mean to have 50% intensity for a color channel, quantizing it to 127 out of 255 is not necessarily the right answer! It massively affects dynamic range. Download the following attachment (be sure to log into see full resolution!), and compare it to forum.raytracerchallenge.com/thread/4/reflection-refraction-scene-descriptionIt helps to load both images side-by-side. All ray tracing was processed in linear sRGB space, and corrected when quantized and saved to PNG. I set the sRGB flag in the PNG file so viewers know that colors are sRGB encoded. But as I've been learning, compliance with sRGB flags is voluntary, and software often gets it wrong. Some examples you might note on the original image vs the sRGB image: - The transparent green sphere's refracted image of the orange sphere comes out extremely dark on the original... on my monitor I can barely perceive orange. - The specular highlight on the original image's orange sphere has some banding around the brightest spot to my eye. These two images highlight how the brightest and the darkest spots need colorspace corrections. Does this mean this sRGB one is more correct? Maybe, but it means that we should all be a little more colorspace-sensitive, and designing a scene needs to account for this dynamic range when casting from floating point color channels back to 8-bit color channels. Then, read these helpful articles: www.ericbrasseur.org/gamma.htmlblog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/
|
|
|
Post by Jamis on Oct 14, 2019 17:17:17 GMT
Excellent! Thank you so much for the links, and for the sample image. That looks really good.
|
|
|
Post by gbordelon on Oct 19, 2019 10:25:25 GMT
I implemented this with help from OP and the colors are _so_ much better! Some of the scene descriptions require some color tuning to match what I think @jamis intended.
|
|