Add fast linear light -> srgb conversion path #29309

Closed
opened 2011-11-17 17:49:18 +01:00 by David M · 8 comments

%%%Hi,

Rendering in the interface is currently slowed down quiet a lot by conversions
from linear to srgb (if color management is enabled).

The attached patch implements a LUT to speed it up.

Rendering the default cube in 4096x2048 took 8.4sec before the patch
and 3.3sec afterwards.

till then, David.
%%%

%%%Hi, Rendering in the interface is currently slowed down quiet a lot by conversions from linear to srgb (if color management is enabled). The attached patch implements a LUT to speed it up. Rendering the default cube in 4096x2048 took 8.4sec before the patch and 3.3sec afterwards. till then, David. %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

%%%Updated patch moves dithering logic into math_color.c

This simplifies render_internal.c, while exposing more
conversion functions in math_color.h.%%%

%%%Updated patch moves dithering logic into math_color.c This simplifies render_internal.c, while exposing more conversion functions in math_color.h.%%%

%%%I think this is fantastic. However, given the migration path to OCIO I'd love to see this done without the hard coded sRGB LUT.

Is it possible you have the ability to contribute to the OCIO migration David? Xavier was working on a branch at GitHub. Most of the infrastructure is in place already.

https://github.com/thmxv/blender-ocio%%%

%%%I think this is fantastic. However, given the migration path to OCIO I'd love to see this done without the hard coded sRGB LUT. Is it possible you have the ability to contribute to the OCIO migration David? Xavier was working on a branch at GitHub. Most of the infrastructure is in place already. https://github.com/thmxv/blender-ocio%%%
Author

%%%When/If OCIO is integrated all this would need to be replaced anyway. I agree, that would be nice but I also feel that it would be a
much larger project. This patch, as it stands, is rather simple and I think would be of great value for the meantime.

I haven't yet taken a closer look at that branch, so I might be overestimating the complexity of integrating OCIO.
I will look at it soon to see if I can help out in some way.
%%%

%%%When/If OCIO is integrated all this would need to be replaced anyway. I agree, that would be nice but I also feel that it would be a much larger project. This patch, as it stands, is rather simple and I think would be of great value for the meantime. I haven't yet taken a closer look at that branch, so I might be overestimating the complexity of integrating OCIO. I will look at it soon to see if I can help out in some way. %%%
Author

%%%Attached updated patch for current trunk.%%%

%%%Attached updated patch for current trunk.%%%

%%%I am wondering if it might be possible to use a real LUT here to control chromacity in addition to simply gamma. It would allow one to use a properly calibrated display at D65 and get correct white at D50.%%%

%%%I am wondering if it might be possible to use a real LUT here to control chromacity in addition to simply gamma. It would allow one to use a properly calibrated display at [D65](https://archive.blender.org/developer/D65) and get correct white at [D50](https://archive.blender.org/developer/D50).%%%

%%%Patch committed, thanks!

Did some minor code style changes, and fixed one issue with variable "initialized" not being initialized to 0.%%%

%%%Patch committed, thanks! Did some minor code style changes, and fixed one issue with variable "initialized" not being initialized to 0.%%%

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
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#29309
No description provided.