Vixen
02b45cc4
csharp
public static class CubeLut

Reads the Iridas/Adobe .cube grading table into a 3D texture.

Read the guide page for this →

Remarks

What a colourist hands over. Resolve, Baselight, Nuke and Photoshop all export this and nothing else is as widely written, so it is the format that makes "grade it properly and give me the file" a workflow the engine supports rather than a request for numbers.

Why 3D and not three curves. A curve maps each channel from itself, so it cannot rotate a hue or desaturate only the greens. A table indexed by the colour as a coordinate expresses any mapping at all, and the hardware's trilinear filter is exactly the interpolation between entries — so an arbitrarily complicated grade costs one texture fetch. That is the whole reason the format won.

⚠ It is display-referred, and the tonemapper samples it after the curve for that reason. The input is a texture coordinate, so it has to be bounded — and a grade authored on values that have already been through a curve behaves the way the colourist saw it. What it therefore cannot do is anything to values above white, which is why the scene-referred grade in ColorGrading exists beside it rather than instead of it.

Fields and properties (1)

  • public const int MaximumSize

    The largest edge this reads, which is far past what anybody authors.

Methods (1)

  • public static TextureData Parse(string text)

    Parses a table into a 3D texture, ready for Ktx2.Write.

Used by (2)

  • CubeLutImporterVixen.Editor.Assets
  • CubeLutTestsVixen.Editor.Assets.Tests