Cycles Baking Ignores Exposure #75259

Closed
opened 2020-04-01 02:40:49 +02:00 by Jonathan Lampel · 9 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 432.00

Blender Version
Broken: version: 2.83 (sub 9), branch: master, commit date: 2020-03-17 14:02, hash: b852db57ba

Short description of error
Cycles baking does not take the scene exposure into account. This omission makes it impossible to bake scenes with strong or weak lights whose values need to match another file, reference, or scene.

Exact steps for others to reproduce the error

  1. Open baking_exposure.blend
  2. Note light strength and exposure values
  3. Click Bake

Resulting texture:
bake_01.png

Expected texture:
bake_02.png

File:
baking_exposure.blend

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 432.00 **Blender Version** Broken: version: 2.83 (sub 9), branch: master, commit date: 2020-03-17 14:02, hash: `b852db57ba` **Short description of error** Cycles baking does not take the scene exposure into account. This omission makes it impossible to bake scenes with strong or weak lights whose values need to match another file, reference, or scene. **Exact steps for others to reproduce the error** 1. Open baking_exposure.blend 2. Note light strength and exposure values 3. Click Bake Resulting texture: ![bake_01.png](https://archive.blender.org/developer/F8440139/bake_01.png) Expected texture: ![bake_02.png](https://archive.blender.org/developer/F8440141/bake_02.png) File: [baking_exposure.blend](https://archive.blender.org/developer/F8440143/baking_exposure.blend)

Added subscriber: @JonathanLampel-4

Added subscriber: @JonathanLampel-4

Added subscriber: @Foaly

Added subscriber: @Foaly

I think this is the intended behavior.

Applying the scene Color Management would be wrong.
Especially if you have something like the Filmic view transform set.

Adding an extra exposure setting to the bake panel would be possible.

Right now, I suggest you bake to a 32 bit float texture.

I think this is the intended behavior. Applying the scene Color Management would be wrong. Especially if you have something like the Filmic view transform set. Adding an extra exposure setting to the bake panel would be possible. Right now, I suggest you bake to a 32 bit float texture.

Added subscriber: @iss

Added subscriber: @iss

I agree with @Foaly, this is working as intended.

But when I baked to 32 bit texture and render, the color was quite a bit off. Unless I did something wrong. So there may be a bug in this use-case, but I am not sure.

I agree with @Foaly, this is working as intended. But when I baked to 32 bit texture and render, the color was quite a bit off. Unless I did something wrong. So there may be a bug in this use-case, but I am not sure.

Applying the scene Color Management would be wrong.
Especially if you have something like the Filmic view transform set.

This is interesting, because you're totally right that for things like AO, it's wrong to apply color management since we need those pure whites and blacks. Same goes for the Shadow, Normal, UV, Roughness, and Emission.

For Environment, Diffuse, Glossy, and Subsurface though, it seems to be appropriate to apply color management or else the bake appears broken. Here's an example with a very normal light source, no exposure change, and an poor result:

image.png

> Applying the scene Color Management would be wrong. > Especially if you have something like the Filmic view transform set. This is interesting, because you're totally right that for things like AO, it's wrong to apply color management since we need those pure whites and blacks. Same goes for the Shadow, Normal, UV, Roughness, and Emission. For Environment, Diffuse, Glossy, and Subsurface though, it seems to be appropriate to apply color management or else the bake appears broken. Here's an example with a very normal light source, no exposure change, and an poor result: ![image.png](https://archive.blender.org/developer/F8441661/image.png)

@JonathanLampel-4 In what sense is it broken? If you used 32 bit float textures, it should be ok.
If you plug in the result of a diffuse bake into an Emission shader (with strength 1.0), it should show the exact same result as if you just rendered with the original shader (disregarding specular).
Always applying the view transform would destroy that.

If you really want to apply the view transform, you can:

  1. Bake to a float texture
  2. Click Image > Save As
  3. Choose image type and check Save As Render

This will apply the view transform on saving.

Note that I noticed a bug here as well:
Sometimes Blender immediately reloads the just-saved file and therefore applies the view transform in the image editor as well.
In other cases, the image will stay untransformed in the editor.
I suspect this has to do with File > External Data > Automatically Pack Into .blend being checked.

@JonathanLampel-4 In what sense is it broken? If you used 32 bit float textures, it should be ok. If you plug in the result of a diffuse bake into an Emission shader (with strength 1.0), it should show the exact same result as if you just rendered with the original shader (disregarding specular). Always applying the view transform would destroy that. If you really want to apply the view transform, you can: 1. Bake to a float texture 2. Click *Image* > *Save As* 3. Choose image type and check **Save As Render** This will apply the view transform on saving. Note that I noticed a bug here as well: Sometimes Blender immediately reloads the just-saved file and therefore applies the view transform in the image editor as well. In other cases, the image will stay untransformed in the editor. I suspect this has to do with *File* > *External Data* > *Automatically Pack Into .blend* being checked.

Whoa! Save As Render is exactly what I was looking for then. Thank you! Still seems like a strange workflow, but I can get the intended result this way. I'll close this out and tag it as not a bug. Thanks again!

Whoa! Save As Render is exactly what I was looking for then. Thank you! Still seems like a strange workflow, but I can get the intended result this way. I'll close this out and tag it as not a bug. Thanks again!

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

Changed status from 'Needs Triage' to: 'Archived'
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#75259
No description provided.