LuxCoreRender / LuxCoreRender/BlendLuxCore

Exposing OpenColorIO in Blendluxcore

Open
#993 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
877
Forks
108
PR merge metrics
No merged PRs in 30d

Description

EDIT. Some extra info. I worked with the default colormanagment that comes with Blender for this. Meaning by default Blender assumes rendered image in Linear Rec.709.

Here is my proposed plan how to expose the already existing OpenColorIO functionality in BlendLuxCore

  1. The benefit.
    I think it can be argued, that for casual users there is not much to gain and the target users have some specific need for it. In some cases simple reverse gamma might not be enough to properly handle textures.

  2. Adding use ocio.config to extension settings as a boolean toggle to use opencolorio and a path to config file.

Image

An example from Guerilla Render where user can select their ocio.config. It has more settings to choose from but we can ignore exposing those.
Image

  1. Changes to imagemap node. If opencolorio is enabled from addon settings, the nodes could default to opencolorio mode. It gives user a dropdown to select from a variety of different input colorspaces. We should also remove the normalmap toggle and expose the dedicated normalmap node to streamline this workflow as well. It feels unintuitive to use the whole list of avaiable color transforms present se we could perhaps take a hint from https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/releases

Image

Important ones to have are - ACEScg, Linear Rec.709 (sRGB), sRGB Encoded Rec.709 (sRGB), Data

Image

  1. Constant colors pose one question, but I feel like in the end users have to be vary of how it works.
    Currently whatever color is defined in constant color gets sent to LuxCore as it is and I don't think there should be any changes to that. Looking at the screenshot from Guerilla, there is a place for colorpicking colorspace and that can be relevant in some cases, but I think it is better to ignore in Blender.

Currently when you pick a color inside blender, what the colorpicker registers, gets sent to rgb values, When we define a colorpicker colorspace, it will apply additional conversion after registering the values. For example users pick a color 0.5 on all RGB and we assume that colorpicker should register values from Output-sRGB, the values get applied a reverse gamma. This is a problem inside blender as when you import an image, for example a texture for cloth and colorpick it, since blender's colormanagment already applied reverse gamma on this image, you would get double the amount.

When I inspect my texture in blender, which has been defined as sRGB texture, image editor color inspector (i inspect the white tile) shows me the original file value, before applying the conversion. When I colorpick it from LuxCore constant color I get a different value, which is the value I get when we remove the sRGB curve and make the image linear. So in reality we already end up with the correct value in our constant color.

Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing OpenColorIO functionality and the imagemap node implementation in BlendLuxCore. Trace how addon settings and image colorspaces are currently handled, then define the exposed configuration, colorspace choices, and normalmap behavior described in the issue. Done means the proposed OpenColorIO workflow is available through the addon and imagemap node without changing constant-color handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.