Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to generate 3d lut by many RGB Color pairs? #1967

Closed
1623275623 opened this issue Apr 26, 2024 · 1 comment
Closed

how to generate 3d lut by many RGB Color pairs? #1967

1623275623 opened this issue Apr 26, 2024 · 1 comment

Comments

@1623275623
Copy link

I have so many color pairs which is source color and target color. I want use these pairs to generate a 3d lut file? How I can do it? I want to konw whether OCIO will generate lut i need. thank you.

@KevinJW
Copy link
Contributor

KevinJW commented May 14, 2024

Unfortunately OCIO doesn't really have any tools to generate a LUT file from a set of colour pairs.

However, in terms of making a LUT that OCIO can read, there are a number of formats which are simple text files, if your measurements are in the form of uniformly spaced sampling of the 3D cube, you might find it easy to format your measurements in a format like this https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/main/src/OpenColorIO/fileformats/FileFormatSpi3D.cpp#L19 You would need to adjust the line containing '32 32 32' to match the number of readings you have., but everything else in the header should probably remain the same.

If you have non-uniformly sampled, or some other distribution of data then you would need something that deals with sparse data and I'm not sure we have something for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants