I've been struggling to figure out a way to make a glass cup full of water, and since the cup is made of glass a plane on the top of the glasse won't really do it, so how can i go around making the glass looks like it's full of water?

  • 1
    \$\begingroup\$ I think in order to answer this question properly we would need to know how well you want this to look. You could go really far out here by adding a fluid physics simulation and even simulate realistic light diffraction. Or you could go the quick and dirty route and just put a transparent cylinder into the glass. If the glass does not appear in a very prominent location, then that would likely be the best solution. \$\endgroup\$
    – Philipp
    Commented Nov 9, 2018 at 11:16
  • \$\begingroup\$ I want it to be simple but not as simple as putting a transparent cylinder inside, in terms of how it looks just a blue color is enough for now no need for diffraction or transparency but i'll need to have fluid physics like slosh(nothing advanced just water rotating in the opposite direction of the cup or something like that) and water spilling \$\endgroup\$ Commented Nov 9, 2018 at 14:58
  • 1
    \$\begingroup\$ Those last three words "and water spilling" take this from a simple visual effect we can accomplish with a number of graphics tricks straight into a non-trivial fluid simulation problem. :( Is that really a necessary part of "make a glass cup look like it's full of water," or is that a new problem you might want to ask about separately? \$\endgroup\$
    – DMGregory
    Commented Nov 12, 2018 at 17:48
  • \$\begingroup\$ It's a new problem that i havent given many thoughts to it yet since i want to tackle it after i'm done with this making the glass look like it's full of water with not close to reality physics because that will take a lot of effort but i also want it to look like water of course ^^ \$\endgroup\$ Commented Nov 15, 2018 at 15:18

1 Answer 1


Actually recreating the effect would probably require raytracing, but you can fake it with a blur effect and a distortion that "blows up" the pixels behind your glass. It is especially convincing if you have a few simple shapes that use the effect (a glass, for example, is usually a cylinder or a truncated cone).

  • \$\begingroup\$ The shapes i'm going to use are going to be simple, i didnt understand how raytracing would help in this case, i'm not very familiar with it so can you explain more pleas \$\endgroup\$ Commented Sep 21, 2018 at 22:35
  • 1
    \$\begingroup\$ @Saad raytracing isn't really an option here, since it's slow, but basically, that would simulate the light going through the water, so it's easier to fake it \$\endgroup\$
    – Bálint
    Commented Oct 7, 2018 at 16:35
  • \$\begingroup\$ Sorry I didn't reply, meatspace got in the way, but basically what Balint says - water affects light going through it (and by extension the image you see through it), and it depends on the exact shape of the "border" between water and air or a third transparent medium (such as glass). Flat borders tend to be easiset to sumulate because no distortion occurs. It is possible to achieve specific kinds of distortion with a bump map, see Riemers series on water shaders web.archive.org/web/20091008171244/http://www.riemers.net:80/… \$\endgroup\$ Commented Oct 8, 2018 at 20:04
  • \$\begingroup\$ (2/2) The specific chapter linked has a good example of doing some real-world light-related calculations without really raytracing anything, not sure how to put this in my answer though. \$\endgroup\$ Commented Oct 8, 2018 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .