- Часть 0: создание поверхности воды
- Способ 0: Dynamic Paint
- Способ 1: Displacement map
- Способ 2: Модификатор Ocean
- Часть 1: создание материала
- How can I create a water material in Cycles?
- 8 Answers 8
- Blender Liquid and Glass Materials [2022]
- Glass Material in Blender
- Cycles Glass Material
- Eevee Glass Material
- Liquid Material in Blender
- Cycles Liquid Material
- Eevee Liquid Material
- Tips for Creating Liquid and Glass Objects
- IOR or Refractive Index
- Liquid Object Geometry
- Conclusion – Blender Liquid and Glass Materials
Часть 0: создание поверхности воды
Для начала нужно создать поверхность воды. Сделать это можно разными способами.
Способ 0: Dynamic Paint
Добавленную в сцену плоскость необходимо несколько раз подразделить (выделить всё в режиме редактирования W Subdivide). Чем больше подразделений — тем выше→→качество, но и больше нагрузка на комп.
После подразделения отправляемся во вкладку Physics (панель инструментов), жмём кнопку Dynamic Paint Add Canvas Surface Type: Waves. Водная поверхность готова.→→Теперь создаём объект, который будет создавать, собственно, волны. Для этого сойдёт любой меш. Выбираем его, опять идём в Dynamic Paint, но на этот раз вместо Canvas выбираем Brush, жмём Add Brush и больше ничего не трогаем.
Перемещаем Brush — создаём волны. Только при этом не забыть включить проигрывание анимации (Alt+A). Для наглядности сделал убогую гифку:
Способ 1: Displacement map
Потребуется обычный плейн с UV-развёрткой. Добавляем Texture Noise Texture и→подключаем его к узлу Displacement у Material Output’а. Теперь при переключении режима просмотра в «Rendered» можно наблюдать некую рябь на воде (изменять её вид можно, меняя параметры Noise Texture). Для наилучшей наглядности сделать плейну зеркальный материал (типа Glossy) и добавить карту окружения (Environment map).
Правда, такая рябь будет статичной (разве что попробовать анимировать какие-то параметры у Noise Texture, но сам не пробовал).
Способ 2: Модификатор Ocean
Суть сводится к тому, что добавленному в сцену плейну добавляется модификатор Ocean, после чего настраиваются его параметры. Подбирать параметры — по вкусу. Из наиболее значимых:
0. Repeat X/Y — если одного квадратного «океана» не хватает.
1. Resolution — чем больше — тем лучше, более-менее оптимально — 15-17.
2. Size — размер плейна (эффект не идентичен тому, что достигается при использовании кнопки S и мыши — попробуйте сами и поймёте, в чём разница).
3. Scale — высота волн.
4. Chopping — увеличение этого параметра делает гребни волн более отчётливыми.
Если хочется, чтоб этот океан был не статическим (например, при создании видеоролика),то нужно анимировать параметр Time (который по умолчанию 1.00)
Часть 1: создание материала
Теперь, когда поверхность создана понравившимся способом, создадим материал воды.0. Добавляем новый материал плейну.
1. Difuse BSDF удаляем.
2. Вместо него ставим Mix Shader.
3. Создаём Glass BSDF и подключаем на верхний инпут Shader у Mix Shader’а. Roughness —на ноль, IOR — 1.333. Этот параметр отвечает за степень искажения объекта, на который мысмотрим через воду. Для воды он равен 1.333, для других материалов таблицы можно найтив интернете (гуглить «показатель преломления»).
4. Добавляем Transparent BSDF и подключаем на нижний инпут Shader у Mix Shader’а.
5. Добавляем узел Layer Weight, аутпут Fresnel подключаем к инпуту Fac у Mix Shader’а.
6. Между Layer Weight и Mix Shader’ом втыкаем узел RGB Curves. Как настраивать? Как больше нравится. Включите режим просмотра Rendered и играйтесь с кривыми, пока результат не начнёт нравится.
7. Теперь желательно сделать так, чтоб по мере увеличения глубины становилось темнее. Для этого добавляем Volume Absorption и подключаем к инпуту Volume у узла MaterialOutput. Цвет и Density, опять же, подбираем сами по вкусу и ситуации.
Автор: Денис Скиба aka Mapper720
How can I create a water material in Cycles?
I’m creating a scene with large amounts of water that will be readily visible, containing refraction and at various angles. The scene is an indoor long-course swimming pool, about 50 meters, all of which would be seen by a camera above 5 meters above the water’s surface. This is being fluid-sim’d, but there are no quickly-moving objects or people, so any water movement is slower and in bulk. The «remove bubbles» option is enabled.
I’ve tried using a Mix Shader of Refraction BSDF and Reflection BSDF with the factor coming from a Fresnel node, but the results appear either too glossy or too transparent and overly colored. How can I make the water appear realistic? Changes to shaders (refraction to glass)? Or is tweaking colors sufficient?
8 Answers 8
It is very important to add some small scale displacement to the water surface. This small scale detail is present even in closed spaces due to minor drafts of air, especially in large pools of water. My personal experience is that for best results you can use a combination of animated voronoi textures, like perlin noise does.
This small detail makes it possible to have areas of water that are slightly more refractive or reflective than others. To separate the refraction and reflection parts, you use a standard fresnel factor connected to a mix shader node.
This is my example shader:
(play with index of refraction to achieve a different ratio of refraction to reflection depending on the angle of viewing)
And this is the resulting water:
Of course on indoor scenes you will need many samples or clever lighting to avoid too many fireflies.
I’ve found that using a simple glass glass node works. Also it would help to mix in a refraction node and set the IOR to 1.333 , which is the IOR of water. If you want foam use a voronoi crackle texture node and invert the alpha so that the «crackles» give the reflection as white and it looks foamy. You will have to tweak the setting to get it looking the way you want it. The look of your water also depends on your lighting. Always Model, then Light, then create your materials and texture, and finally post processing.
Large scale water (almost opaque) looks very different than small scale water (very transparent). Fast water(whiter, low reflectivity) also looks very different than slow water(clearer, high reflectivity). So unfortunately there isn’t a simple answer.
Since water is transparent, the lighting and environment which it’s in is very important. A drop of water in a blank world is going to be invisible. So realistic lighting and proper environment for it to reflect off helps a lot.
Here is another example for a lake water with very deep and strong reflection; Nodes: Result:
I did not let it render much samples(only 3) so the image is low quality, but you can see so water shader looks amazing;)
Hope this answer helps you to make lakes and rivers;)
The Glass BSDF node offers essentially everything that you want.
The IOR you will want to use is 1.333 (from a Blender Artists post), and you’ll pretty quickly get a good look for stationary water. If you want foam, you’ll have to get a little bit clever with your implementation, but water by itself works pretty well just with the single shader.
If you’re using the newest version of Blender, it is also possible to do SSS to mimic the effect of light in water.
Example: My attempt at making a standard water.
Here’s one with SSS; it’s not realistic, but could be helpful for portraying deep water (i.e. oceans).
In short, I’d strongly recommend using a simple Glass BSDF for your water, and if you run into issues trying to work around it, rather than trying to build the water from scratch using reflection/refraction. Cubes aren’t the best way to show this; I put mine inside a «container» because otherwise you get to see the glass reflecting on itself, but this shouldn’t be an issue with a more complex model.
Note that the second render got more samples, so any quality discrepancies are likely due to that.
Blender Liquid and Glass Materials [2022]
This Blender Liquid and Glass Materials Tutorial covers all kind of techniques how to create unique materials and render them inside Blender. Blender is a huge and very diverse software. It allows for creating most different objects, characters and scenes. One of the most common things that people want to create in Blender is translucent materials. There is no clear way to create one and it might sound difficult for someone new to 3D design. In this article we will see how you can create both liquid and glass materials in Blender and how they are different.
Glass Material in Blender
First would be the simpler one of the two – the glass material. Also it is easier to understand how and why does this work. We will look at how to create it in both Cycles and Eevee rendering engines.
I have created this simple scene below that I am going to use to show everything:
It has a Suzanne monkey behind the Plane, and also a container with another object in it. Plan is to make the Plane to be made of glass, so we could see the monkey through it. And to make the object inside of the container – our liquid.
Cycles Glass Material
Starting with the main rendering engine – Cycles. Cycles tries to match the physics of the real world. Meaning that it is not difficult to create something that is translucent.
Before proceeding – make sure that your Render Engine in the Render Properties tab is set to Cycles. Otherwise some options would be different and we could not see the progress too.
And to see the results of the changes made to your material, we will need to be in the Rendered Shading mode.
First of all we need to select an object and open the Material Properties tab of the Properties Editor and create a New material for this object by clicking on the “+ New”.
Now using the settings that appeared – we will create a glass material. Basically, we will need to change only two simple settings. First one is quite obvious – Transmission. It should make our object let the light through. Set it to the maximum value – 1.
Transmission set to 1.0
It already kind of works and we can see the shape of our monkey. But the glass looks a bit foggy or frosted. This is happening, because by default the Roughness value is set to 0.5. All we need to do to fix that is to change the Roughness value to 0.
Roughness set to 0.0
This made our plane fully transmissive and reflective. You can see the monkey object without any problems through it. Also you can see the reflection of the HDRI that I am using right now.
We are almost done, there is just one thing left to do. You may have noticed that the floor through the glass and without it – looks different. Everything looks a bit darker through the glass. That is because by default the Base Color of any object is not purely white, but instead a bit darker. Just change this for our glass to have values of Hue – 0, Saturation – 0, Value – 1.
After that – the glass material is done. The result is like this:
We can see everything through and it does not darken the behinds of it. The material settings setup is like this:
Cycles Glass material settings
Eevee Glass Material
If we would change to the Eevee Rendering engine right now with all the settings in place – you would expect it to work as well as it did with Cycles. But it does not work.
This looks more like a mirror than a glass. We can’t see anything through it at all, only reflections.
It is like this, because Eevee works differently. You can’t just increase Transmission for this to work. Instead we need to change the Alpha setting.
Though changing it now yields no results at all. Before that, we also need to change the Blend Mode from Opaque to something else.
The Alpha Clip does not work as desired. It makes the object fully invisible. No reflection, no nothing, it is gone.
“Alpha Clip” Blend Mode
Next is Alpha Hashed. It is a lot better. We clearly can see through the object and at the same time the object is still there. We can see reflections and it is not gone. But the Plane looks a bit odd. It is made of a lot of small particles, like a white noise.
“Alpha Hashed” Blend Mode
Last but not least is the Alpha Blend option. This one looks the best in my opinion. It is not more granulated and neither is it invisible. I recommend sticking with this option.
“Alpha Blend” Blend mode
That is basically it for creating a glass material in the Eevee. Roughness is 0 and Transmission is 1, same as was in Cycles. Control the translucency levels using the Alpha option and use Alpha Blend to see through.
Liquid Material in Blender
Liquids are very similar to glass in their looks. They are also mostly translucent and reflective. But they are different at the same time. Let’s look at these differences both in Cycles and Eevee engines.
Cycles Liquid Material
If we would just add the same glass material to the liquid object right now – it won’t really look like a liquid. It looks just a piece of glass inside something.
We added glass material, so that was expected. Mostly this happens because liquids are not the same as glass, just can be similar. Liquids have volume, meaning that they are not fully transparent, unlike glass. Just think of any deep water – you can’t see the bottom usually, because it is not that transparent.
You can try and fix this problem by changing the Transmission and Roughness settings. Lower the transmission and add some roughness to reduce the overall transparency and reflectivity.
This does look better and we now can distinguish this as something different from the regular glass. But this is not a solution to our problem in any way. It still looks just like a foggy glass. Instead, we will have a different approach.
Reverse the changes back to how it was, we will add volume to this object. Because, as I mentioned before, liquids usually have some volume in them. In the Material Properties, you should be able to find a Volume section. We will need to apply a Volume Absorption here.
Right after adding this – it already looks a bit different. Though not too much, it still looks like glass.
You can use the newly appeared settings to control both how dense the absorption is and also the color of the absorption. So instead of changing the color of the object itself – we will change the color of an absorption, which looks more realistic.
I plan to create something that looks like water from the bog. Water like this does have a lot of volume. So I have increased density a bit and added a green tint to the volume. I think that the result looks good
Eevee Liquid Material
If we would change our render engine to Eevee with all the settings from Cycles active – it already mostly looks good. Just don’t forget to change the Blend Mode and Alpha settings.
Though it is not ideal, definitely not as good as it was in cycles, but I don’t think that it can be. To make it look better, I will increase the density even more, as it seems to work lighter in Eevee. And also will make it a bit foggier by increasing roughness and decreasing transmission settings.
And that’s it for the Eevee. All the things that we made to create a liquid material in Cycles also apply here, with some additional things.
Tips for Creating Liquid and Glass Objects
We have some tips for you to create a believable liquid object. Let’s examine them.
IOR or Refractive Index
One of the settings that your material has is an IOR. This setting changes the way light passes through your object. This is important, because usually light becomes distorted a bit after passing through an object. Like when you are looking at something through the water, it can look distorted and bigger, when in reality it is not.
So IOR value of 1 makes so that light passes without any distortion or change. A quick example on the glass pane that we did earlier:
Glass pane became practically invisible, because it did not react to the light in any way. There is no such object in the world. Higher value returns the glass back. And at the same time distorts the view. Monkey now looks bigger through the glass and displaced to the left more..
IOR value of 1.4
On the other hand, lower value distorts it another way around. Now Suzanne looks a bit smaller and feels like she was moved to the right.
IOR value of 0.75
It is important to set the correct value for the IOR, this will make your render a lot more believable. And it is not that hard to make it right, correct values can easily be found on the internet. Just search for the right material’s IOR and you will get a value. For example, glass can be very different, but 1.5 is a good middle ground. And water is usually around 1.33 IOR.
IOR value of 1.33 for liquid
Liquid Object Geometry
Another thing that you can improve is the geometry of your liquid object. Because in reality liquids are not just a flat plane lying in the container like that.
First of all – the surface tension. When liquid interacts with an object such as a container – there is a surface tension between them. This manifests itself in the edges of the liquid object. They react to the container and “stick” to it, this makes them protrude up a bit.
I have recreated this effect by adding some geometry to the edges(you can use bevel for this) and moved the geometry a bit upwards.
It is a small detail, but it adds realism to your final render and makes it better. Besides, it is easy to make, so no reason not to do it. Looks like this in the Cycles:
Another change that you can make to get rid of the feel of glassiness is to add some irregularity to the geometry. To create a feeling that the liquid is in motion, instead of being perfectly still.
For this we will need to add geometry to the top face of an object. So either use a Subdivision Modifier or just manually subdivide this face a couple of times.
Deselect everything by pressing [A] twice and then go to the Select > Select Random.
This option will select randomly chosen vertices of our object. Should look something like this:
What we are going to do now is move these vertices on the Z axis a tiny bit up. So this will create an irregularity in the object’s plane and it won’t look so flat anymore. It will look detailed and a lot more interesting.
Conclusion – Blender Liquid and Glass Materials
Turns out, it definitely was not that hard to create a nice-looking realistic glass and liquid materials in Blender. If you are interested in Blender materials, then we have a nice Blender Materials Tutorial for you. There is also a way in Blender to simulate liquids, to maximize their realisticness – Blender Fluid Simulation Tutorial is a great introduction to that. Hope you enjoyed this Blender Liquid and Glass Materials Tutorial.
For the Blender beginners in general, we made an awesome four part tutorial that goes through all steps of creating your own scene in Blender from scratch – Blender Basics Tutorial.