I was going to have a look at it now as I said, but it seems to have been completed already
Colour correcting HDRIs
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Re: Colour correcting HDRIs
Mmm, no, I don't think so
Re: Colour correcting HDRIs
I checked in Blender + daily build, and HDRI now has a "tint" option.
So maybe BYOB added it there?
So maybe BYOB added it there?
Re: Colour correcting HDRIs
I just added back the option to use the rgb gain on sky and HDRI to give them a color tint, like it was before v2.3.
Re: Colour correcting HDRIs
Ah okay I see. just re-read all of this, so I guess we're still in need for saturation for example. I will take a look at it then.
Might need to come back with some questions about the arbitrary node trees
Might need to come back with some questions about the arbitrary node trees
Re: Colour correcting HDRIs
You can look at the displacement shape code, where the height is also obtained from executing a texture node tree. Basically you just create a fake hitpoint and call the GetSpectrumValue() method of the supplied texture.
In the case of environment maps, it would be useful to have UV coordinates in the hitpoint which correspond to the mapping of the HDRI (a latlong sphere mapping).
Since the node tree only has to be evaluated on the CPU and is then baked into the HDRI map, you don't have to deal with OpenCL and its complexity.
In the case of environment maps, it would be useful to have UV coordinates in the hitpoint which correspond to the mapping of the HDRI (a latlong sphere mapping).
Since the node tree only has to be evaluated on the CPU and is then baked into the HDRI map, you don't have to deal with OpenCL and its complexity.
Re: Colour correcting HDRIs
Ok, so I've been spending a bit of time to work my way through the relevant code and implement something.
I finally did it essentially as a copy of the ReverseGammaCorrection method. I'm not quite sure if I've added the additional argument to all functions, but at least it compiles and works in a simple scene. I guess this could be implemented for function like contrast, hue shift, color temperature shift. Anything else?
I didnt't progress yet on arbitrary nodes, a lot more of the existing code base to uderstand for that... But I'm also not sure if that would matter with respect to writing the code above, or if it will be just a question of evaluating arguments to pass ?
I finally did it essentially as a copy of the ReverseGammaCorrection method. I'm not quite sure if I've added the additional argument to all functions, but at least it compiles and works in a simple scene. I guess this could be implemented for function like contrast, hue shift, color temperature shift. Anything else?
I didnt't progress yet on arbitrary nodes, a lot more of the existing code base to uderstand for that... But I'm also not sure if that would matter with respect to writing the code above, or if it will be just a question of evaluating arguments to pass ?
Re: Colour correcting HDRIs
The thing is, if you implement contrast, hue shift and color temperature, people will soon ask for another feature, and another, and so on.
If you only implement support for arbitrary nodes, you don't need to do anything else (and if there are missing operations, they will become available to both HDRI tweaking and regular textures/materials at once when implemented).
If you are stuck with anything, feel free to ask me for help.
Re: Colour correcting HDRIs
I've been slacking off on this, but i've not given up
Anyways, a bit more pointing me in the right direction might be helpful.
I've been looking at the displacement shape as you suggested but (in the LuxCore code) I don't see how that shows a node tree. There it seems to just load a texture map.
Is the tree evaluated in BlendLuxCore?
Also, if I see this right, the background has no option to use nodes in BlendLuxCore at the moment
Anyways, a bit more pointing me in the right direction might be helpful.
I've been looking at the displacement shape as you suggested but (in the LuxCore code) I don't see how that shows a node tree. There it seems to just load a texture map.
Is the tree evaluated in BlendLuxCore?
Also, if I see this right, the background has no option to use nodes in BlendLuxCore at the moment
Re: Colour correcting HDRIs
Adding a pre-process image map pipe line like the pre-process geometry pipe line may be a bit complex as a task and it may be better if I write the infrastructure (if we want to have one; we could plan one for the next version).
In the mean time I would stick to the original simple idea to have another pre-processing ChannelSelectionType option like component selection or color averaging, etc.: https://github.com/LuxCoreRender/LuxCor ... map.h#L554
In the mean time I would stick to the original simple idea to have another pre-processing ChannelSelectionType option like component selection or color averaging, etc.: https://github.com/LuxCoreRender/LuxCor ... map.h#L554