-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add an exporthaldclut lighttable module #247
Conversation
| require "exportLut" | ||
|
|
||
| Given a haldCLUT identity file this script generates haldCLUTS from all the user's | ||
| styles and exports them to a location of their choosing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide a link to an explanation of a haldCLUT identity file? I didn't know what one was but I found https://rawpedia.rawtherapee.com/Film_Simulation, which provided an explanation and a way to create one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a direct link to the identity haldCLUT: https://rawpedia.rawtherapee.com/images/8/83/Hald_CLUT_Identity.tif
Ideally I feel like it would be better from a usability standpoint to include it with the script. I wasn't able to find a clearly defined way to include extra resources with a script, however, so I left it up to the user to provide their own identity haldCLUT.
contrib/exportLUT.lua
Outdated
| } | ||
|
|
||
| local function export_luts() | ||
| identity = dt.database.import(file_chooser_button.value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you create a separate film roll for this file? if you just do an import, then the file is imported into the active film_roll at time of invocation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Film rolls have always been a little mysterious to me so it's entirely possible I'm missing something here but I don't seem to encounter this behaviour.
|
This is a neat idea. I'm curious to see how it will work in practice, meaning that the applied LUT may not meet people's expectations depending on what the style contains. I'll test it with some of the film styles and see what I get. |
|
Thanks for the feedback, looks like I have some digging to do into the lua API 😄. Hopefully in the next week or so I can push up some changes. I think you're correct in stating that getting the plugin to be intuitive for users may be difficult. I used the script to create LUTs for the t3mujin film simulation pack and while the results were good I did run into some trouble with the pixel pipe order (here's a discussion on that). Beyond operations like cropping and adding frames will break the outputted LUT. Unfortunately I don't see a way around this (beyond documentation) since as far as I can tell the lua API lacks the ability to inspect the edits being performed by styles. |
|
I found where you got the api_major_version > 6. I guess I need to fix the moduleExample.lua file. You might also consider enabling translation. You can use the gettextExample.lua file to see how it's done. Tested it and it works fine. |
|
I had one more thought. I tested using the film emulation styles, which I have set up in a style hierarchy. When a style gets converted to a LUT, the name is Film|Color|Agfa|Agfaxxxxxxx.png. Would it be better to put these styles in a folder hierarchy in the LUT folder similar to the style hierarchy? |
|
Both those (the translation and folder structure) seem like good ideas. I'll do my best to push out an update in a relatively timely manner (uni is kicking back in so unfortunately I have some time constraints now 😞) |
|
@noahwc What is the status of this PR? |
|
@supertobi hopefully I'll have everything resolved within the next week. Definitely still committed to getting this done/merged. |
|
@wpferguson I've enabled translation (I think) and luts are now exported to a folder hierarchy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and it works fine (once I used a good identity file :)). The changes with translation are the only things needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
This script creates a lighttable module which exports all user styles in the database as haldcluts.
Usage
Unfortunately due to limitations within the lua API I was unable to find a way to verify the a generated haldCLUTs is valid. Currently the script has only been tested on Linux (Ubuntu) but I would expect it to work on all OSs.