Procedural Bubble Material (Blender Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial i will show you how to create this procedural bubble material in blender and i'm going to be creating this material in cycles because i want it to look very realistic but if you want to do this in blender evie you can so if you want to do it in blender eevee you can totally use eevee and just follow the tutorial and then at the end of the tutorial i will show you some different settings that you can turn on in blender eevee to get the transparency to work and to make it look a bit better in blender eevee and here is the final result in cycles and then here is the final result in blender ev so you can use whichever render engine you prefer if you'd like to help support me and this channel then you can purchase the tutorial files on my gumroad store and you can also get access to the tutorial files if you join my patreon page so the links are in the description to my gumroad store and patreon page and those are both really great ways to help support me and this channel so i can continue to make more tutorials and another great way to help support me and this channel is by checking out my blender procedural material packs so they're packs of 10 realistic procedural materials created with blender's procedural nodes again links in the description and after this video if you'd like to learn how to create any of my procedural materials then you can check out my blender procedural material playlist on youtube again links in the description and then just one more thing before we start i want to give a huge thanks to this video sponsor blender grid blender grid is an easy to use render farm specifically designed for blender i've used the service and i highly recommend it upload your blender file or a zip file with the blend file and textures you can change the render settings on the website before rendering blender grid will let you know the cost before you start the render you can even choose when you want the render to finish if you're on a tight deadline while it renders you can check the rendered frames to make sure everything is rendering properly once it finishes just download the files and compile the frames in a video editor use the link in the description to get twenty dollars of render credit on your first render all right so before we get started with the procedural setup i'm gonna show you how i have the blend file set up so as i said i'm going to be using the cycles render engine but if you want to use ev you can so if you want to use ev you can just change the render engine to eevee and then at the end of the tutorial i will show you some different settings that i would do to make it look better in blender eevee so here in the 3d scene i pressed shift a and i went here to mesh and then i went right down here and added an ico sphere now right behind me if you click on that little arrow the add icosphere settings i turn these subdivisions up pretty high to like a six so that it is very detailed and then i shaded the object smooth so we just have a nice smooth icosphere to preview the material on and of course that is also the shape of bubbles so then i duplicated these bubbles and i created three of them of different sizes and then i added a camera and i just placed the camera pointing at the bubbles now what's also very important is to get some very realistic lighting because bubbles are transparent and they're also very reflective and so having a nice world hdri in the background can really help to make them look more realistic so right over here on the world properties i added in this suburban park area 1k hdr and this is a free hdri from polyhaven.com so if you'd like to download the same hdri that i'm using i'll have the links in the description so over here on the world i just added a new world and then right here on the color if you click on the yellow dot you can change that to environment texture and then you can click on the open button and open up the downloaded hdri and again i just downloaded the 1k hdr version of this hdri and then let me just go into rendered mode by holding down the z button moving up into the rendered view so you can see this hdri gives some really nice lighting and then i did want to be very bright just so that the soap bubbles have a lot to reflect so i actually turn the strength of the hdri up to a three just so that it's very nice and bright now if you want to you can also make the background transparent that's what i'm going to do so i'm going to click right up here on the render properties and then i'm going to go down here to the film tab and open this up and i'm going to check mark the transparent button and that way the background is transparent and then what i'm going to do in blender's compositor is add just like a nice blue background and i'll show you how to do that later in the video now also right here on the color management i'm going to open up the color management and on the view transform i'm going to make sure this is set to filmic and then to make the lighting more contrasty and make the colors kind of pop out and look nicer i'm going to change the look here to the very high contrast and then i will also be using the node wrangler add-on in this tutorial so if you don't have the node wrangler add-on enabled you can just click on edit and then you can open up blender's user preferences and then if you go over there to the add-ons tab you can just search for the node wrangler and just check mark the node wrangler add-on and i'll show you how to use it in the video all right so i'm just going to select one of the soap bubbles and click on new and i can just rename this to procedural bubbles and then i'm going to click right here and i'm going to drag and drop this material onto these other bubbles so to make these bubbles transparent right here on the default principle bsdf shader i'm going to turn the transmission value all the way up to one and now you can see they start to look kind of like a frosted glass now i don't want there to be any roughness so let's take the roughness value and i'm going to turn it all the way down to zero and already we're getting kind of like a glass shader by turning the transmission to one and the roughness to zero now i want these bubbles to be much more transparent because right now they're actually not very transparent because right now this looks a lot more like glass but i'm not creating a glass shader i'm creating a soap bubble so what i'm going to do is press shift a let's go to the search here and i'm going to search for the transparent vsdf shader and let's just stick this right there and then i want to mix the principled and the transparent together to make it more transparent so to do this let's press shift a i'm gonna go to the search and i'm gonna search for a mix shader so this will allow us to mix two shaders together so i'm gonna drop this right here and then i wanna take the transparent and i want to put that into the top one and the principle is going to go into the bottom one so now if i change the factor value we can change this between just using the principle or just using the transparent and of course if we just use the transparent you're not able to see it at all now i want some parts to be more transparent and some parts to be less transparent so what i'm going to do is press shift a and i'm going to go to the search and i'm going to search for a layer weight node so let's drop this right here above the transparent now we turned on the node wrangler add-on earlier in the video so if i control shift and then select different nodes that is going to preview the node so if you control shift and select it multiple times it's going to go down the different values and show you the different values so i'm going to control shift and select this until we can preview the facing so what this is doing is it's making the outer edges whiter and then inside here in the center it's making that darker so instead of using this factor value this is just a number value i'm going to instead use this color data right here so let's take the facing and we're going to put that into the factor and then i can control shift and select the mix shader to preview it so now you can see what's happening if you zoom in over here right here it's a bit more reflective and it looks a little bit more like glass and it's kind of reflecting things more on the side but then in the center it is more transparent and you're able to see through that better and that is already making it look much more like a soap bubble so on the edges it's more reflective and then inside it's more transparent and then also on this blend value right here i want to turn this up a little bit to like a 0.6 so if i control shift and select the layer weight node twice you can see what that's doing so by turning it up to 0.6 the darker values are just a little bit less so i can control shift and select the mix shader to preview it now if you look right here in the center you can see that it's very transparent and i don't want it to be fully transparent so i want to make those values a little bit less strong so to control these values i can press shift a i'm going to go to the search and i'm going to search for a color ramp and let's put the color ramp right in here between the layer weight and the mix shader so i can now click on the black tab and i can start to turn this value up and you can see as i turn it up it's using less and less of the transparent and it's using more and more the principle now i don't want it to be fully white but i also don't want it to be fully black i just want to be using a little bit more of the principled shader so i'm going to turn it up a little bit and if you want to use the exact same color that i'm using you can go over to the hex value and you can put in a hex value of 3d 3d 3d kind of fits the topic of this video because this is a 3d tutorial and then also right here on the transparent color make sure that is set to fully white because if it is turned down you can see the transparency isn't going to work so make sure the transparent color is turned all the way to fully white so this is starting to look a lot like soap bubbles but if you've ever looked closely at a soap bubble or looked at some images online then you probably noticed that there are some little swirly random colors and so let's add those colors so i'm going to press shift a i'm going to go to the search and i'm going to search for a noise texture let's just click on the noise texture and drop it down here and then i can also control shift and select the noise texture to preview it and i'm going to ctrl shift and select it twice and that's going to bring us to the color one instead of the factor so the factor is just black and white data but this is one is actually color data you can see that we have some random colors now i also want to use the object coordinates just so that the noise texture is placed on the objects more evenly so with the noise texture selected i'm going to press ctrl t and that is using another feature from the node wrangler and it's going to add the texture coordinate and mapping now i don't need the mapping so i can just select the mapping node and press the x key to delete it and then i want to use the object coordinates so let's plug the object up to the vector now on the noise texture on the scale here i'm just going to turn this down to like a 2 and then i do want the noise texture to be pretty detailed so let's turn the detail level right here all the way up to the max which is 15. so that is looking pretty good but i do also want to add a little bit of swirls so on this distortion value right here i'm going to turn the distortion value up to like a three and now you can see there are lots of little swirls there in that texture so what i can do is i can take the color and let's put that into the base color of the principle and then i can control shift and select the mix shader to preview that and now if you look over here especially on the sides where it is less transparent you can see there's little random colors there now it's really hard to see and i do want to be able to see a little bit better so to be able to see that better let's press shift a i'm going to go to the search here and i'm going to search for the hue saturation node so we're going to take the hue saturation value node and we're going to put it right here after the noise texture so then what we can do is we can turn up the saturation value and that is going to make the colors more saturated so i'll ctrl shift and select the hue saturation value just so that you can see what it's doing so if i turn the saturation value all the way up to like a 2 now those colors are much more bright and saturated so i can control shift and select the mix shader again and you can see now those colors are much more visible and that is looking much more like a soap bubble now when i was prepping for this tutorial i was looking at reference images of like high quality close-up images of soap bubbles and in the reference images i could see just a tiny tiny little bit of bump or normal on the soap bubble so i am going to be adding just a tiny little bit of bump into the normal to just make it a little bit more realistic so what i'm going to do is take the color value from the hue saturation value and i'm just going to plug that into the normal now we need to convert this to normal data you can see there's some weird shading issues this is color data but this needs to be normal data so to convert this color data to normal data let's press shift day i'm going to go to the search here and i'm going to search for a bump node let's click on the bump node and i'm just going to drop it right here between the hue saturation value and the normal and then i can take this wire and i want to put it into the height value that's going to convert it to normal data now this is like super super bumpy and of course i don't want it to be that bumpy i want to be very smooth so we're going to turn the strength value way down so i'm going to turn this strength value way down to a point zero one so just a point zero one so it's going to be very very subtle but i can just kind of zoom in here and wait for it to load up and you can see there's just a tiny tiny little bit of bump and it just makes it look a tiny bit more realistic so just giving a tiny little texture in there it should be very subtle though so i will just give this a render and then i'll show you what i did in blender's compositor to set up a nice background and add a denoise alright so there we go the render is finished now if you want to you can head over to blender's compositor and you can do the same compositing settings that i did if you want to get a similar final render to the one that i got so i'm gonna hop right over here to the compositing tab and then click on use nodes and then also make sure this backdrop is turned on so because we turned on the node wrangler add-on i can control shift and select the render layers and that is going to add the viewer node and we can preview those bubbles in the background now i want to add just kind of like a nice blue background in the background so let's press shift a i'm going to go to the search and i'm going to search for an ellipse mask let's just click on the ellipse mask and i'm going to drop it right here so i can control shift and select the ellipse mask to preview it and you can see what this is looking like so you can change the width and the height values and i'm going to change this and then after i change these values i will blur it and change the colors and that way we'll have kind of like a basic gradient so i'm just going to play around with these values and make these a bit bigger all right so there we go so i have the ellipse now i want to blur this so i'm going to press shift a let's go to the search and i'm going to search for a blur node and let's just drop the blur node right here now i'm going to click and drag down on the x and y values and i'm going to change this to a really big value like 700. this will also depend on like the resolution that you rendered your image i rendered mine at 1920 by 1080 but then i set the resolution to 200 so it's pretty high quality so just set the blur amount to whatever works well for you now this is just white and black but i kind of want to make some blue colors so i'm going to press shift a let's go to the search and i'm going to search for a color ramp and let's just drop the color ramp right in here after the blur so i can now just change both of these colors so on the black tab i'm going to make this like a very light blue color something like that and then on this white tab right here i'm going to make this as well just like a very bright blue color but this is going to be a bit more white and just wait for that to load up and you can see we now have a really nice background there so now i just want to mix the background with the bubbles so to do this i'll press shift a let's go to the search and i'm going to search for an alpha over node and let's just drop this right here and then i'm going to make sure that the viewer and composite is both plugged up to the alpha over and then i can just take the render layers and we're going to plug that into the bottom alpha over and there we go so it just took a moment to load up but you can now see we have this really nice bright blue background in the background now i also want to add a d-noise node just because the bubbles have a little bit of noise so let's press shift a i'm going to go to the search and i'm going to search for the denoise node and let's just drop the denoise node right here into the composite and then bring the viewer over we're just going to plug that up there and then i'm going to just click on the accurate and i'm just going to change it to fast because i find that it is quite a bit faster but it doesn't really affect the final result and there we go so there is the final compositing so to save this image you can press the f11 key and that is going to take you back here to the image editor and then i want to click on the drop down and i want to click on the viewer node and that is going to show us the final rendered image so then to save this image you can just click on image and click on save as and just save the image to your computer alright so now for everyone who wants to do this in blender eevee let me show you how to change this so that it works better for blender evie so i'm going to click back here on the shading tab and then i will hit the escape button and i also want to drag this out and then on the render engine right here i'm going to change this to blender evie and when you change this to blender ev the transparency isn't going to work so you're going to have to change some settings to get the transparency to work now a few settings to make ev look a bit nicer i'm going to turn on the ambient occlusion right here so just check mark that and then i'm also going to turn on the screen space reflections and if you open this up by clicking on the arrow i'm also going to turn on the refraction and those are all just little things which will make it look a bit more realistic now to make the transparency work we need to click right over here on the material properties and just make sure you have the procedural bubble material selected and then i'm going to go right down here and open up the settings tab so under the settings on the blend mode we want to change these both to alpha hash so the blend mode to alpha hash and also the shadow mode to alpha hashed as well and it might take a moment to load up but now if i zoom in there you can see that was looking much more realistic and we're actually able to see that transparency so we're able to see through the bubbles and then one more thing you could do to make it look a bit more realistic is you could click on the screen space refraction just check mark that and i do think it helps to make it look a bit more realistic and there we go so there are the soap bubbles in blender eevee so i'll just give this a final render and there we have it so there's the final render using blender evie so this is gonna wrap it up for this tutorial i hope you found this tutorial useful and thank you so much for watching and if you'd like to help support me and this channel you can purchase the project files for this tutorial on my gumroad store and you also get access to my procedural materials if you join my patreon page and checking out my gumroad store and patreon page are both great ways to help support me and this channel and you can also check out my blender procedural material packs if you'd like to purchase more of my materials and if you'd like to learn how to create any of my procedural materials then you can check out my blender procedural material tutorial playlist on youtube again all the links are in the description but i hope you enjoyed this tutorial and i hope it was helpful and thank you for watching
Info
Channel: Ryan King Art
Views: 20,752
Rating: undefined out of 5
Keywords: Ryan King Art, Blender Tutorial, Blender, Ryan King, Tutorial, soap, bubble, blender, 3d, tutorial, ryankingart, procedural bubble, material, shader, procedural material, soap bubble
Id: G01jRNtYzqI
Channel Id: undefined
Length: 18min 4sec (1084 seconds)
Published: Thu May 19 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.