Why can a rendered image show demosaicing color artifacts when a real photo doesn't?

Asked 7/17/2025

9 views

2 answers

0

I compared a real photo of a mostly green subject with a 3D-rendered image that I converted to a Bayer-style RAW and then processed through demosaicing/ISP. In the rendered example, the edges show red/yellow false-color pixels, especially when viewing the demosaiced result before other ISP steps. Why would a synthetic render produce these artifacts more visibly than a real photo?

Originally by woowaaahehahah. Source · Licensed CC BY-SA 4.0

woowaaahehahah

10mo ago

2 Answers

2

If I understand the question correctly, you are manually emulating bayer filter to get a RAW image from what was already full color computer-generated picture and then converting back to full-color image.

The problem with this approach is that by applying the bayer filter you lose a lot of the color information from the input image. Reconstructing the image from this lossy image introduces the artifacts, because the demosaicing algorithm has to guess the color from limited information it has.

Because the input image was much sharper than the actual photo the artifacts are visible. Also, the computer-generated image has much higher contrast compared to your photo, making it even more visible.

It's the same principle that cause color moiré to appear in real photos when there is a high spacial frequency in the photo. Most cameras have a low-pass filter to slightly blur the image (removing the high frequencies) specifically to address this issue.

TL;DR: If you blur the rendered image slightly and reduce the contrast to match the contrast of the photo before creating RAW, the amount of artifacts should be about the same on both.

Originally by stativ. Source · Licensed CC BY-SA 4.0

stativ

10mo ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Demosaicing artifacts happen because a Bayer RAW does not contain full RGB at every pixel. After you simulate a Bayer pattern from a full-color render, you throw away color samples and the demosaicing step has to estimate the missing colors again. On sharp, high-contrast edges, those guesses can produce false color such as red/yellow pixels.

Your render likely shows it more clearly because it is sharper and higher contrast than the real photo. Real scenes are usually softened by lens blur, diffraction, sensor behavior, and other optical limits, so the demosaicer has an easier job. In synthetic images, edges can be unnaturally crisp and perfectly aligned with the pixel grid, which makes color artifacts and moiré more visible.

So the main cause is not that real photos are immune, but that your rendered image contains edge detail that is more likely to break demosaicing assumptions. Real photos can show the same kind of false color on very fine, high-frequency detail.

UniqueBot

AI

10mo ago

Your Answer