F di welcome back to Houdini is hip in the previous part we looked at meshing our fluid surface and we looked at adding Bubbles and foam we also cleaned up our simulation to the point that we were happy with and we can now go ahead to the final step of this project and that's just going to be rendering so if you'd like to continue from where I have left off then you can go ahead and use the part 3core start file that I've attached below you can find it in the description so first thing that we're going to do is just work on a few things that we're going to need for rendering we're also going to have to do some cleanup and as we go I'm going to show you some of the issues that we have and how we might tackle it if we were actually working on this as a production shot I'm already aware of some of the issues that are going to show up there's going to be things like some objects that are going to come through our actual glass surface there's going to be issues with refraction there's going to be loads and loads of issues and I want to show you how you would tackle them live as you're going through the project and just kind of what each little issue is and how it's fixed so to start with let's go ahead and just add a new Geo node and we're going to make a ground plane I'm going to show you a nice little technique and it's just an infinite backdrop so we're just going to go ahead and drop a grid over here we're also going to object merge in our glass for the rendering so go over to Glass glass render this over here and we have our grid over here right first thing that we're going to do is just move this over a bit so we know that our fluid is going to come in from this side we can take a look over here without our fluid meshing let's just use our particles over here to see where we are okay we know that this is the angle that we want to view it from so let's go into our ground plane and we can just narrow this grid going to narrow it over here to about five and three something like that and just do 30 columns 50 rows right something like that we're also going to just move this over so we can just move it over that way just to give it some space towards the the back right so we're going to have our camera more or less over here and so what we want is just this endless background right now to do that we're going to use a Bend node but before we do let's make sure that this ground plane lines up with our glass correctly so remember before we had the match size that we used for getting our glass to the ground plane there's actually another useful case for match size and that is with two objects like this so into the first input you take the object that you want to move into the second input you want the one that you're going to be matching it with and over here you can choose the justification we want our ground plane to be right at the bottom of our glass and so to do that all we're going to do is Center y Min right so as you can see it's now almost exactly there but we don't want it so close we want a little bit of space so we're just going to do an offset of netive 0.1 right like that so it's the tiniest amount of space between our glass and our ground plane so you can see that it's also moved our grid back to the center so we can just switch off the justification for x and z by doing none and none and that will just move it like that perfect now let's go ahead and use a Bend node over here so just drop a Bend node and over here we just want to bend the background up so we're going to choose a vector direction to bend it in so under capture Direction Let's Go netive 1 and then let's just also move it away from where the glass actually is so the origin we're going to move over this way to about 0.5 we can then bend this up over here just like that and this is a really nice technique this is often done in product photography where you just want this background that seems to be endless and so you just give it a gradual gradient just like that and you can make this even more gradual and you can change the capture length and things like that so it's more shallow and that's pretty nice right okay cool so that's what we have over there we can just use a null and this is just going to be our ground plane so ground plane out upper level let's just hide all of these and we're going to go over to the stage level so go over here to obj just click on stage and we can set this to the Solaris desktop right so we have this over here we're going to minimize our C graph tree and over here we can use a s import we're going to bring in our ground plane so go to ground ground plane out remember to rename this over here just to ground because in our scene graph tree over here we want it to be aptly named right okay so let's duplicate this and let's also bring in the glass so rename this one to Glass and then just change what we're bringing in over here so glass render just like that there's our two pieces of geometry okay so now let's set up a camera over here somewhere that's going to look good so perhaps just like this right camera right over there make some adjustments to it until we're happy something like that and if your ground plane isn't wide enough you can change its size over here so let's just go back to the object level ground and let's just increase its scaling right so we'll just do five and that should be fine right back to the stage level cool so we just have a camera and we have our scene set up over here the next thing that we're going to do is just drop a comma render node so go over here to comma plug this in right over here we can go down to here and just change this to the xpu engine and then just go over here to comma xpu and just like that we'll have our render going of course we don't have any materials we don't have any lights so let's go ahead and just add a light we're going to use a dome light right over here you can put it anywhere above the karma render settings I'm just going to put it over here and that's just going to give you a very uniform light the other thing that I'm going to do is just crop the to a square image right so I actually don't want all of this extra stuff on the side so we're going to go over to our camera node under view we're just going to change the aspect ratio to a one by one square right like that I'm just going to zoom in to reframe this perfect then on the Comm render settings it will automatically give you this height and width because it's Computing based on the camera's aspect ratio okay that's cool and now we can go ahead and start adding some materials let's go ahead and use a material library right over here and in this material materal Library we're going to have to create a few materials please ensure that you are using the latest version of Houdini 20 in fact if you can try to get anything after this so I have 20.0 547 I was having issues with prior versions because they made some adjustments to the way that refractive materials work so I was having some issues with refraction so if you are facing the same issues just make sure that your version of Houdini is this version or newer okay so we're just going to use a comma material Boulder and this is new to Houdini 20 over here we can just rename it to ground go inside and you can see that this is actually a material X node so it's got all of the material X nodes over here this is just a bit different to how it used to be before we didn't actually have a comma material node before okay so we're just going to make this ground plane basically black going to go over to specular decrease the specularity and increase the roughness to something like 0.9 going to go uper level and on this material Library going to Auto material materials assigned to Geometry assign it to/ ground and there's our ground in our scene right so our ground now has a material of course you can play around with it perhaps decreasing the roughness things like that but that's fine for now okay next thing that we're going to do is just another comma material Builder this one is going to be for glass and inside of here we're going to go ahead and work on our transmission so go to transmission and push this up so this is for refractive materials so we're talking about water we're talking about glass diamonds Crystal any of that stuff right and how this works is it actually takes the IR from the specular settings over here IR is just the index of refraction it talks about how a particular material refracts the light that's coming into it if you set this to a value of one then there's no refraction the higher you go the greater the refraction and you can actually get a list of all of the different settings for IR if you just do a quick Google search you can find I for different materials and you'll eventually learn what the I for different materials should be for example most types of glass are going to be anywhere between 1.4 and 1.5 whereas water is going to be something like 1.33 so it's going to change depending on the material that you're trying to mimic so over here we can keep Al at 1.5 but I might go a bit lower to about 1.4 something like that and I'm going to go upper level UT to full materials assign to material for/ glass so there you can see we now have a glass material the only thing is that it's quite rough and that's because the roughness on our glass material by default andp ularity is going to be 0.2 just drop this to zero so that you can have something that looks like that okay I'm just going to hide my light preview over there and let's go down to our dome light over here the thing about most of the lights and things that we're going to have in our scene is that when we're working with glass the reflection on the glass is very important right so choosing an hdri that gives you some interesting Reflections is very important so I'm going to go over to the textures over here and I'm going to go ahead and choose blue photo studio 8K you can go to poly haven.com I have mentioned them in the past that's where I get most of these hdris from for these tutorials they're really good quality and you can just find a nice indoor one and use that just give it a moment to figure it out and there so that's what you'll have right we can increase the exposure on this up until it starts to look a bit more interesting something like that and now something that I like to do is just add a light blocker directly in front of the glass because you have all of these lights that are reflecting and they actually kind of take away from the look of your scene so what I'm going to do is just add a grid over here just a grid and we're just going to drop it behind the camera we can even just call it light blocker over here plug it in over here and just change its scale so we're going to make it something like 0.2 move it over here just behind the camera rotate it around something like that right and then what we want to do is just assign a material to it so we can just duplicate our ground material over here and just call call this light blocker and inside of here autof for materials assigned to/ light blocker right cool so if we look to our camera now you can see that some of these Reflections are cut out and if we increase the scale on our light blocker it'll cut out more and more of those Reflections right and this is nice because as we start working with the simulation we're not going to want all of these Reflections on the front of the glass so you can change the dimensions of this for whatever you wanted to look like just going to move this back a bit move that up a bit cool right something like that okay so now we have our glass and we have our ground but we don't really have anything else in our scene also our glass is a bit too perfect so we need to get around to adding some roughness and scratches and things like that to really sell the realism of it same thing with the background you often may want to add some Distortion or noise to the background just that doesn't look so perfect and you can make loads and loads of changes to your background depending on what you want okay but let's get going with the actual water that's what we're actually interested in for this tutorial so I'm going to go ahead and disable my glass over here and then I'm going to duplicate it call this one fluid surface plug it in over here go ahead and fetch our fluid surface so from fluid mashing go ahead and take the fluid surface out and unhide this right so we'll just disable that bypass and that's all that we have right so we can reposition our camera now that we see where our fluid is something like that cool okay so it doesn't really look like anything right now that's because it has no material and it has no motion blur motion blur we'll get to shortly but for now let's just work on the actual material for it inside of the material Library we can go ahead and just duplicate over our glass material and we can call this water inside of here we're going to go to our material standard surface over here and we're just going to set the index of refraction to 1.33 right and really that's all we're really going to focus on for now we don't need anything else to really add to this that's it so we can go up over here and just Auto full materials and underwater we can do for/ fluid surface now you're going to perhaps notice this immediately but if you look closely you'll see that we have these little black spheres and it might become more clear if I also add our glass to the scene you'll see all of these like black artifacts right this is always going to happen when you're working with a lot of refractive materials so what is that exactly well that is the issue of our transmissive passes if we go down over here to our Karma render settings under the limits right so the limit is how many light bounces are allowed for a particular material or a particular element of our material right so I'm just going to switch this back to houd and let's quickly go and explain this okay so when we're looking at limits and we're going to be looking at the refraction limit we're talking about what is the limit before a light Ray gets cut off right what do I mean by this if we're looking at refraction we know that refraction is about light through a surface right so if I have light coming through the surface it's going to travel through here all right this is our refractive surface over here and this could be a piece of glass and we have no issues when we have the single piece of glass because the lights travel straight through it and we could see that when we had just our glass in the scene it was fine right we didn't have any artifacts the issue comes in when we start looking at the limits for this Ray if this Ray has a limit of say two right then that means it's allowed to pass through two refractive surfaces so it can pass through two refractive surfaces and then that's its limit but what happens if we have multiple refractive surfaces so let's just say that we have one two 3 four and our limit is only two then this light Ray is going to go through it's going to go through one it's going to go through two and then it's not going to go through this next one so what it's actually going to return is just black right because the light rate doesn't get all the way through the surface in this situation over here it goes all the way through and it returns some value from the other side perhaps it hits a wall at the back over here and this is what gets returned to the camera that's what the camera sees but in this situation it's getting cut off because it's reached its limit right it's got a limit of two but it's trying to get through more than two refractive surfaces so what we can do is we can up the limit we can say okay this is a scene that has a lot of refractive surfaces so let's up our refractive limit to something like six right maybe six then it can go through over here and over here and come out the other side all right and so in this situation you'll overcome the issue of it being cut off after hitting a limit in our situation with our fluid we're going to have to have quite a few passes because in our situation we could have the glass we could have the fluid surface then we could have a bubble and we could have another bubble behind it then we could have the back of the glass and the rest of the glass surface behind that right so it's going to have to make a lot of travels through this right it's going to have to have a fairly high limit to get through all of these different layers of transmissive material right to get all the way through it's going to need a very high limit count now of course the downside to this is that the higher the limit the more calculations so the longer the render time this is one of the downsides of having to render something with a lot of refractive materials but fortunately comma xpu is actually incredibly fast so we won't actually feel it that much but in a lot of other renderers this is extremely painful this is going to cost you a lot of render time you're going to end up with artifacts things like fireflies and it's just it's a real pain fortunately our render isn't going to have to suffer too much and we can get around this issue of limits by just increasing our limits so we're back in here and on our comma render settings you can see that we have our refraction limit of four so if we go comma xpu over here let's just test the two extremes right so let's see what happens if we have a refraction limit of one aha so light can only travel through one refractive surface as is so we add it at four so let's try something high like 10 you can see that when we push it up to 10 this starts to now look like it should right there are still some issues it's these artifacts down here right but we'll correct that so we don't have to worry about it right now that's an issue with our Boolean but we'll fix that right so I just want you to focus on the rest of it for now I'm going to hide my glass surface and this is what we have right so cool that's the one part of it however we also want to bring in our bubbles so let's go ahead and just duplicate our fluid surface over here we can just call this Bubbles and what we'll bring in is our secondary particles out it's just these particles over here so duplicate the water over and just call this bubbles now let's just assign this and see what we have so a full materials over here under bubbles we're just going to add this to the bubbles object right so we bring the object in assign the material comma XB render all right so there we go we have our bubbles being rendered over there one thing that I do want you to keep in mind is that you may run into an error over here and it's going to tell you something like critical error you're going to have to update your NVIDIA drivers if you are using a Nidia card so you're going to have to get I believe it's version 535 or newer so at the time of recording the newest version is 546 and if that still doesn't work then you can do this over here with a render geometry Properties or sorry render geometry settings over here just do for/ asterisk and down here where we have cor sticks so enable cor sticks just set or create and leave it disabled this is actually a little thing that I discovered back when this wasn't working for whatever reason and somehow that kind of fixed things right that's just a very strange workaround that happens when you have these stacked um refractive materials that's one way to work around it all right you won't have to do this with every project trust me it's usually fine but if you do have that errow which I didn't in this situation then that's one of the ways to fix it right I just wanted to bring that up because I have faced that issue in the past okay so we have our bubbles and it's not looking too bad we can skip ahead a bit and there you'll see something very strange happening right that over there is actually a single particle that's being rendered as a full sphere the reason that's happening is because this geometry that we've created isn't actually cleaned so go to your fluid mashing over here and down here after your Boolean what happens is you sometimes have floating points that actually get rendered as particles much like how we render these as little spheres right even though they're just points the same thing can happen with little pieces of geometry that have been cut off from the main piece of geometry the way to fix this is to use a clean node over here and you're going to see that it kind of breaks this right what we're going to do is not remove degenerate Primitives but just remove unused points right so once we've done that it should actually work so here you can see we have 42775 points before we did that we had 42776 right so it's actually removing that one point that we're seeing and if we go back to the stage level and do another render that weird situation will have resolved itself right it's n works okay so I just want to show you some options that you do have for these bubbles over here in our settings over here we can go down to the geometry over here and we do have this option to make our geometry thin W when we look at thin World geometry this is the idea of something like a bubble right this is actually exactly what it is if you think of thin world it's treating the geometry as just a thin shell not as a solid surface right so each of these bubbles are currently being viewed as solid little objects inside of this fluid but if you set it to thin World it'll actually change that and they'll be treated more as Hollow spheres right now I found that I actually don't like the look of having the M wall even though it's technically correct so I leave it disabled right because I actually kind of like the look of having them like this the other thing that you can do is also Drive some roughness right so you can actually push up the roughness over here because these particles you actually do want them to have a little bit of a frosty look to them right they're not actually going to be perfectly clear and see-through so you can kind of mimic the idea of foam by increasing their roughness again that's just an option you don't have to do that okay so we're looking good the other thing that we need to bring in is our foam so let's just move this up over here and we can just go to huni gr duplicate this this is going to be our foam volume over here and we're just going to bring in that foam volume foam volume out right so now we have that as well in our material Library we're going to have to create a comma uniform volume material and we can rename this to foam right dive inside of here you have the karma pyro Shader and over here we're not going to change anything just yet because I want to show you what it looks like when you just use the defaults so we're going to say Auto full materials down here foam which just going to assign this to sloam volume right go here call xpu and you won't really notice anything just yet so what we're going to do is just go into our foam material over here we're going to push up the density scale and we're also going to push up the smoke brightness right something like that and there that's going to give you that thin layer of white foam now something that I did actually experiment with and I quite liked was a weird little technique so what you can do is you can actually to this over here where you have your volume and I'm just going to press D to make the background dark you can actually transfer an attribute over onto your fluid surface and use it to drive the opacity of the actual glass right of this fluid and to do that we can do a few things I'm just going to show you how to do it because it is an interesting technique so we have our foam volume out over here and then we just go attribute from volume so attribute from volume over here just plug your foam into the second input and your your surface fluid surface into the first input just like that and you'll see it gives you this sort of white layer over there currently the attribute that we're moving over is this CD attribute but we don't want that we can just call it something else like OPAC for opacity and over here we can just use a color node and I just want to visualize this right so Ram from attributes over here OPAC and now you can see exactly what we have right what's cool about doing this is that you can use this to drive the OPAC of your fluid surface so I'm going to plug this into our fluid surface alt over here go upper level to the stage level what I'm going to do is I'm just going to hide the bubbles and the foam volume over here go ahead and use a comma xpu render and you won't see it making any adjustments just yet but if we go into our water over here and then use a geometry property value like this we can fetch a particular value so we're going to choose OPAC that's the thing that we just created and then we're going to expand the geometry settings over here and plug this into our opacity now this is going to be reversed but it's going to show you exactly what this does right so you can see that we have that value over there and that has full opacity and everything else has zero we want the reverse of this so we can actually just use a MTL X invert and that's going to make it look a little bit weird but if we go uper level and then just reenable our foam volume it's going to look a lot better once we actually reintroduce that foam volume so of course you can make changes again to the foam it doesn't have to be this high density or that bright right so something like that reenable the bubbles and we're starting to get something that looks pretty okay right so that's looking pretty cool let's go back to re-enabling our glass over here and just take a look at a few issues that we may have so over here the issues aren't all that apparent but if we skip ahead to something like this then you might start to see that sort of weird fating that's just because our actual surface isn't really smooth so a little trick that we can do over here is under our fluid mhing where we're doing a Boolean with our glass we can actually make sure that the glass is cutting out more than it actually should so what we can use is actually a peak node use a peak over here and a peak node all it does is it kind of pushes our geometry along its normals we're going to do a very slight one of 0.01 or sorry 0 01 just like that and take a look at our Boolean and as you can see it's now sort of smoothing the surface a lot better we can do a little bit more 125 right just until it's smoothing out the outside quite nicely something like that looks good okay so now we go back up to our stage level and as you can see we no longer have those weird facets anything that you're seeing now is actually just those bubbles that we have so if we want to hide our bubbles we can right it's just that over there so it looks a lot better of course you can make loads and loads and loads of changes to this right this is entirely your project but everything that you need to get a really good looking render is not in place for example if you want some bigger bubbles over here you can very easily do that so we have our remesh bubbles right over here we can easily just go down to our scaler increase the uniform scale to something like one over there maybe even to 15 something like that can make changes to the remesh bubbles you can do a bit of a smoothing and a bit of an offset to kind of push them apart a little bit and let's go back up to our stage level and see what that looks like so as you can see you now end up with those bigger bubbles in the actual fluid and over time they'll all come towards the top and it'll fade off over time so let's just see at frame 2010 what this looks like right so you can see it starts to settle so with everything that we have in place we actually have a good-looking render the only things that I would like to change now is just to add some sort of roughness or scratches to the glass and then look at motion blur right so let's consider our motion blur when we use motion blur there's a few issues that we're going to have and I'm just going to go over here to the fluid meshing and firstly take a look to see if we even have any velocity on this right if we take a look it shows that we have velocity and if we preview it you'll see that it's just these spheres that actually have velocity what's happening is that during this process where we go to a VDB vdbs don't carry velocities with them because if we did then we'd need to have a separate velocity volume but we don't in this case so what we actually need to do is take the velocities from these particles and transfer them back onto our geometry but what I actually want is to recalculate these velocities so I'm just going to use a trail node over here with this Trail node we can calculate velocities set this to compute velocity and we're going to need to say match by attributes right if you take a look at it like this it's just going to be a mess because Point numbers are changing and so it thinks that when particle 10 becomes particle 50 that it moved a huge distance when in fact it just changed its number so we have to say match by attributes that'll fix that for us and that over there we can use on all of our bubbles and we can use use it on our actual geometry so I'm going to put it over here so now our fo group still has it and it maintains it right through to the end for our bubbles so our bubbles now have it but we're going to need to transfer it onto this geometry down here so we can use an attribute transfer so we're going to transfer from our Trail node right right over here onto here and we just need to set it water to transfer all we want is V just like that okay so now you may think that that would work and we're going to go up to the stage level and test this if we go to our comma render settings and then we go over to camera effects and we enable velocity blur over here then we should have something that works but I'll show you an issue okay the issue that's going to become apparent is this down here if you look at the bottom left corner of this glass you actually have things that are going through the glass that's because this velocity is going this way and this thinks that it's going in a straight line right like right through the glass but that's not actually the situation that we have what we have is velocity hitting and the velocity changes very suddenly and goes that way right there's this movement into the surface now when we're looking at velocity blur and you can actually see this in the actual Houdini documentation but velocity blur is for straight line velocity right so straight velocity if you have a point and it's moving along a curve its velocity motion blur won't be curved to get curved velocity you're going to have to use acceleration so I'm going to go over here just to this Trail node over here and you can see that we actually have a separate option over here compute acceleration and if we go to our geometry spreadsheet you'll see that over here we have V but we don't actually have acceleration if we enable it it'll add this XEL X Y and Z and this actually represents the change in velocity however it doesn't work if you're using backward difference backward difference compares the previous frame to the current frame to see how much a particle has moved and that's how it calculates velocity what we need is Central difference this will allow us to use acceleration and acceleration is interesting because it actually follows a curve you'll have curved motion blur right and that's really cool because it doesn't just care about the current velocity of a point it cares about a Point's change in velocity so we're going to go down here to our attribute transfer and add Excel to this over here AC L and now you can see that we also have this acceleration which has been added to our fluid surface go over to the stage level and over here we're not going to use velocity blur we're going to use acceleration blur right so we're going to use acceleration blur over there now you may not notice a difference and that's because acceleration blur actually works the the same way as velocity blur if your geometry time samples are too low at a value of two there will be no noticeable difference between velocity blur and acceleration blur it needs more data to kind of figure out what the curve should look like so you can push this up to something like five and that's going to give you a curved velocity motion blur right it's going to look a lot more realistic for what we're going for you're still going to have this slight issue over there and there are ways to fix it right one of those ways is to go onto your camera and actually just reduce the amount of motion BL that you have you can do some tricks and workarounds and things like that but I'm not going to go into it too much as long as you know what the issue is it's very easy to fix it so over here under the shatter open and shatter close this over here is used to explain how long the camera shatter opens for and allows light in before it closes right so the bigger these values are the more light is L into the camera and the more blurring you have if you shorten this so a shutter open and close of 0.1 and 0.1 this will correct some of your issues right you'll still have motion blur you can still see it but it's not going to have such intense motion blur that it goes straight through the glass the other thing that you can do which is going to potentially help this effect is to Cull any point that happens to be inside of the glass right so you have this over here but what you can do is you can use a group node so I'm just going to group over here and we have our glass down over here right this is our glass render so we can plug our points so our foam points into the first input and our glass into the second input over here changing the group type to point points disabling the base group and then enabling keep in bounding regions then you just go over here to say bounding object and any points that move through the object will get cul right so this is a useful thing that you can do um sometimes you won't need it in this situation it looks like there's no points that are being grouped but if you want to be safe you can even use this peaked version of the glass over here you can see now it hits some points and then you can just remove those points right so over here all you have to do is call this something like C and then we can use a new blast node over here plug this in over here and then just blast those C points right so you'll go from that to that it'll just narrow in all of those points and then use this as an input for everything right so you can actually just select everything that's being used as an input here and drag it over to the call right so that's going to work a little bit better you won't have bubbles that kind of go through the glass or anything like that it's just a slightly nicer workflow okay so back up at the stage level let's see what we have all right so Rend is looking pretty good okay so for the last part we're just going to look at how we can make this glass look less perfect so to do that we're going to need to have some UVS so let's go over to our glass render over here so we're going to do UVS in the simplest way possible and just use a Labs Auto UV you can do proper UVS for this but we don't really care about it for this part it's really not important so by default it's going to be a little bit stretched this is potentially okay it doesn't really matter but you can make some Chang to this for example you can decrease the merge threshold to something like 0.3 that's going to give you a few more tiles it's also going to give you a few more seams now in our situation we're not really going to care about seams because this is basically just for scratches and smudges so it should be okay we're going to go up to our stage level now if you have a scratched material or something that you can use then you can very easily just use an Mt LX image right this over here and this is going to allow you to use different textures so you can plug textures into your roughness so you can do something like this right so you just choose your file name you would go and find an image and then you would put that into the specular roughness right so we go in there and what you would do is you would adjust it with a ramp right so you would use a commala ramp parameter plug that in over there and then you can rarely Drive the sort of distribution of light and dark areas right so white is going to be highly rough and black is going to be completely smooth right so you can do things like this where you just have a very slight roughness right now that's going to beol for images but I also want to show you how to use noises so the other thing that we can do is of course to use noises but I just want to disable everything over here because I have found that this Recs every single node um as if it were running on a new time step so all that means is that it assumes that we've kind of jumped to this Frame so it Recs everything and we don't want that so we're just going to disable everything here so bypass and then only sh glass right just like like that give it a moment okay so we have our glass over there inside of our glass network over here we're going to start using some noises now fortunately Houdini has given us access to some noises inside of MTX so we're going to just type noise over here and over here you'll see that we have unified noise 3D right so this actually gives you some options for different noise types you have options for fractals things like that I'm going to plug this in into our specular roughness when I do that you'll see the over here but this isn't a very good representation of what we have so what I'm going to do is with this material X unified noise selected I'm going to press X over here and that's going to throw in a visualize node right so now it's actually visualizing this as an emissive material so it's bypassing the actual surface and showing me just a visualization now I can work with this MTX unified noise what it needs is an object space right so it actually needs a position to work on you can see that it has a position over there basically the way that you can think about this is that a noise pattern needs to be applied to some position right and so we need to give it some position in space we're going to give it to the object space so position over there and then of course we're going to need to make some changes here so firstly the frequency we can push way up and then you're going to start to see the noise appearing right now we don't want a pein noise but we may use it for something like smudges instead what we want to do is use a multiply node over here and then we're going to duplicate this unified noise so just alt click and drag this one over here we're going to use a Wally noise just like this and let's multiply these two noises together so we're going to multiply these two together we're going to plug that into our specular roughness and then selecting this MTL X multiply press X for your visualizer right so it gives you that and this is just bringing these two noises together into one so let's give it some offset on either one of them just so we have something like that let's also just use a ramp node so we're just going to use a Karma ramp parameter and we're going to use it on our pein noise just like this and let's make some changes so we're going to bring up the low end like that until we have something that's kind of interesting something like that might be cool so let's just delete this visualize and see what that does for our roughness as you can see it gives our glass this sort of frosted look right and this is okay but it's a bit much and it doesn't really show us what we want which is kind of like scratches almost but this is good for that sort of smudging look that we might have on glass so we'll keep some of it right the only thing that we're going to do is use another multiply over here so that we can scale this effect down right and this is going to come through as a vector 3 and this is simply because of the way that we've set this up so if you take a look over here these green connectors mean vectors these turquoise connectors mean floats right and you can see that it actually comes into our ramp as a float but leaves as a vector and now when you use things like multiplies the first input is what is output so we have a vector coming into first input but a float coming into second input and if we switch these around it'll actually change that right so we'll actually have it the other way around so let's do that we'll put Vector second input floats into first input that's going to change this output to a float and then our multiply will just have a single value that we can change right so this is fine so now we can reduce this just keeping in mind that black is going to be perfectly shiny and white is going to be completely rough okay so now let's make a duplicate of this unified noise over here this one we're going to set to fractal right we can once again change the offset of it just to some value like that let's plug this directly into our specular roughness just so that we can see what it's doing and press X on the MTX unified noise to visualize it okay so fractal patterns are going to look like this but you can actually change the detail in it by going over to the octaves and lacunarity so let's increase the octaves have to Value like that and let's also increase this until we have some good noise inside of that we're also going to push up the diminish that's going to almost just blur it out and spread it out and then we just want to multiply that with another noise so we're going to duplicate it down we're going to change this from a fractal to once again a Wy noise duplicate the multiply and let's just multiply these two together plug that in to your specular roughness and then press X to visualize and whichever node you want to visualize you can just click on it and then press X so I want to see our W noise over here so that's currently what it looks like but I'd like to limit that range so I'm going to use a ramp over here so commala ramp parameter right in here and then I'm going to visualize the MTX multiply and I'll just move the values around on this ramp so push up this low end and then perhaps decrease the frequency on our W noise and eventually we'll end up with something like that and that's going to be pretty good for something like scratches okay so we're going to take that and we're going to to add it to our existing one over here but we'd also like to have a multiplier to control the intensity of this so duplicate this multiply over just like that and then finally add these two together so we're going to use an MTX add and just plug these two in over here and then output that as specular roughness we can delete our visualizer and see what we have so as this clears up you'll begin to see some noise arising we can press X on this ad over here to once again visualize it and you can see we're ending up with something like that now of course you can make changes to things like your ramp so that you can end up with more values and just one thing to take note of these ramps are actually going to have matching values unless we change their names so this one is ramp over here we can just change each one's name so this one can be for scratches so we'll call this one scratches and that'll just turn it into a separate ramp so they're not linked okay so our glass has some imperfections now and then finally an interesting thing that we can do is just with our scratches so this bottom one over here let's go ahead and use an mlx bump over here what a bump will do is it will convert a particular height so we can give it as just a float convert it into a normal map that can be fed into our normals so go over there and then into the normals and it's going to be quite intense initially as you can see that is much too intense so we can just scale it down using our scale over here so you can see that even 0.01 is quite a lot so just find a value that looks good right so something like that that's just going to add that little bit of distortion on the surface of this and then you can play around with things like your values over here once more cool so we've added some Distortion to the glass we've added some noise we can just reenable everything now and there we have it it's basically done you can still add things like lights or you can rotate your hdri so if you were to rotate this over here you would go over to the transform and rotate around y because that would be the equivalent of spinning the room we don't want it to Tumble in any random direction we just want to spin it around the y- axis so if you do something like 45 it changes the shot quite a lot right so once you're happy with what you have the last thing that we can look at is just a few of these render settings so over here you're going to have a resolution now the higher you push up your resolution the longer this is going to take to render and the higher you push up your path tray samples the longer is going to take to render both of these are going to give you better looking results right so pushing up your resolution and pushing up your path traced samples each of those are going to have great impact on the actual quality of your render another thing that you can do is if you go down to the image output under filters you have the D noiser over here you can use the Optics D noiser and what that'll do is it'll smooth everything out now I tend to be a bit cautious about using the D noiser because you can also lose a lot of your detail it can assume that little bits of detail are actually just noise and it'll try and remove that so what you should do is rather use your Optics D noiser on either a very clean image so by pushing this up to maybe 256 or 512 or alternatively by pushing up the resolution so if you double this resolution then keep the path tray samples fairly low then use the Nvidia Optics D noiser you'll get a better result so let's take a look at that let's just double this and you can see that as it's rendering it's actually using the D noiser but as this goes you'll see that it cleans it up quite nicely so there we go after 2 minutes we end up with a really good- looking render and the Optics D noiser has removed a lot of the noise for us but because we at a higher resolution of 2048x 2048 it shouldn't be mistaking any of our detail for noise all right so let's just play around with a few settings and just see some other frames and once you've enabled the optic D noiser it is always going to run in your viewport but sometimes you don't want that so you can disable it while you're busy working in your viewport just to get an idea of what you have ah and my phone wasn't working because I happen to disconnect this by mistake so just plug that back in and then the fo should work again I'm also going to just increase the resolution on that I want it to be a bit more of a tighter volume so let's just go over it background set that to dark and let's just take a look at this so I'm going to decrease the uniform scale over here something like 02 that's cool over there and the voxal size of2 should be fine okay okay so that basically brings us to the end of the tutorial feel free to also go towards the background and throw on that same sort of noise effect so that you have an imperfect background as well um that's the only thing I might add to that as for when you finally render this out if you're having is chues with fireflies I would recommend going over to the color limit over here and decreasing it to a value of about five it's going to dull your scene but it's going to remove any of those super bright noisy areas additionally if you're ending up with areas that are a bit too noisy you can also go over here to the image output under the pixel filter size just increase that to three what that will do is it will smooth out areas where there's supposed to be a lot of detail and sometimes it might get confused between what's supposed to be detail and what's supposed to be Bubbles and things like that so this over here is a good option if you have areas with very high detail right so that's going to help in areas of very high detail and I would recommend rendering this as an overnight render where you push up The Path tray samples over here to something like 256 and you can keep the resolution at 2048 and 2048 and then just render it overnight right you can also add something like a camera move if you want whatever you want right this is your project now you can even change the color of the fluid so if you don't want this to be like water you can change to something else so if we just go over here and let's just change this color on our transmission to something like orange you can even give the foam a bit of that same color and you'll end up with a completely different looking render you can even revisit the simulation if you'd like what you can do is you can maybe slow down the amount that you're killing off particles for the foam so over here if you were to decrease the amount of killing off of particles then you'd end up with something that maintains more foam right so in this part pop VP over here we just have this distribution for life you can increase this life value over here you can change the distribution of how many particles stay alive for long you can do all sorts of things right this is a really good setup for basically doing most carbonated drinks so you can play around with this until you have something that fits your needs but that's it for this tutorial so we've come to the end of these three parts moving on from here we're going to be looking at some ocean simulation stuff and large scale simulations and we're going to be looking at how your entire mindset changes when you go from small scale to large scale as at Large Scale you actually want to break up your simulations into smaller manageable chunks and so I'm going to be showing you how you might do something like that but that brings us to the end of this part and so I'll only see you in the new year I hope you enjoyed this part and I wish you a happy New Year I'll see you soon bye