I’ve started to work on a new G’MIC filter able to automatically illuminate 2d shapes.
This is a work in progress, I’ll post some results here when new things appears.
Also, any suggestion is appreciated.
For now, what I have currently is a code that automatically transforms an input binary shape as an illumination layer, like in the examples below.
I use a Gouraud model for the illumination.
No, light position (in 3D) is a setting of the filter, so you can place it anywhere.
No, I’ve just implemented the formulas from Phong reflection model - Wikipedia and got that rendering. I haven’t checked if this was correct as the results already looked cool to me
Makings of a good filter. First impressions:
– Illumination currently makes it look like it is over- or unevenly inflated. Something between this and the render in Gmic for animation - #13 by David_Tschumperle might be an improvement.
– The sharp edges and their illumination break the illusion of 3d-ness.
Source: Wikipedia
Source: My Little Day
When this is done, could we have I chocolate filter?
(This might be a joke. Secretly, I am hoping for the illumination of not just empty shapes but ones with relief as well, like the ridges on the chocolate piece.)
So, here it is !
A first version of the filter Light & Shadows / Illuminate 2d shape has been published today, and should be available for users of the G’MIC plug-in for GIMP and Krita (requires version 2.2.2+).
Here is a video that shows what it can do.
Right now, I admit I’m quite enthusiastic by this filter, as it really allows shading complex shapes with a few clicks.
Remind also that this is a first version, so subject to changes.
Just select Output modes -> New layers and you will get the illumination layer alone, blended with your original image.
Then you can re-work on this illumination layer to create various effects or correct light locally if you want.