glass and liquid

How do you make a clear glass with a liquid drink inside


  • edward13 replied

    or how do you make a clear canopy so you can see the pilot inside


     

  • spikeyxxx replied

    The first question is actually pretty hard to answer.

    Important: glass always has thickness, otherwise the light won't refract (fancy word for bend) correctly:

    Glass1.png

    When you make a glass with liquid, you need to give the glass two Materials, the inside of the glass where there is liquid gets a different Material:

    Glass2.png

    Duplicate the top edges of the liquid and P > Seperate by Selection. Back into Object Mode, select the new Object, go into Edit Mode and Fill it and give it a water Material:

    Glass3.png

    When using Cycles, you are done:

    Glass6.png

    With Eevee you need to tick some boxes for glass to work:

    Glass5.png

    Global Screen Space Reflections and Refraction and also in each Material.

    Now, where do all these different IOR values (how much the light bends) come from?

    In CG you usually give a Material a single IOR value, but each surface has an IOR that is calculated by dividing the material's IOR by the IOR of the medium the light comes from:

    Glass7.png

    This is probably a lot more than you wanted to know :)

    2 loves
  • spikeyxxx replied

    And as a bonus, with air bubbles (IOR= IOR(air)/IOR(water)=1/1.333=0.75):

    Glass8.png

    Look at all these complicated reflections and refractions and enjoy...

    I do hope this was helpful in some way.

    1 love
  • edward13 replied

    thank you


    1 love
  • edward13 replied

    what I am trying to do is show a medic helping someone, so I want to show the liquid in the needle

    i also want to show some glowing liquid in a bottle  

  • spikeyxxx replied

    Missing images from above. In order (Glass1, 2, 3, 6, 5, 7, 8):
    Glass1.png

    Glass2.png

    Glass3.png

    Glass6.png

    Glass5.png

    Glass7.png

    Glass8.png