Skip to content

Roadmap for a color-managed workflow in three.js #23614

@donmccurdy

Description

@donmccurdy

Overview

Summary issue to organize and track progress toward offering a color-managed workflow in three.js. Loosely based on Maya's documentation, I'll define color management as follows:

Color management involves applying the appropriate transforms to convert between color spaces as needed. These transforms are applied at specific points along the initialization, rendering, and display processes. For example:

  • On input, a transform is applied to convert colors and textures from the color space in which they were saved into the working color space.
  • As you work, colors in the working color space may be converted to/from other color spaces in order to accommodate bit depth and precision considerations.
  • On output to an image or display, an output transform is applied to convert colors appropriately for the image format or browser and device capabilities.

Roadmap

  1. (1.1) Add documentation of color management APIs (@donmccurdy)
  2. (1.2) Loaders identify and convert color spaces correctly (@gkjohnson)
  3. (1.3) Rename "encoding" properties more precisely as "colorSpace" (@donmccurdy + @Mugen87)
  4. (1.4) Change output color space default from Linear-sRGB to sRGB (@donmccurdy)
  5. (1.5) Convert some inputs automatically from sRGB to Linear-sRGB (@donmccurdy)
  6. (1.6) Change texture.colorSpace default to THREE.NoColorSpace (e.g. normal maps)
  7. (1.7) Ensure intermediate frame buffers have sufficient bit depth for their color space. See outputEncoding not handled correctly when using sRGB render target in WebGL2 #23251 (comment). No changes required.
  8. (1.8) Let CubeTextureLoader return sRGB cube textures by default.
  9. (1.9) Change renderer.useLegacyLights default to false

Timing considerations: If we are doing (1.3), (1.4), and (1.5), it would cause less disruption to existing code if we can make these changes within the same release. Fewer changes, if any, will be required for end-user code.

Future

These changes are more speculative, and may be considered explorative steps toward support for wide-gamut color spaces in WebGPU and SVG renderers.

  1. (2.1) Support changing ColorManagement.workingColorSpace
  2. (2.2) Support color input/output in Display P3 color space
  3. (3.3) Support vertex color workflow changes if necessary (ColorBufferAttribute?)

Continued in #26479.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions