How to Make a Beer in Blender

Creative 3D objects
9 followers
G'day everyone and welcome to another Blender Guru tutorial. In this tutorial we're gonna be making
a beer. That's right, all you alcoholics out there can bring it over to the computer. So
this is the finished result that you can see on your screen. It's essentially a lesson in
volumetrics and reflections, transparency and all that stuff that can get a little bit
difficult. So this is the finished scene you can see right here. So very basic lighting setup
and this is what the beer is made of. So we've got a glass and we've got this thing
which is where all the froth is kind of built up and this is the actual froth itself and then we
have the liquid inside of that as well as some bubbles. So I'm going to be showing you how to do
all of that right now. So go ahead and open up a new scene in Blender. Alright so first things first
we're going to make the glass. So you can go ahead and delete your default cube and your lamp. Now
for the glass we're going to be using a cylinder as the base model. Surprise, surprise. Now for
the cylinder I'm going to be using, I'm going to scale it down to actual real world sizes. So over
here in the options I'm using the metric system by the way which you can turn on over here. Now for
the radius I'm going to set this to be 2.5 centimetres which is roughly the radius of a
beer glass and then the height is 10 centimetres which again is roughly the height of a beer glass
or I don't know what you call it pint whatever. The glass we're making by the way is called an
Irish Imperial pint. So there's a variety of different ones you can make. So don't go dropping
comments telling me the beer glass is wrong because there's a hundred different types out there.
You can make whatever you like. Alright so I've got the cylinder down here. It's now
resting on the grid floor plane and by the way if you want you can also because look at the size of
the grid floor in comparison with our glass down there it's kind of crazy. So let's just set the
scale of the scene the grid floor to be 0.1 so it's a little bit more sort of easier to judge
distances. Anyway it looks nice. Alright so delete the top plane, delete the bottom plane which I
could have done in the settings but anyways. Okay so we've got a nice cylinder. Now we want to use
a reference photo. Now it's always good to use a reference photo for modelling anything. We could
model this glass just basing off our rough memory but it always looks better if you are using an
actual reference photo. So I'm going to be using this one by Mike Rawlings of Flickr.
I had to hunt for these images for you guys. Make sure it's Creative Commons licenses. Anyways
alright so drop it in the background here. Oh yeah you can get this image of Blender Guru as
okay so we just want to line this background image up with our glass not the other way around
you want the glass to remain where it is. So let's just go 0.087 there we go oh look at that oh I
already know the measurements that's cool. Alright and I'm just going to drag the top of the glass up
to there. Now you can see it doesn't properly match up because the the image is a little bit
tilted and whatever but it's close enough we're just getting the basic geometry right. Now you
can see if I hide this glass the way this glass works is it's biggest at the sort of three
quarters of the way up sort of bulges then it tapers off in the towards the top and then it's
got sort of like a waist here like it sort of squishes in and then it comes out towards the
bottom there. So nice soft curves kind of like the coke bottle which fun fact by the way they
designed the coke bottle to look like a woman's figure. Think of that next time you're drinking
out of one. So okay so I'm just putting in the very basic sort of shape like that and then we
got another loop cut right here where it's going to taper inwards. Okay now you can see it's not
lining up but when we use the subsurf modifier over here and set it to smooth you can see that
it's sort of it looks pretty good. It's not too bad and in fact in my case I'm actually just going
to make this a little bit more extreme so to make it hug in a little bit more and the base I'm going
to drag that out a little bit. That's just I don't know if you have a look online and you just type
beer glasses into Google you'll see like a whole bunch of different glasses. This is the Irish
Imperial pint and I find this is the sort of has a more extreme waist which I sort of like. All right
for the bottom here because we've got to close this off and if you just use a face like just
hitting F you can see that looks absolutely horrible. You get all sorts of horrible shading
artifacts. So instead of that what we're going to do is we're going to extrude it inwards all the
way in almost touching right about there and then we're going to make some loop cuts and we're just
making loop cuts enough so that those are squares basically around that edge there and that's it
and then you want of course make that a little face like so and look at that that looks a lot
nicer than what we just had. All right and then finally we also want to add a loop cut just for
this base here so that it's sort of nice and tight at the bottom there and then also you can see if
I hide this you can see that the top of this glass here has sort of a little bit of a rim to it
right like so that your brain knows in its drunken state where to put your mouth as it hits the glass
you know. So for this rim I'm going to add a loop cut drag that up there
all right see and then another loop cut right there
and now you're wondering why I did two I'll just show you in a moment hold your horses we're going
to use a solidify modifier hey so that adds thickness to our mesh right looks pretty cool now
looks like it's made of uh whatever uh we'll set the thickness to one millimeter all right so that's
that's what I found to be roughly around about the uh you know the thickness of a glass that one
millimeter okay and once you've done that you can go ahead and hit apply okay so now with that extra
little loop cut that I just did there what I'm going to do is I'm going to grab these two edge
loops right here I'm going to scale them out and then for this middle one I'm going to scale it in
and there you go you've basically got that little rim there you can uh sort of tighten it up a
little bit nicer you can maybe even uh actually no don't do that that's terrible okay so something
like that just to give it a little bit of an edge and then it's little details like that that'll help
it'll help you win prizes and uh solve all your life's problems
um no it just makes your render look a little bit nicer okay cool so we are going to use the
reference photo again right now because right down here at the bottom you can see that all
glasses have this solid thick glassed base so it's a millimeter all the way down and then the
bottom here is thick glass I'm sure an engineer or a glass maker or whatever who's somebody's
watching will be able to tell you why I'm pretty sure it's just so that the glass doesn't smash
when you hit it against the table but every glass seems to have one of these so I'm grabbing and
make sure you're grabbing the inside part as well not the outside so the inside and I'm just going
to pull that up to be about there all right and then I'll just make this because it's not perfectly
lined up like that and then you also hang on just so that this one millimeter is consistent all the
way through I'm just going to scale that in just a little bit and same with this one right there
okay now for this you'll notice that a lot of glasses have like a little bit of a dip in the
bottom like I sort of round it off it's a very subtle effect but it's again little things like
that that'll make your life so complete so with this base here I've just hit everything else
I'm going to turn on proportional fall off set it to sharp like this and then pull this up
like so nice all right bring all that mesh back okay now we should have
yep we have that one extra loop there there we go okay and that's almost good we want to have
the thickness I'm getting into details here which I probably shouldn't I should just get to the meat
of it but I just want to make sure that it's going to look good so that when I finish people
don't say it looks nothing like the finished render should do it again okay so we can hide
the reference photo now you can delete it and good to go all right let's do some uh let's do
some rendering okay so uh the lighting setup is fairly basic for this as I said at the start
um at the on the bottom there is a mirror floor okay so we get a reflection off the glass so
that's easy to do a plane with ooh a glossy shader how about that and a value of one so it's pure
pure mirror all right now for the back plate what I want to do is I want to use a uh a texture
so an image which uh it's it's I'll just show you it all right so in order to add this you want to
go to your add-ons and if you haven't got it switched on by default already switch on the
import images as planes all right and once you've done that hit shift a and then go images as planes
the reason you do that by the way is so that when you import an image it's to the exact dimensions
of your image you don't add a plane first then apply the texture and it's all wrong and you have
to try and match it up okay so we're using this texture right here and that is going to look good
behind the glass and uh down here in the settings you want to make sure that the material settings
are set to emission okay and then click import images as planes so now we have this big plane
here oh by the way you can get that image again off blended so this is a it's a custom texture
that I sort of uh created using one of my own textures and modified it in photoshop so that it
has um that look to it okay so with the camera oh we haven't even set the camera but anyways front
on I found that a lot of like drink advertisements they do this they have uh in the background it's
this bright light which is shining through and then in the ages it's sort of like this really
heavy vignette and it's really consistent with a lot of drink advertisements um and it just looks
good like with that light shining through the liquid it always looks great and this is textured
just for the sake of giving a little bit of texture in the background and I've used a warm
orange color because that works well with beer and you know keeps it an analogous uh sort of
color scheme all right talk about getting into too many details let's uh
let's uh let's go to the node editor now when we use that import images as planes thing um
it's set the uh the strength of the plane here to be is camera ray which means it won't affect
any reflections or anything so you want to go ahead and just delete that and uh when you do that
um you'll notice that it's now affecting the mirror which is good and I'm going to turn
the strength up to be yeah about that okay so nice and bright okay so now for the glass itself
all right let's call this glass and guess what shader we're going to use oh yes in time
it's the glass shader of course and that's pretty much it look at that looks like glass
uh you'll notice it looks a little bit tinted a little bit dark so that's because this is not
pure white yet so turn up the value to one and now it's pure glass pure glass what tv show is
that from that is breaking bad yes all right okay now uh oh yeah I just sorry in that little
what I was doing then I positioned the camera front on by hitting ctrl alt number pad
zero and that'll just snap the camera to wherever your camera is this camera is too huge for the
so let's set the size of that let's just make it two centimeters okay that's good
now having this wide screen like this dimensions of this render would be stupid you would never do
that okay because what what's the point of having a wide screen for an subject which is essentially
vertical um so what you want to do is you want to flip that aspect ratio so over here instead
of 1920 by 1080 you want to go 1080 by 1920 okay so it's now widescreen vertical mode or uh
basically most videos are recorded in nowadays unfortunately is apple working on something to
fix that you know the fact that uh all upload or most uploads now are recorded in vertical screen
mode and it looks horrible maybe youtube has to fix it I don't know but so many quality videos
ruined like vertical video anyways all right so I've scaled out this mirror plane here so that
it touches the edge of uh of our back plate there let's bring that back a little bit and that's
important because uh when you do that I'll show you what it looks like before that go render view
mode you can see there's like a cutoff you can see where there's clearly the edge of the mirror
and then there's the back plate but you scale it up until they touch and look at that it's endless
and uh it looks really nice so that's good okay so now for the actual lighting because we've only
got this back plate as the lighting we want to have some lighting uh sort of on the front as well
so I'm going to be using an environment texture uh so go to the world settings and over here on
color just click the little dot next to it and then select environment texture now this one that
I'm using is one that I got offline sorry online off the internet uh it's a studio lighting setup
so this is maybe this will want to crash it anyway these are just like studio basic lighting sort of
I didn't save don't crash I really should not have clicked that button it should be a fail safe
or something that'll cancel this out I'm gonna just crash huh oh oh we're back no okay turn back
off no all right I'll just pause this all right shiba blender was not cooperating anyways I'm
using one called 18 dot hdr right these aren't mine they're available under the creative commons
license you can get it off blender guru.com you can download it right there anyways once you've
added this this is what it's going to look like and this is the reason we're adding it okay wait
for it to load wait for it to load hit five and look at that so this is like it's a it's faking
a studio lighting setup so that pack that studio lighting hdr set is uh just a variety of different
sort of studio lighting setups and I found this one to work pretty good for this type of scene
so you can see now the rim actually has some light to it and it looks kind of nice so um as well as
that though we're not just going to have that lighting we're also going to add in some physical
lights as well just drag that across there and I'm going to use a plane I set this plane to be
an emission shader and this is going to be just a typical sort of big old studio light over in the
background about all right something like that I'm going to scale that up so it's nice and long
I want to get a nice long streak down the edge of this beer glass
so let's set the strength of that to seven there we go now you can kind of see it that's cool
and I'm going to make it slightly blue the reason for that is that uh light like this
especially studio lighting it's never really pure white it always if it looks white it generally has
a little tint of blue to it so that just uh it'll tip there for you for future reference so that's
pretty good and then I'm going to add another one on this side
pretty good and let's shrink that down this one is just going to be on the top sort of rim of the
glass there it's not going to be as strong so set it to its own separate material and let's set the
strength of that to two so I'm just adding a little touch there on the edge there and uh the HDR
lighting setup does help which is why we added it of course I'm just wasting time
um we are we're adding extra lights to uh make it look more realistic um essentially just I don't
know personal preference I found this sort of lighting setup to look pretty good okay cool
that's lighting done so now we can actually get into the fun stuff which is the beer itself
what's a glass without some beer hey hey all right so for the for the liquid
I apologize for my terrible jokes um for the liquid some people will say that the way to
make liquid in a glass is to set a separate material like you do something like this you
select that part of the mesh and then you make it a separate material don't do that
that's a terrible idea it will just look awful um I don't know why okay I know you're expecting a
why but it will just look awful all right what you want to do is you want to make it a separate
object so selecting the inner parts like I have done right now just the inner parts hit shift d
and then hit p to make it a separate object now I didn't select the whole thing all the
way up to the top there because this is where I want my liquid to sit okay you can go higher or
lower depending on what you want I want to make it look like someone's had a sip out of mine all
um all right so this top part here we want to close this off because it's it's going to be
liquid right so we're going to close it off the exact same way we closed off the bottom
by scaling inwards right inwards doing some loop cuts and then f in the middle all right
and because as a lot of people will tell you on the internet a lot of people will tell you this
there's surface tension which is that when liquid sits in a glass it's sort of like the edges of it
are slightly higher right so I'm just grabbing this edge here and just moving it up a little
bit and that's pretty much all you need to do um yeah hit shift e and drag it all the way out to
add a crease on that so you can actually see it there you go so that's what you're trying to uh
get so a little bit of surface tension like that and you can move that out so it looks a little
better there we go okay great all right now this is the interesting part now there's a great article
by greg zahl uh on uh adaptive samples.com I think I'll put the link up there for you
um which has an article telling you all about fluid and how you're supposed to properly make
fluid in a glass which I highly recommend checking out tells you all about the uh
space of air and liquid and whatever else but the conclusion is this what you need to do with
your liquid is make sure that it is in between the edges of this glass here I've got too much
on my plate let's optimal display there we go so I make sure that this is square in the middle
of the width of your the thickness of your glass so it's right in the middle of it okay
and it has to be that way all the way down so you want to scale everything ever so slightly
like that just so that it's a little bit thicker than the inner layer of the glass but not thick
enough that it's bulging through the outer edge hope I'm making that clear all right so from the
outside looks fine and on the inside it should uh it should be in the like in between the uh
okay now to test this out oh actually and before you move on this is very important
hit ctrl n which is the same as uh hitting uh recalculate normals okay because we want to
make sure that the normals are facing outwards like that um despite what that article will tell
you the one I just referenced um you don't want this part here to be flipped in or anything like
that because it will not work I've tried it it just will not work with cycles volumetrics which
we're going to get to in a sec so okay volumes are the right way now let's get into the material
of this liquid node editor now this is actually really easy to do um just uh make a separate
material for this glass here and let's just call this uh beer because we're going to keep this
and we're going to add in a volume absorption
node um so there's volume scatter there's volume absorption volume scatter is when you want light
to go through something and sort of keep its illumination keep its um what do you call it
luminescent uh like light going through fog for example or uh light going through a cloud that's
when you use volume scatter volume absorption is when light is absorbed into it so things like
hard plastic um uh liquid for example so basically when light will taper off like uh if it's in a
lake or something like that the further you go into the subject the the darker it will get that's
when you use volume absorption so liquid we're using volume absorption and look at that we've
got a little handy warning isn't that cool that was added in recently uh or not so recently but
last few months um we can't use it on the gpu so switch over now to cpu and then once you've done
that connect this volume into the volume input okay so see that you've got the glass which is
going into the surface input and then the volume absorption which is going into the volume input
okay cool now um the color of this now this i had a lot of people on twitter telling me it was too
yellow other people saying it was too orange it's really up to you if you go into google you type in
beer you will see there is a variety of different colors you've got like thick dark beers like
guinness you got orangey ones almost reddish ones and then you got some ones that look like piss
really so we're going for a yellowy orange one so i find a value a hue of 0.13 works pretty well
and the saturation as one the density i'm going to set to be 65 okay this is one you want to
experiment with of course but i found through experimentation myself 65 works well by the way
the saturation does the exact same thing as the density so if you set this saturation to be 0.5
and then you turn this up to be uh double what that is then that would have the exact same result
so keep the saturation at uh at one and then just fiddle around with the density until it
looks cool all right so density 65 we are now ready to do some rendering uh let's i haven't
saved it yet let's save over that one that was my last tutorial attempt it failed all right um
let's change the tiles to be 16 by 16 so it renders faster and let's give it a quick render see how it
all right that actually looks pretty good excellent now if you find if you get any sort
of rings or artifacts or anything around here um which i have done in the past what that means is
that your liquid is uh is either too far in or it's too far out it's overlapping one of the two
needs to be squarely in the middle which can be hard to do um but if you have that that's the
reason why so you have to fiddle with it until uh until you get it just right now in our render
i'll pull that back up you can see that at the top here it looks like some sort of bubble
looking effect um now that's because we want this part right here you can make that a separate
object if you want but what i've found because i want to keep everything the same object
is uh if you just select this edge here you can turn off the normals select the edge there and
then hit ctrl e and then select mark as sharp then add in an edge split modifier turn off
edge angle so it's only now applying it to just that edge right there and that's essentially now
going to do the exact same thing it is i'm just doing a little render here it's going to treat
that that top part that surface tension like it's a completely separate object essentially
so look at that that looks uh it looks pretty cool i think oh yeah yeah you've got a little bit of uh
it looks almost like something weird is going on there it's not going through the glass or it is
you know what let's just make it a separate object let's just see if that has any effect
i did some tests earlier and i found that it didn't really make a lick of difference but
maybe in this case it is so i'm rendering it to a different slot this is handy and you want to uh
have a look at different settings no it's the exact same thing oh hang on almost
okay so maybe making its own separate object it does have a slight difference but anyways um
okay so that's the surface tension that's the middle part of the liquid now um let's do the
foam hey the foam the least fun part no the foam is cool it's just hard to get the material right
um i spent a couple of days no actually a whole day just on the foam yesterday all right
so i'm going to take this top part here i'm just going to duplicate it and save myself some time
and then move this up remove that material and i'm now going to
what do i do let's go
extrude yeah there we go okay so i forgot what i was doing there for a minute isn't that weird
okay so i'm taking that whole thing i'm hitting s z minus one which is now basically mirrored it
okay so if you now have a look at just this object we have what looks like a disc okay so
that's exactly what we want turn off the edge split modifier okay so this is going to act as
our foam now it's up to you how much foam you use a lot of different beers will have a you know a
whole head of foam um others will have uh you know just a little bit resting on the top there it's
really up to you this is the amount that i'm using you can do whatever you want it's kind of funny
when people you know have a look at your render and go the foam is not enough or uh the uh the
color of the beer is wrong it's like well maybe you only drink one type of beer perhaps that's
my only guess because there's a lot of different types of beer as i learned i'm not an alcoholic
i don't even like beer actually okay what i've just done there when i was just rambling
turned on random proportional editing fall off and now we've got like this ruffled up kind of
surface all right now for this middle part here i'm going to turn on smooth fall off and now
i'm going to smooth out just the middle there like that okay so from the front it sort of looks a
little bit bumpy like that and you can do a little bit more tweaking if you like um let's bring back
whole thing like you can sort of pull that down not that far okay maybe this one here as well
yeah and you can just uh experiment with it add more or less bumps whatever you like
okay it's really only visible from the front there that's why i'm only filling with that part
okay so that's all good let's bring back everything else okay so for the material
the tricky part this is one that took me forever to figure this stuff out um as i said yesterday
i just spent forever trying to do the foam and uh yeah wasn't really getting anywhere anyways today
i sort of nailed it so this is what we do we're going to keep the diffuse shader but we're going
now you might be wondering andrew why aren't we using the very newly added
volume scatter node you can do that if you like you can go ahead and uh drop that in and have
some fun with that i have found it doesn't work that well for this type of thing this is really
what subsurf scattering is for it's for something like this it's like a it's a liquid real type
thing in which light is going to pass through it have a look at some reference photos you'll see
it's like brightest where the light is and then it slowly fades off this is really what subsurf
scattering is for so that's why we're going to use it we're combining it with the diffuse shader
and we're going to use add so that we get the benefits of both diffuse and subsurf now the
downside to using the add shader is that it basically multiplies the brightness so instead
of this just looking like white it's going to look like blinding colgate extra whitening extreme
really bad white so you want to turn this down to be a bit of a gray color and then through the
power of the add shader it's now going to make it look white okay so let's just uh let's have a look
at that let's test if my theory is correct let's move that to its own layer and uh let's move the
everything else to lay down there
okay and let's give a preview render
and there we go okay that's actually not too bad that was pretty good first go around how about
that huh uh where's the sampler gosh these menus huh huh a little bit more yeah there we go so that
looks pretty much like foam it's not too bad oh the scale of course you got to get the scale right
there we go now it's uh it's too white all right so let's turn the uh diffuse one down
because the diffuse is sort of like the outer surface of it so i'm turning that one down first
and then this volume uh the color there so this scale is sort of like how big is your object
uh how quickly do you want the light to fall off leaving it at the default value of one
is sort of good for like a real sized apple maybe but not something like this so you can see that
now looks really a lot more like foam now you can add a lot more bumps you can add bubbles to it like
i did for my final render as well um we're going to be adding bubbles later so just essentially
repeat the same steps if you want i'm going to leave this as is because it actually does look
pretty fine um as it is so bringing back the glass now for the stuff uh the the residue around the
glass here this is something that took me forever to figure out yesterday and i was fiddling with
particles and i was rendering forever um as it turns out the best way to do it is to actually
so this is what we're going to do take the inner part of the glass this one
oh come on now don't be stupid come on yeah there we go all right the inner part of the glass
shift d then hit p so it's own separate thing and then make sure the normals are actually
pointing inwards as they are okay now with this what we're going to do is we're going to add a
separate material to it and we're going to call this beer residue now as i said the best way to
do it is to use an image texture now what we want to have is the effect of basically somebody's had
a sip out of the beer and it's got a little bit of the foam and the gunk still clinging to the
as you will see when you have a look at reference photos like these for example
um there's uh a very different varying different types of what can appear on the outside in the
residue um i found uh or actually through a lot of research and having a look at a lot of images
um the if the glass has been cleaned properly this is kind of cool you'll notice when you go
next time you go drinking with your friends or most of you won't because you're probably still
in school um but beer that is in a glass that has been cleaned properly uh the whenever you
have a sip there'll be like a clear line of foam around where the foam used to sit if the glass
wasn't cleaned properly then the foam will all slide down so you won't actually get any residue
on the glass so what i did was i went into photoshop and i painted this this thing right here
which if we now go to the image editor i'm gonna add a cut a seam and i'm doing it deliberately
on that edge there because that is where the camera won't see it okay so add a seam right there
and then let's go unwrap you can get this image by the way on blenderguru.com and there we go
so this is it um now you can see that it's sort of skewed this uh the shape of it we want it to
look like flat vertical lines so i'm going to use view and instead of hitting unwrap i'm going to
select cylinder projection and once i've done that it's essentially just a matter of making
sure this is roughly you know the size of these rectangles here are the size of these rectangles
so a little bit of uh you know stretching like that okay down to there
okie dokie okay cool so that lines up pretty well now back to our node editor
so we added this as the image texture now to make this effect um so that way it's we want the
this part here to be invisible except for that image texture so we're going to add in a mix shader
and then combine that with a transparent shader so we've got the diffuse with the transparent
and a mix shader and then we're going to take the output from our image texture which is
pure black and white and put that into the factor input so now if you go non-color data
let's just have a look at that we should now see if everything has gone well
we should now see the uh the foam now you can see that some parts of it
look like they're hugging the edge of the glass which is good and then other parts
aren't um so actually i haven't really thought about this until now but i guess if the residue
is on the inner part of the glass it shouldn't actually have unlike the liquid which needs to
be in between it it should actually be sort of on the inner part so not actually against the glass
i'm going to try that all right um because this has got a subsurf on it it's kind of smoothed
um so we need to have for this part here we need to have an extra edge loop here and then just
scale this uh this extra piece down there inwards all right and now with that i'm now going to go
scale that in a little bit just to about there all right now let's have a look at that
all right this should hopefully show the residue about there actually i think yeah that does make
sense actually because it would be on the inner part of the glass it wouldn't actually be visible
sort of on the outer part maybe oh i don't know now i mean you can have everything ready before
a tutorial and then as you're teaching it you're going hey is that actually right i'm going to put
it on the end part of the glass you guys can argue in the comments as to which one is actually right
i don't have a beer next to me so i can't actually tell you what is true anyways i'm going with this
one right here now one thing to note if you have a look at this you will see that it is very very
noisy unlike the rest of the render which is fairly clean the reason it is noisy is that the glass is
basically the light is passing through this glass and it's trying to cast shadows on everything
inside the glass through the glass so basically trying to i don't know create fake caustics or
whatever it would be would be doing and that's almost never actually needed so this is the way
to uh to get around that with our glass selected and the material we're going to add in a transparent
shader with a mix shader drop this in there and then a light path node now this light path node i
don't have time to get into it because i'm already going over 40 minutes um we want it to basically
we want to use the is shadow ray and is diffuse ray so to combine those two i'm going to use a
math node leave it set to add combine the is shadow ray with the is diffuse ray and then we're going
to put that in there so what's that now i'm going to tell blender is that if whatever object it's
hitting is uh if if it's a shadow which is being cast through it treat it like it's completely
transparent if it's diffused such as like this treat it like it is completely transparent
everything else meaning whatever is viewable to the camera whatever's viewable uh off a reflection
treat it like it's actually glass but everything else is shadow ray and that is going to be
so now uh if we give it a preview render we should see there we go everything is a lot less noisy
the light's coming through a lot clearer everything's a little bit brighter and uh yeah it's
not the horrible noisy mess that it was earlier now the light over here on this part of the froth
isn't really getting the full effect as it is over here um when in actuality it really would in real
life because the light also would be passing through the glass on this side as well so the
way to fix that is uh essentially what we want to have is we want to have the diffuse shader which
is currently where all the light is coming from um but we also want to have a guess what it is
translucent shader okay so the translucent allows light to pass through an object so we're now going
to use an add shader node which means of course when we do that everything's going to be super
bright so let's turn it down again let's go 0.5 and 0.5 on that one all right that is a little bit
better there we go the lighting is coming through a little bit on that side and also we don't want
the froth to look like uh i don't know someone's squirted jif or you know guys know what jif is
anyways toothpaste it looks really super hardcore caked on there uh like paint i should just say
paint um instead we want to look like froth all right so we want to add in a transparent
shader and mix it with everything else so we can just use this mix slider here
so if you want more transparency you just turn that up and then if you want less you just turn
it down so i think uh something like that i guess should be good for mine i actually did something
a little bit even fancier and you don't have to do this um in fact i'd advise that you don't
because this is just too much work um i used a noise uh a noise texture and then i used uh
the noise texture to control this and what that does is it makes it look like there's actually
little bubbles inside it uh so let's just have a look at that and see how that looks
yeah you can kind of see it maybe a little bit if you squint your eyes that's why i'm not really
i mean it's the result is pretty pretty small really you have to crank up the contrast and
whatever yeah i didn't find it was that important so i just sort of uh just sort of left it out
but anyways you can fiddle with that if you want you're welcome to you can have a look at my uh
finished file and go through that if you like but this is what we're doing so just a little bit of
transparency like that so that it looks uh a little bit like froth maybe a little bit more
and uh we are now good to go all right so what else is there left to do oh bubbles the bubbles
um for the bubbles uh how do we do the bubbles it's a good question how we do
uh okay let's do the actual bubbles that are floating up and then after i'm we'll do the
bubbles that are caked on the bottom and the top there so for the bubbles that are floating up
what we want to do is we want to add a plane all right let's move this in and on this plane
i'm going to subdivide it i think it's not like i'm doing a magic trick
and now close your eyes count to three and then
oh ah all right so i'm just making it so it sort of fills up the floor there
all right it doesn't have to be exact it's better if it's not as they always say um like this now
what we're going to do with this the reason i'm using a plane instead of just using the base here
like i actually did for my first one um is that as somebody informed me on twitter twitter is helpful
sometimes um bubbles actually don't just rise in one big thing out of the floor like everywhere
they actually come in streams so bubbles come in thin little streams so to do that effect what we're
going to do with this plane here is we're going to make uh the bubbles come out of each one of
these vertices so instead of it just coming out of like everywhere and like this big tornado whatever
it's coming out of uh yeah little little uh things i don't know why the bubble streams do that
maybe somebody can tell me in the comments why that is i'd be kind of interested to know
um why don't they all just come out of everywhere at once um how bubbles formed
i got so many questions now nobody to answer them if my dad was here he would answer them
i don't know if any of you guys out there have teachers for parents
both of my parents are teachers which means a lot of pressure when you're in high school
and uh a lot of disappointment and you fail almost everything
but anyways one of the other things having a parent uh both parents teachers is that uh
very quickly a conversation will turn into a lecture so you try and bail out of that as quickly
as you can all right so i got the bubbles coming out of the faces we want them to come out of the
vertices so click verts and now they're coming out of the verse you look at that they look like
bubbles don't they isn't that cool is it just beer that does that or is it all fizzy drinks i
think it's just beer but i could be wrong um i'm pretty sure champagne does it as well doesn't it
all right okay is that enough that's not enough let's go six thousand six thousand bubbles and
instead of having it as like you know streamer that that looks a little bit too fake it does
have a little bit of waviness to it which is why i'm going to use some brownie in motion
okay so now you can see it has a little bit of a bubble to it now it's coming out the top which
is too far then you could add something here to block the particles so they die when it hits
something or you could just do the lazy man method which is what i'm going to do right now
and just go frame 43 the particles reach the foam so the lifetime of the particles should be 43
so now when you play it back look at that problem solved or even better let's go 42 because i think
it was coming out the top of the phone there we go now if you if it looks a little bit too
uniform as well you can delete some of these vertices maybe subdivide it oh i think i did too
much but you know you want it to look sort of random oh yeah i think i did too many vertices
all right anyways that looks pretty good okay you can have as little as as many as we want
now we want this to be actual bubbles little tiny balls that are visible at the moment
they're going to render as a halo which means in cycles nothing so if you hit render you wouldn't
see anything so it needs to be a separate object for each of these little tiny dots
so the separate object is going to be an icosphere an icosphere is like a really nice
low poly uh thing whenever you want to use a sphere but you don't want to use a sphere because
it's too many polys so use a subdivision level of one which is super duper duper low poly which is
fine and then the size of it we're going to use one millimeter okay really really tiny and then
make sure you set the shading to smooth now for this uh little bubble here i'm going to use a
glass shader and i'm going to just set the ior as 0.5 at point 1.45 okay now before any of you
leave a comment saying that it should actually be one or something like that to match the ior
quality of air i tried that and the bubbles are almost invisible if you actually have a look at
reference photos of real bubbles they look actually more like tiny metallic balls like
almost entirely shiny because it's air which is going through liquid which we don't have like
this is a fakery of liquid right so we have to basically fake the effect of an actual bubble
so yeah that's why we're using a 1.45 for those of you that don't know what i'm talking about
don't worry it's nerd stuff so in the render to make it render as those little icospheres
go object and then set it to icosphere and now look at it the little dots for icospheres
you want to crank this up to be uh whatever you think say when let's go and also turn the
randomized size up as well so you get some different sized bubbles okay that's pretty good
all right now you want to make sure that emitter is turned off otherwise you get this horrible
little grid appearing on the bottom there but other than that i think it is pretty good all
right so now for the bottom and the top we should have some bubbles that are forming like the bottom
of a beer or soft drink whatever there's always a little bit of bubbles that are at the bottom
and there's some that are resting at the top as well so to do that we're going to add another
particle system here and object set it to icosphere oh there's too many too much stuff
is going on let's uh optimal display all right okay now we want these particles to only appear
on the base here so what i'm going to do actually you know what i'll do because you want it to
actually be resting just above the glass not actually underneath the glass otherwise it will
look kind of weird i'm going to hit shift d on this so i've just got the base here i'm going to
hit p make it its own separate object and then i'm going to remove the particle system from this
main mesh here so i've now just got this and now i don't have to do any weight painting or anything
like that i can now just place that slightly above the glass like so and make sure that emitter is
turned off as well and then once we've done that the same thing for this part right here in fact i
can reuse that particle system i'm going to guess that it's that one am i right yes make sure you
check use modifier stacker if you ever have that problem that's a bug brett said he was going to
it's still broken brett no sorry um uh yeah so that's fine like that uh let's turn the randomized
size up and the size of them up as well because they're a little bit bigger okay and i think it
is now ready to render all right give it a render i'm going to go a little bit more with the samples
let's go 50 and let's see how that looks excellent renders 42 seconds not bad cool
problems yes the residue is going underneath the font so let's fix that very easy to fix this one
we just take that and we move it upwards to be about there i think is that about right
yep that's about right and because i've done that i also need to fix up excuse me i need to uh
fix up this part the br um the uv coordinates i need to move it up very slightly oh why is it
freezing oh for pete's sake let me pause it again hey all right we're back um yeah because i moved
the coordinates if you don't do this um then it's uh what you'll have is a little bit of a squish
looking render so something like that is pretty good okay other problems what other problems did
we spot okay the top of the glass looks good the foam pretty good not too bad i think there's
probably too many bubbles along the top there and the bottom there looks pretty good maybe the
bubbles rising up could be a little bit bigger so these ones here you guys said when too early
should let me drag it out a bit all right these ones here um is it a separate object no that's
just its own thing oh i think i know what i did uh-huh because it's using the same particle system
the top one here i want the uh the surface tension thing to render but the bottom one here
i don't want that to render so what i need to do is essentially make this its own separate
particle system and then check render and then we should see uh the top of it actually rendering as
it should not this horrible mess that's there give it another render let's see how it look
and there we go so that's it that is a beer if i ever saw one um the residue could maybe be
toned down a little bit um but the rest of it is pretty good oh one final thing uh you want the
focus to be on the beer so artistically the background is a little bit distracting so to
make the background out of focus of course with our camera here selected we want to make it focused
on the front part of this beer here so i'm going to add in an empty this is what the camera is
going to focus on all right let's just drag that up pull that out to there and there we go and
now with our camera selected set the focal point under depth of field to empty and then go f stop
12 i'm gonna use all right and now oh yeah might as well let's just turn down the residue of that
now you see what i just hit there i hit shift f3 that's a little shortcut to go to the node editor
anyways um a bit more transparency yeah a little more here okay one final render
and there we go look at that finished and drinkable so um yeah where you go to from here
it's up to you um you can uh you can see there's a the foam is a little bit touching the glass there
but everything else is uh pretty good um i'm interested in seeing what you guys make especially
if you make some uh cool different looking types of drinks um not just beers maybe some cocktails
maybe uh that could be your homework pick a cocktail and make it um or make a different
type of beer um and if you do go to Blendy Guru go to the post and post it in the comments below
i really like seeing what you guys make um that's all from me and uh if you like the
subscribe to me on youtube um anyways that's it see ya bye
