Added Bake Method "Light Map" #37081
Labels
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
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
9 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#37081
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%I find that in games we often want to bake textures and lighting separately so we can have different resolutions for each map among using other techniques such as merging real-time in-game lights/specular/shadows with baked light maps before multiplying to the texture maps.
This patch provides a new bake method "Light Map". This bake mode produces a map which is essentially the same as RE_BAKE_ALL, but the texture color is set to white. This allows the resulting map to be directly multiplied to the texture color for a result that is very close to the same as RE_BAKE_ALL. I believe the ever-so-slight discrepancy is due to the fact that each "apply" (for example when applying ao, env, or indirect) when compositing the final color multiplies against the texture color as they are applied, where this patch multiplies against 1.0 and expects the user to multiply against all the accumulated light all at once later while in-game rendering. The math theoretically should be the same as far as I can tell, but there is possibility of floating point rounding or difference in sample locations of AO.
Although this is a NEW bake method for 2.68a, it uses a #define which already existed named "RE_BAKE_LIGHT" (defined as '0'). I assume the original intent of this definition is the same as what this patch is doing, though perhaps it was either never fully implemented or for some reason removed.
I have attached 5 files:
bake_FULL.png - example of scene rendered with RE_BAKE_FULL to compare against
bake_LIGHT.png - example of result of this patch using RE_BAKE_LIGHT or "Light Map" mode.
bake_TEXTURES.png - so you can multiply the LIGHT pass against this pass to compare to FULL
bake_diff.png - difference between FULL and LIGHT*TEXTURES with the brightness set to +100 and contrast +65 in Photoshop (Not a noticeable difference without the amplification)
bake_setup.blend - the text file set up and ready to bake
Note: the images I am attaching came from a build of Blender which also has patch #37015 (raytraced indirect lighting). Images with only this patch will be darker than the test images supplied.%%%
Changed status to: 'Open'
%%%I would like to see this patch included in trunk. +1%%%
%%%+1%%%
%%%+1. Very useful for baking in games%%%
Added subscriber: @Swyter
Removed subscriber: @JorgeBernalMartinez
Added subscriber: @lichtwerk
Added subscriber: @OlightS1A
This comment was removed by @OlightS1A
Changed status from 'Open' to: 'Archived'
Added subscriber: @Livethelight420
This comment was removed by @Livethelight420
Added subscriber: @brecht