Inkscape.org
Beyond the Basics Realistic glass?
  1. #1
    Mihai Dobrescu Mihai Dobrescu @msdobrescu

    Hi, I try to make a coffee mug made of double walled thermal glass, with handle.

    I have shaped it so far and I get a metallic or a transparent plastic look, but it does not look exactly as a realistic glassy one.

    Is there a tutorial or technique, a winning effect or filter combination, to emulate a realistic glass?

    Thank you.

  2. #2
    Hum Hum @Hum

    Hi. I did a quick search and found these videos. They may prove helpful.

    https://www.google.com/search?q=inkscape+glass+effect&safe=active&client=ms-android-verizon&prmd=vin&sxsrf=ALeKk03S5Hvhybw6HnFYl99kobqWmrHv8g:1621362872985&source=lnms&tbm=vid&sa=X&ved=2ahUKEwib9uGw79PwAhXqRTABHdqlBoYQ_AUoAXoECAIQAQ&biw=360&bih=560&dpr=2#ip=1

     

  3. #3
    Mihai Dobrescu Mihai Dobrescu @msdobrescu

    I've seen some, work for generally straight lines and linear gradients.

    The most difficult for me is the handle, especially that seems to look different.

    I am no graphic designer... I presume I miss something.

  4. #4
    ian ian @Ianp5a
    *

    @msdobrescu Clear glass has has many internal reflections, and double walled glass even more so. To make it look realistic I look at a real object or sample photos. And then draw the glass background, e.g. with a mesh gradient, and then add objects on top for each reflection. See below from a glass I drew from the photograph on the left.  The final result on the right and the reflection objects separated in the middle picture. 

    Image 2021 05 19 071312
    Image 2021 05 19 070544
    Image 2021 05 19 070433
  5. #5
    Mihai Dobrescu Mihai Dobrescu @msdobrescu

    Indeed, I am looking at a real object. Well, I've missed one thing I've tried: to have a transparent item that would be placed on any background colour and that be visible, so I have tried to apply effects for the reflections like screen, overlay or soft light.

  6. #6
    ian ian @Ianp5a
    *

    I too am no graphic designer, but I have learnt from them to keep it simple. Here I have not used blending modes. Just normal transparency. Work by eye and think in terms of light and dark. As the end result is just areas of light and dark with no transparency. Look especially for the subtlest reflections. As they make the realism greater. See below a ceramic white cup with almost invisible white objects overlaid.  

    White Cup
  7. #7
    Mihai Dobrescu Mihai Dobrescu @msdobrescu
    *

    Indeed. My attempts show a problem that comes in printing too. I have used a gradient or a mesh with white/greys/black stops and transparency that would create kind of complementary colours over some other colour due to alpha blending, I guess. Or a very annoying gray out of place there.

    About this, there is an AI pattern for this, the object is done from completely opaque paths or meshes, then a transparency mask is applied (also made of white/grey/black areas). Would this work in Inkscape too?

    @Ianp5a , how did you make that glass foot gradient to follow the shape? Is it a mesh or an effect/filter?

  8. #8
    ian ian @Ianp5a
    *

    @msdobrescu It's mostly done with gradient mesh. Which is an easy way to add light and dark areas that follow shapes that are not straight.

  9. #9
    Mihai Dobrescu Mihai Dobrescu @msdobrescu
    *

    @Ianp5a , I was expecting this, as obvious, I've just hoped to be other way too, like the In and Out effect I've seen on other topic in one of the Inkscape forums, but that never worked for me.

    Then, how do you put the glass foot over a black or brown or light yellow background, or a gradient, if needed? You edit the stops colours again and again, right?

    Is your work available on some open source project (I see the Ubuntu logo) to be able to study it?

  10. #10
    ian ian @Ianp5a

    @msdobrescu >how do you put the glass foot over a black or brown or light yellow background?
    That's where simple transparency is important. I'm sure the other blend modes have their uses. I'm suggesting to master the simpler stuff first. Once done, the way to the next level will be clearer. 

  11. #11
    Mihai Dobrescu Mihai Dobrescu @msdobrescu

    @Ianp5a, would you please share an (raster) image as result of a flat background having the color ff5555ff?

    Usinjg transparency, mine looks like this:

  12. #12
    ian ian @Ianp5a

    I'm not sure what you mean. Like this? It's not misty like yours. This is the colour of the darkest nodes of the gradient.

    Image 2021 05 19 171316
    Image 2021 05 19 171158
  13. #13
    Mihai Dobrescu Mihai Dobrescu @msdobrescu
    *

    Exactly, this is my issue, the gradient produces this effect. I try to understand the reason.

  14. #14
    ian ian @Ianp5a
    *

    On the 100% transparent nodes that show no colour, set the colour to black like mine above. As it is trying to fade to white.

    You can make the colour of all nodes black in one go if you:

    1. Create a black square and place it behind the gradient mesh
    2. Select all the nodes with the gradient mesh tool
    3. Click the "Pick Colours" dropper icon at the top. see image below

    Any colour will be set to black, but transparency will not be changed.

  15. #15
    Mihai Dobrescu Mihai Dobrescu @msdobrescu

    I think white vs black, with some transparency degree set, has different results.

    Still, far from what I try to achieve, I did not get it yet.

    How would you adapt your drawing if you need to have that glass over black background?

  16. #16
    ian ian @Ianp5a

    Check if anything can be reused. Otherwise draw from scratch and not use all of the old objects. It is often faster that way as you have no limitations and can plan everything freely. There are different styles of working. The "throwaway" quick results style is popular. If it looks OK move on. Don't fuss over the details. Quite different from the "planned" thoughtful, reusable approach. I use both of these styles where appropriate.  I still get bogged down when I've put a lot of effort in, and don't really want to change something even though it needs it.