Today, I'll share the process of making
Ghibli-style clouds in Blender 4.0. The shader in this tutorial was used
in our short animation film "HWABIHWA", which is 100% procedural
and not needing any image or resource. There are a couple of tutorials with similar goals on YouTube
we also watched before making the animation. Especially, I recommend you watch the
video from "Lightning Boy Studios" first, which helped a lot. Their cloud tutorial is still
useful, even though it's been around fore 3 years. This is the final output we're gonna make. Everything is procedural and customizable. And sure, it's made of a lot of nodes. I know, it may look horrifying or confusing,
especially if you're new to Blender. So, here's a simple explanation about shader nodes. I created these nodes to represent the color of the clouds. But if you look closely, you'll notice one repeated pattern. No matter how many nodes you use in shader nodes,
they need to come together somewhere. Usually, we do this with Math nodes, Mix Color nodes,
or Vector Math nodes. Let's just call them Mix nodes. The way node mix is similar to stacking layers. If you ever used Photoshop or ProCreate,
you may be familiar with the concept of the layer system. In Blender's shader nodes, you can do
things you've done with layers by Mix nodes. For instance, with the Mix Color node, you'll find options
that bring to mind the settings you see in Photoshop.
Now, let's give it a try and see how it works. First, let's create a plane. Shift A to add a mesh plane. Press R, X, type in 90 to rotate. And go to the edit mode press U to unwrap. By pressing numpad 5,
you can change our view to orthographic. Now let's move to the shader editor. Add a new material and delete the Principle BSDF. Shift A , Gradient Texture,
and Ctrl T to mapping. Now set gradient type to Spherical. Plug object to Vector. Press S to scale and type in 10. Next, we will create virtual cube by array modifier. Move to the Modifier Menu.
Add Modifier - Generate - Array. And change Relative to Contrast offset. Type 0 in Distance X. Type in 10 in Conut. And 0.15 in Z value. Now Apply the Modifier
and align the Origin point to the center of the object. Now, you can see that the Gradient texture looks like white sphere. OK. Back to the shader editor. Create Mix shader. Add Transparent BSDF and Emission shader. Connect the Transparent to the top,
Emission to the bottom and Color to the Factor. Now you preview the material,
the black areas were not yet transparent. So move to the material setting.
Change the Blend mode to Alpha hashed. And Shadow mode to alpha hashed as well. Now, the basic of fake volumetric setup is complete. If you look at the reference image here, you can notice that the irregular noise at the edges what makes the clouds look realistic. We can do it by mixing textures more. Texture nodes literally generate textures,
and some of them do it procedurally. For example, Noise textures, Voronoi textures,
Musgrave textures, and more. Each of these nodes has sliders to control options
like scale, detail, and randomness. One thing to keep in mind: Unlike texture images, "generating" textures means
creating values by certain rules we set with no limit. So, we need to set the range of the texture to be generated. In this case, we're combining a noise texture
with a gradient texture. The spherical-style gradient texture defines the 'range'. By adjusting the options in the Mix color node,
we can get only the intersection between two inputs. Press Shift A to create Musgrave texture.
Ctrl T to mapping. If we preview this shader, the Musgrave texture will look like this. As we want to get this kind of bumpy outline for our clouds,
we'll blend the Musgrave texture with the Spherical texture. So, copy This Gradient textrue and add Mix color node. Plug height to A and Color to B. And then, set the blending option to the Linear light. If we pull the Factor up to 1 and then check the object,
the texture looks like this. Let's Go to the edit mode, and press H to hide 4 or 5 faces.
Now, we can see the texture properly. Should look more like a cloud when you adjust the value of Factor. And add Color ramps between each texture,
we can control how much they mix. Also, we can change the scale and detail of the Musgrave. Now copy this Linear light and plug the previous Gradient
to B input and Result to Factor of Mix node. Then Ctrl Shift Click the Mix shader. Ok. Let's make more complex texture
by adding another texture here. The clouds in the reference both have a large and small noise,
which makes it more natural. So, add a Noise texture here.
Plug same Vector the Musgrave is using Copy Color ramp,
and Ctrl T click to preview. Now, you can adjust the scale and detail
to make the noise smaller and more jagged. We'll mix this Linear light again with the Gradient texture
we used to represent the fake volumetric. Copy the Linear light.
Plug the Noise texture to A. Plug the Result to B. And, connect this result to here. Now, Ctrl Shift Mouse 1.
And preview the material. This creates a more detailed cloud shape. You can play around the scale and detail of the noise texture
to get the exact look you want. Now, Ctrl J to insert new frames.
Let's call this part as Procedural noise, and here as Spherical. Next, let's add some colors to the cloud. First, delete this Emission node,
and add a Color ramp. By clicking on the levels of the Color ramp,
you can add the colors of your choice. Go to viewport. Shift A. Add a Sun light and rotate it Go to render mode.
But, this material does not respond to the lighting yet. So back to shader editor. Add Diffuse node.
Plug to Factor of Color ramp. The result of Diffuse BSDF can't be directly connected
to a Color ramp, because it's a shader. So, add Shader to RGB
between the Color ramp and Diffuse node. Adjust my Color ramp and light. Now it works. Next, we'll add a normal map. We usually use image textures like this as normal maps. You can learn how to create this normal map image
in the creating clouds course by "Lightning Boy Studios." However, in this tutorial, I'm gonna show you
how to procedurally generate and control this normal texture. First, we need to understand normal maps. This image texture is flat but reacts to light
as if it were a three-dimensional object. It's because the RGB values in the normal map
contain information about the XYZ axes. red for X, green for Y, and blue for Z. This is why normal maps have these strange colors. So, if we could 'simulate' these unusual colors,
it means we can create a normal map procedurally. If we create the pattern we want with a texture node
and replace the RGBs like a normal map, wouldn't that work as a procedural normal? Let's give it a shot. Shift A - Combine XYZ.
Make 2 copies of them. First Type in "1" to X Value
then in Y and Z. We can check that X print as red, Y as green, and Z as blue.
Which is...RGB. We will create basic parts of Normal map
by mixing these RGB values. Now add Separate XYZ
and Texture coordinate. Plug UV to Vector.
Check the gradation by repeating Ctrl Shift Click. Now, we will mix this gradation with RGB. Add Map range.
Plug X to Value. If you change the values of to minimum you can control the dark area. Type -1 in to Minimum . Now, it splits exactly in half. Copy this map range node.
This time, plug Y to Value. We are going to mix these two nodes into Red and Green. Add Vector math.
Set to Scale. Red to Vector.
Result to Scale. Repeat this to Green. Copy this Scale node.
Again, Green to Vector, result to Scale. Now mix the result of these two nodes. Add Vector math node.
This to here and this to here. Finally, mix with Blue texture. Copy this Add node.
Plug two Inputs. Now we get the colors are very similar to the normal map. Now we're going to add a bumpy texture here, like this one.
Add Voronoi texture. By previewing this material, we can create an irregularly
bumpy texture by changing the value of Randomness. Don't forget. Change Dimensions to 4D and set to Smooth F1. Now the edges get smoother if you increase
the value of smoothness in the Voronoi texture. However, from the Blender version 4.0,
adjusting this Factor makes the Shader heavier. I don't know why, but I'll show you an easy way to fix it. We will blend this into the normal map we created before. Plug this Vector to here. Add Vector math. Set to Subtract. Plug same Vector to here. Plug Position of Voronoi to here. Ctrl Shft Click to preview. Change smoothness factor to 0,
and add White noise texture. Texture coordinate, and UV to Vector If you preview the color of this texture,
you can literally see the color noise. Add Map range. Change data type, Float to Vector.
Plug Color to Vector. Insert a Value node. Connect to "To Minimum". And type in -1. You'll find out that there's some dark color noise in the preview. Let's mix it with this texture. Shift A - Add Mix color node. Map range to B. If we adjust the factor of the Mix color node,
we can see that it works like a Smoothness Fator. Alright, it's almost done. Create a Mix node in front of the Subtract. Set to Vector.
Plug this Vector to A and this to B. Ctrl Shift Click to preview. By adjusting the Factor, you can control the contrast. Create a Map range node in front of the Mix node. Set to Vector. Add Value, and connect to "To Minimum." And, change the Value, to -0.4. Then, if you add a Normal map node and connect it
to the Diffuse BSDF, it works such as a normal map. Our plane cloud responds to lighting and
we can freely control the scale and smoothness of the texture. Additionally, if we add a Scale node
between the Subtract node and Mix node, We can control the amount of bump like a normal texture. Now, let's add some details. The clouds used in "HWABIHWA" also used the same procedural normal, but the irregular pattern makes them look much more natural. Start by adding a noise texture. Ctrl T to mapping. Connect Color ramp.
Increase the contrast slightly. We're going to mix this noise texture
with this red-green gradient texture, so let's move some nodes around. Add Mix color node here. And plug Vector of this to A,
then plug Color of Noise texture to B And change the values to 0. Ctrl Shift Click my Mix shader to preview Then, by adjusting the Value of the Mix color node,
the noise texture is blended and the normal map changes. We can adjust the Value, Scale, or Color ramp of
the pre-made normal map to make it look like a painting. OK, so you've got the normal map you want,
now let's call this part as Procedural normal. Let's make them change shape as we move the origin point. Move to Precedural noise. If I play with my Mapping node here, the Location values,
can change the shape. We can add Object info. Plug Location to Loaction Now the shape will change every time you transform this. Add Math node here, set to Multiply.
Type in 0.05. By adjusting the flow here,
you can control how much the clouds change. Let's copy these nodes and place them
on the procedural normal area. Connect the same Value from Multiply
to the Mapping node of the Noise texture. However, when I copy the clouds from EEVEE renderer,
they don't render properly like this. I checked several YouTube and it seems to be a bug. This can be solved by placing the cloud objects
as non-overlapping as possible. Now let's add a little more detail to the outline. One of our goals in making "HWABIHWA" was to recreate
those classic 2D animation styles with 3D assets in Blender, and of course, we wanted the clouds to have the same feel. If you look closely at the clouds in the Ghibli animations,
the edges are a bit darker and blurred. This outline is a sort of afterimage that was created when the animators were shooting by physically stacking cloud and sky paintings. We wanted to keep these unintentional details, even though we can't see them anymore in animations created by digital tools. We'll put the nodes here, next to the procedural noise. Add Noise texture.
Color ramp and change this to Costant Type 10 in Scale and Detail Add Mix color node.
and plug Color of spherical texture to B input. Set to Linear light. Change the Factor to 1. Copy this Color ramp, adjust the value, slightly. And add Math Node set to Subtract. Now add a Color ramp in front of this Linear light. And plug the Color to the Value. Now let's check the preview. You should see a hole in the center of the noise texture like this. This gonna be our outline. Press Ctrl J to make a new frame.
and let just call them, Outline. Ok. Let's move the preview back to the Mix Shader. Add Hue/Saturation node in front of the Color ramp. And add a Mix color node here. Replace this node to here, A to B,
and plug the Color of the Color ramp to A. If you use Node wrangler, hold Shift, and drag with mouse 3,
then you can join them. Finally, plug Subtract to Factor. And change blending mode to Multiply. When you increase the values, you can see the edges of the clouds getting darker. You can also change the hue, values or saturation of the outline. But for better visibility, let's create a sky background
behind the cloud object Super quickly. With a plane and something sky-like shader. The outline is now more visible. If I play with this Color ramp here,
hue, values or other Color ramp, I can cotrol the outline procedually. Now let's add another procedural detail. This is gonna be our last step in this video. Shift A - Texture Coordinate. Go to viewport Shift A - and add an Empty object. An Empty object is an object with no geometry. And we're going to use this object in our shader. Set the Object target to this Empty object. Add Gradient texutre. Set to Spherical.
Plug Object to Vector. Ctrl Shift Click. Now when you move the Empty object,
it looks like a sphere is moving in our clouds. If you add a Mix color node here, and plug Color to Factor. It looks like this. If you change the color, you can use it like a brush to control,
only certain area of the texture. We'll call this "Extra light." since Lightning Boy Studios named it so. This trick is super handy, especially for 2D artists. It's like using a brush to add detail to a specific area —way more like a texture painting. You can easily move things around to add any detail you want. We've taken full advantage of this technique, and you'll see it
in another tutorial we'll be uploading in the future. In this tutorial, we will show you how to upgrade this
with the Noise texture Select this Gradient texture and press Ctrl G to make a group. And now, toggle back and forth between the two, by pressing tab. In this group, add a Noise texture and Ctrl T to mapping. Color ramp here. And change the Scale and Detail to 10. And here is the thing. If you increase the distortion, now it turns into
the weird distored texture and we're going to mix it up. Increse the Roughness, and add Mix color node. Plug Color of the Gradient to B. And set to Linear light, Factor is 1. And now, if you change values once again,
the texture looks like a painting. You can add extra color here, It's looks more realistic. And don't forget plug the Result of the Mix node
to Color of the output. Now press tab to exit. And let's see how it works. We can change the color of this Extra light. And the really cool thing is... We can duplicate this. Ctrl C and Ctrl V will duplicate the group meaning that they are linked together. If you change nodes inside a group,
the other group you duplicated will also be changed. Copy the empty object, and set it as the new object target. Move it around bit. Now you can change the colors in the Mix color nodes, and
you can also change the blending mode to play around with it. Now it's done. We can adjust the every values or colors
to get the clouds we want! In the next video, we'll make these clouds more "controllable," - adjust their shape, contrast, and change details outside of the shader node editor. We can use the same techniques to make the sky more artistic. And yes, even add motion blur. We'll return shortly, so please subscribe and hit the like button. This is Won from Studio Aileron.