Different Color Spaces

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
Posts: 1
Joined: Sat Jun 18, 2022 1:21 am

Different Color Spaces

Post by Deanodirector »


I am hoping somebody might humor my curiosity. I know that most renderers will simulate red green and blue light rays but I was wondering if it is even possible to make a ray tracer in another color space i.e. YCrCb and possibly save time rendering chroma. I am aware that different wavelengths refract differently so it it even possible to do the mathematics of chrominance rays? thanks
Posts: 437
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: Different Color Spaces

Post by CodeHD »


I'll attmept to formulate my thoughts on this:

Firstly: When you are mentioning "different wavelengths refract differently", the only correct way is to compute with a wide spectrum of monochromatic rays - often labelled a "spectral rendering engine".
LuxCore's glass material has a spectral feature, but it is not fully spectral and introduces it's own side effects already. Both in terms of wrong colors as well as adding inefficiency. I have plotted this some time ago in a GitHub issue here.

Changing to YCbCr will not change anything in this implementation either.

Similarly, the general steps of ray tracing are:
- Initiating a ray --> no difference by color spaces
- Propagating a ray and finding geometry intersection --> no difference by color spaces
- Evaluating material shader geometrically and determining a scattering event --> no difference by color spaces
- Applying the material color impact to the ray --> calculation is performed in a different color space which may or may not be slightly more computationally efficient

The original motivation (or at least one of them, I don't know) of YCbCr was to reduce data transmission in TV signals, i.e. high resolution for Y and lower resolution for CbCr. In computing, you might apply this by storing Y data in 32 bit and CbCr in 16 bit. But it would again only affect one of the 4 steps above and not improve anything.
Post Reply