Filmic sRGB in material textures broken/wrong calculated with overdriven values #103107

Closed
opened 2022-12-10 18:02:47 +01:00 by Michael Klein · 10 comments

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 526.98

Blender Version
Broken: version: 3.5.0 Alpha, branch: master, commit date: 2022-12-10 12:43, hash: fe30856d83
Broken: version: 3.4.0, branch: blender-v3.4-release, commit date: 2022-12-07 11:39, hash: 175bd38201
Worked: n.a.

Short description of error
Switching an sRGB JPEG texture sequence to Filmic sRGB seems not to work as intended. The colors will be transformed wrong.

Exact steps for others to reproduce the error
Create a material with an 8-bit sRGB texture and switch to Filmic sRGB. In the compositor, this works as expected.

In my example, the floor will cause a reddish reflection in the car paint shader and the rails reflect extremely. It looks like the color values are overdriven here. This is definitely wrong.

blender_MrZhW8G3lj.jpg

blender_undQ5FKLt7.jpg

**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 526.98 **Blender Version** Broken: version: 3.5.0 Alpha, branch: master, commit date: 2022-12-10 12:43, hash: `fe30856d83` Broken: version: 3.4.0, branch: blender-v3.4-release, commit date: 2022-12-07 11:39, hash: `175bd38201` Worked: n.a. **Short description of error** Switching an sRGB JPEG texture sequence to Filmic sRGB seems not to work as intended. The colors will be transformed wrong. **Exact steps for others to reproduce the error** Create a material with an 8-bit sRGB texture and switch to Filmic sRGB. In the compositor, this works as expected. In my example, the floor will cause a reddish reflection in the car paint shader and the rails reflect extremely. It looks like the color values are overdriven here. This is definitely wrong. ![blender_MrZhW8G3lj.jpg](https://archive.blender.org/developer/F14050337/blender_MrZhW8G3lj.jpg) ![blender_undQ5FKLt7.jpg](https://archive.blender.org/developer/F14050336/blender_undQ5FKLt7.jpg)
Author

Added subscriber: @Renderbicks

Added subscriber: @Renderbicks
Michael Klein changed title from Filmic sRGB in material textures broken/wrong calculated? to Filmic sRGB in material textures broken/wrong calculated (overridden values) 2022-12-10 18:04:54 +01:00
Michael Klein changed title from Filmic sRGB in material textures broken/wrong calculated (overridden values) to Filmic sRGB in material textures broken/wrong calculated with overdriven values 2022-12-10 18:05:40 +01:00
Author

Here's a simplified scene with the issue. You can see that the color transform in the compositor is correct while the result in the viewport by the shader shows a strange result. Again: It looks like color values are overdriven and behaves like an "emission".

221210_Blender_350_Bug_Filmic_sRGB.blend

221210_Blender_350_Bug_Filmic_sRGB.jpg

Here's a simplified scene with the issue. You can see that the color transform in the compositor is correct while the result in the viewport by the shader shows a strange result. Again: It looks like color values are overdriven and behaves like an "emission". [221210_Blender_350_Bug_Filmic_sRGB.blend](https://archive.blender.org/developer/F14050455/221210_Blender_350_Bug_Filmic_sRGB.blend) ![221210_Blender_350_Bug_Filmic_sRGB.jpg](https://archive.blender.org/developer/F14050414/221210_Blender_350_Bug_Filmic_sRGB.jpg)
Author

Lowering the background light shows the suspicion that the color transformation is faulty here.

blender_kpdn7UXybH.png

Lowering the background light shows the suspicion that the color transformation is faulty here. ![blender_kpdn7UXybH.png](https://archive.blender.org/developer/F14050484/blender_kpdn7UXybH.png)

Added subscriber: @SteffenD

Added subscriber: @SteffenD

I guess there's nothing wrong with the Color Management. If you set your image's input transform to "Filmic sRGB" and set your Exposure to something like -5...
image.png
... you'll see that the pixels close to 1.0 (white) in your original JPEG will be boosted to ~16.3 to show full white after Filmic is applied. Slight tints of color (in this case a slight tint of pink / purple) will also be boosted from very close to white to something very pink and purple. This is what happens on the rail that reflects in the car body:
image.png
The water in the back shows the same:
image.png
And look what all of a sudden happens in the completely blown out sky (which looks constant white):
image.png
Blocky compression artefacts in yellow and teal.

I guess the only thing you can do is to desaturate this texture to avoid the pink reflection in your car.

I guess there's nothing wrong with the Color Management. If you set your image's input transform to "Filmic sRGB" and set your Exposure to something like -5... ![image.png](https://archive.blender.org/developer/F14052467/image.png) ... you'll see that the pixels close to 1.0 (white) in your original JPEG will be boosted to ~16.3 to show full white after Filmic is applied. Slight tints of color (in this case a slight tint of pink / purple) will also be boosted from very close to white to something very pink and purple. This is what happens on the rail that reflects in the car body: ![image.png](https://archive.blender.org/developer/F14052487/image.png) The water in the back shows the same: ![image.png](https://archive.blender.org/developer/F14052491/image.png) And look what all of a sudden happens in the completely blown out sky (which looks constant white): ![image.png](https://archive.blender.org/developer/F14052493/image.png) Blocky compression artefacts in yellow and teal. I guess the only thing you can do is to desaturate this texture to avoid the pink reflection in your car.

Just for fun I tried desaturating only the brightest highlights and saved the texture as an 8-bit PNG. Visually it is very very close to the original, but it renders without the annoying tint:
image.png
Left is the desaturated version, right the original.
And here's the desaturated texture I used:
CC0001.png

Just for fun I tried desaturating only the brightest highlights and saved the texture as an 8-bit PNG. Visually it is very very close to the original, but it renders without the annoying tint: ![image.png](https://archive.blender.org/developer/F14052522/image.png) Left is the desaturated version, right the original. And here's the desaturated texture I used: ![CC0001.png](https://archive.blender.org/developer/F14052525/CC0001.png)

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'

Don't use Filmic sRGB for base color textures, that's not its purpose and it will generate color values > 1. It's meant for emission or compositing.

Its purpose is explained in the release notes:

A new Filmic sRGB colorspace was added for images. This may be used for compositing background plates into a render that uses a Filmic view transform, without changing the look of the background plate. Using Filmic sRGB will convert 0..1 range colors into HDR colors in the scene linear color space. (2b80bfe2b8, 33f5e8f33f)

Don't use Filmic sRGB for base color textures, that's not its purpose and it will generate color values > 1. It's meant for emission or compositing. Its purpose is explained in the release notes: > A new Filmic sRGB colorspace was added for images. This may be used for compositing background plates into a render that uses a Filmic view transform, without changing the look of the background plate. Using Filmic sRGB will convert 0..1 range colors into HDR colors in the scene linear color space. (2b80bfe2b8, 33f5e8f33f)
Author

In #103107#1458681, @brecht wrote:
Don't use Filmic sRGB for base color textures, that's not its purpose and it will generate color values > 1. It's meant for emission or compositing.

Its purpose is explained in the release notes:

A new Filmic sRGB colorspace was added for images. This may be used for compositing background plates into a render that uses a Filmic view transform, without changing the look of the background plate. Using Filmic sRGB will convert 0..1 range colors into HDR colors in the scene linear color space. (2b80bfe2b8, 33f5e8f33f)

Thanks for the explanation. The idea to use the "corrected plate" was to keep the original colors of the "reflecting" backplate camera-projected because the HDRI alone is not correctly behaving in a camera movement. There is a way to "flatten" the lower part of the "sphere" to a flat ground for a better result but this distorts the HDRI map. I prefer the projection trick but have not tested the other method.

Overall a "constant material" in Blender would be very useful to render mattes for reflected objects or set the floor in my case to a "constant textured material" not being affected by the lighting but supporting the shadow catcher. In reality the floor is of course a "diffuse reflector" like every object but an emission material doesn't work with a shadow catcher. Integrating objects is still a tricky part. Especially if they are high reflective. Then I would get into trouble with the transition between the ground projection and the HDRI environment.

> In #103107#1458681, @brecht wrote: > Don't use Filmic sRGB for base color textures, that's not its purpose and it will generate color values > 1. It's meant for emission or compositing. > > Its purpose is explained in the release notes: >> A new Filmic sRGB colorspace was added for images. This may be used for compositing background plates into a render that uses a Filmic view transform, without changing the look of the background plate. Using Filmic sRGB will convert 0..1 range colors into HDR colors in the scene linear color space. (2b80bfe2b8, 33f5e8f33f) Thanks for the explanation. The idea to use the "corrected plate" was to keep the original colors of the "reflecting" backplate camera-projected because the HDRI alone is not correctly behaving in a camera movement. There is a way to "flatten" the lower part of the "sphere" to a flat ground for a better result but this distorts the HDRI map. I prefer the projection trick but have not tested the other method. Overall a "constant material" in Blender would be very useful to render mattes for reflected objects or set the floor in my case to a "constant textured material" not being affected by the lighting but supporting the shadow catcher. In reality the floor is of course a "diffuse reflector" like every object but an emission material doesn't work with a shadow catcher. Integrating objects is still a tricky part. Especially if they are high reflective. Then I would get into trouble with the transition between the ground projection and the HDRI environment.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#103107
No description provided.