How to create a more realistic glass model


(Kuijeren) #1

I’m trying to create a realistic looking footed beer glass:

I already have played with all the setting, still it doesn’t look nice. It hard to get the glass look more realistic. Especially the glass foot looks weird.

This is what I’m aiming for, or something between my model and the below example (in terms of glass effect).

Anyone interested to improve my glass in Sketchfab (paid)? Please PM me.


#2

Mmm that sort of thing is tricky. At the moment, objects cannot refract or reflect themselves, and refractive objects cannot refract other refractive objects. Maybe you could split the inner and outer shell of the glass into separate materials, but I’m not sure if it would help get you a better result.


(Achimkinzelmann) #3

It helps a little bit to use a background that is not only one solid color (not only grey but maybe a gradient from dark grey to almost white), plus using a little higher refractive settings, so that the different background colors are refracted in the stronger curved parts of the glas. Thats what makes the dark parts in the glas in the picture below your model.


(Shaderbytes) #4

For doing refraction in realtime it will always entail some faking and best scene set up, As James mentioned real time refraction is missing heaps of actual light behaviour information so no matter what background you use you wont get the look of the darker areas as in the offline rendered glass , this simply comes from multiple light bounces self reflection and refraction.

Here is my attempt tonight at making a better glass , this is not my first rodeo trying to do this on sketchfab, I have tried glass of all kinds over and over… it is never going to look like an offline render … no matter how skilled you are :slight_smile:


(Shaderbytes) #5

as mentioned the scene set up has to be very controlled , for example the same scene as above will not work with lighter backgrounds because the outerglass and the liquid use additive blending to achieve the look they do on the darker background and dont have sorting issues. If you needed to have a different background , you would then have to engineer different settings for the glass.

This is common to real time rendering , nearly everything is a approximation and the bigger the approximation the more control you need to input into the things that influence those numbers. As mentioned above here is exactly the same scene settings , just with lighter backgrounds see how as it gets lighter , the additive blending looks worse.


(Shaderbytes) #6

For those interested in the scene set up , i have two glass materials , one for inner and one for outer , the refraction is on the inner glass material , there is a texture map controlling the refraction opacity and it simply darkens those areas as in the offline render ( faking the effect ) the outer glass is additive as well as the liquid.
Clearcoat is also used to boost reflections , the outer glass has a mirror roughness and the inner has a ever so slightly more rough finish.


(Kuijeren) #7

Thanks for you input James and achimkinzelmann.

Your experiment is really nicely done Shaderbytes, thanks!

I think using a darker background also helped a lot. And dividing it in two separate materials is probably a clever solution. And a filled glass of beer is always better than an empty one :slight_smile:

Would there be any improvement if the glass was standing on a dark underground, with some shadows from the glass reflecting on the layer underneath? As It would be standing on a table. I’m just finding ways to make it look as realistic a possible. I will PM you.


(Kuijeren) #8

image