directed by oaf40
Viewing sample resized to 27% of original (view original) Loading...
Description

Inpainting glasses? More like (in pain)ting :D

Since SD works in a single flat dimension it doesn't understand the concept of layers and when I inpaint the lenses it fucks up the eyes. I came up with my own solution to this problem, it's not easy and quick but I'd like to share it here hoping someone would improve it one day. Assuming you've already fixed the eyes themselves (manually or adetailer):
1. Open the original image in the editor (I guess most of us are using Photoshop or GIMP)
2. Create a new layer, doodle the glasses frame and solid color lenses, not sure if I translated it right but I mean that the eyes must not be visible behind the drawn lenses.
3. Inpaint it, I've got the best results with 40 steps of Euler A at 0.4 denoise rate; but really it depends on a model you use. At this stage we don't care about the lenses, all we need here is the frame and its shape. Keep inpainting until you get something you like.
4. Import the generated image into your editor as a layer atop of the original picture (hide your doodled glasses layer first)
5. Create a mask for the inpainted layer, draw it in such a way that the lenses are not rendered and only the frame is kept intact. Using a brush with cranked up Feathering value helped me a lot.
6. Create a new layer atop of the original picture but below the inpainted frame, copy the mask from the glasses frame and invert it, as result only the lenses would be rendered on this layer
7. Pick a color for your lenses and use Bucket Fill tool to create solid lenses again
8. Change the Blend mode for the lenses layer to Normal and play around with Transparency level. For tinted lenses I find the range 40~50% the best depending on the hue.
9. Initialize yet another layer with the mask for lenses, render Perlin Noise (is available in GIMP, not sure about PS) with big zoom and large "grain" size, this will make a very good imitation of slightest surface imperfections and barely visible reflections/glares. Set the blend mode to Overlay and apply a little bit of additional Gaussian Blur right after.
10. For lens glares pick a solid white brush with big Feathering value, draw some glares on a new layer and set its blend mode to LCh Lightness, this will make a neat and almost plausible glare.

There are few more alternative versions available in my channel as rawgens: https://t.me/oaf40_pub/761

Blacklisted
  • Comments
  • There are no comments.