All the configurations are done inside the G’MIC filter and I didn’t use any other editing options within GIMP.
My biggest gripe is I couldn’t match the shadows.
The reference image has a sharp shadow.
I fiddled with the filter’s settings under Illumination section but couldn’t generate anything similar to the reference one.
Also the quality of the rendered image is much higher to the generated one.
Increasing smoothness introduces a dark shadow on the rims.
Specular highlight seems off but I think I can manage that.
I am testing all these as I am planning to do lighting for 2d objects used for backgrounds/environments in animations with the help of this filter.
There is no way you can achieve your goal in a display-referred space and the issues you are having are typical of non-linearly encoded RGB spaces (dark fringes around edges, posterization in gradients, non-realistic light fall-off). I don’t even need to ask you, the picture speaks for itself: it’s obvious that you are working in some kind of sRGB space with gamma 2.2-2.4.
You need to do the lighting over a 32 bits float file encoded in a linear RGB space (no OETF/gamma nonsense). I don’t know if GIMP and GMIC can take that, but that’s how you do it.
See, for the past year I have kept repeating to people that image processing in non-linear spaces was doomed, and many thought I exaggerated and display-referred was just fine. Well, that’s what you get when you push ill-managed image software beyond the point of “I’m just shooting the dog and the kids, no biggy”.
Slack on the pixel management pipeline, and expect this kind of result.
See, for the past year I have kept repeating to people that image processing in non-linear spaces was doomed, and many thought I exaggerated and display-referred was just fine.
Can you recommend anything to learn more about this issue?
You need to do the lighting over a 32 bits float file encoded in a linear RGB space (no OETF/gamma nonsense). I don’t know if GIMP and GMIC can take that, but that’s how you do it.
I don’t think the illumination command was meant to be realistic. It was a first implementation with an artistic bent. I am sure that it could be improved. Not sure of the level of interest though.
G’MIC is a general purpose tool. It has the building blocks to build whatever you wish. Complaining about nonlinear or display-referred space is moot for this reason. But it does mean you need a firm grasp of the concepts and a bit of scripting ability to know when to adapt the code for your purposes.
Hey, thank you for trying this out.
You have matched the shadows almost perfectly.
And thank you for sharing the values.
One question.
The fringes around the edges can be smoothed by increasing Smoothness value, but it get rids of other necessary details within the shape. Any workarounds to this?
And the posterization effects that we can notice in the mid-tones here are due to GIMP itself or the way the Illuminate 2D Shape filter works?
@afre
I am happy with the tool, I just wish I had better grasp over it like @bazza here.
I have examined the code: it is not sRGB; please stop with the condescension. Potential weak points might be the colour selection tool and the raster editor interfacing with the plugin.
G’MIC has no concept of Colour Space. We can try to give the illusion of it, but all in all, it doesn’t. For this reason, I do find myself trying to my g’mic code work with as many “colour space” possible, and still doing different ways about it. Right now, I’m thinking of multimultiply/multidivide by separating channels and multiplying per channel where number is given by $* where * is the variable placement.