- Создание деревянного стакана в Blender
- Финальный результат
- Видеоурок
- Текстовая версия
- How do you make procedural wood texture in Blender
- Creating the wood grain for a procedural wood texture
- Creating a procedural wood plank effect
- Creating a roughness textures
- Creating a node group for the wood texture
- Final thoughts
Создание деревянного стакана в Blender
В этом уроке будет показано, как создать старую деревянную чашку. Финальный рендер будет производиться в Cycles. Данный урок показывает техники, которые будут очень полезны новичкам.
Финальный результат
Видеоурок
Текстовая версия
Создание стакана
Удалите куб, и создайте вместо него UV-сферу. Перейдите на вид спереди (NumPad1), ортогональный вид (NumPad5), режим отображения Wireframe (Z), затем режим редактирования (Tab), и выделите верхнюю часть сферы, как показано на рисунке:
Удалите выделенные вершины (X > Vertices). Теперь выделите нижнюю часть, как показано на рисунке, и затем нажмите (S|Z|0|Enter).
Не снимая выделения с вершин, нажмите клавишу G и вытяните их вниз по оси Z, а затем немного сузьте дно стакана (S), чтобы придать необходимую форму стакану.
В завершении изменим форму стакана так, чтобы он был более похож на деревянный. Перейдите в меню Select > Random. Затем нажмите (S|1.02|Enter). После этого вернитесь в объектный режим и режим Solid.
Также добавьте шейдер Smooth и два модификатора (Solidify и Subdivision Surface):
Создание пола и настройка освещения
Добавьте в сцену плоскость, и расположите ее под стаканом. Увеличьте ее в размере (S|100|Enter). Переключитесь на тип рендера Cycles Render. Добавьте новый материал для плоскости, и установите для него оранжевый цвет:
Выберите лампу, и расположите ее сначала над стаканом, а затем сместите влево примерно на 3 блендер-единицы (три квадратика на сетке). После этого выставите следующие настройки для лампы:
После настройки освещения выставите камеру для финального рендера.
Текстурирование стакана
Переключитесь на рабочее пространство Compositing. Выберите стакан, и создайте для него новый материал. Загрузите в качестве текстуры изображение woodsample.jpg (или любую другую текстуру дерева на Ваше усмотрение).
Далее нужно расположить только что добавленную текстуру так, как нам необходимо. Перейдите в режим редактирования, полностью выделите стакан и нажмите U > Unwrap. В окне UV/Image Editor выберите только что загруженную текстуру, а в окне 3D-вида переключитесь на режим отображения текстур, чтобы видеть, как располагается наша текстура на стакане.
Теперь Вы можете в окне UV/Image Editor перемещать развертку, при помощи клавиши G, и видеть результат наложения текстуры на стакане. Закончив с этим, вернитесь в объектный режим.
На данный момент стакан выглядит плоско и не похоже, что он выполнен из дерева. Сейчас, при помощи нодов, мы исправим этот недостаток. Данный прием можно использовать и на других материалах, но при использовании материала дерева получаются наилучшие результаты. Подключите выход Color нода Image Texture к входу Displacement нода Material Output.
Наглядная демонстрация применения данной техники:
Можно приступать к финальному рендеру изображения. На вкладке Render выставите нужное разрешение и количество семплов, и нажмите F12. Жду результатов!
Источник
How do you make procedural wood texture in Blender
Wood is a texture that doesn’t require a too complex shader to recreate procedurally. But it can be a bit difficult to know exactly how to arrange the shader nodes. So how do we create a procedural wood texture in Blender?
To create a procedural wood texture:
- Navigate to the Shading Workspace
- Create a Texture Coordinate, Mapping Node, Noise Texture, and ColorRamp Node
- Connect the Texture Coordinate UV output > Vector input Mapping Vector output > Vector input Noise Texture Fac output > Fac input ColorRamp Color output > Base Color input Principled BSDF
- Lower the scale on either the X or Y axis of the mapping node to around 0.3 and increase the noise texture detail to 15 and roughness to around 0.7
- Adjust the ColorRamp handles position and color values so that they look like wood.
In the rest of this article we’ll go into more detail about create a procedural wood material as well as more options for customization.
If you are completely new to shader nodes you can check out this beginners guide.
For an image texture based wood texture setup you can also check out this guide.
Creating the wood grain for a procedural wood texture
To create the wood grain for our procedural wood texture we will be creating a noise texture and then stretching it out using Blender’s mapping node so that it looks like this.
First we will create each of those nodes in our shader graph. To access the shader graph first select the object we’re creating the texture for and make sure it has a material. Go to the top of the Blender window and select the Shading Workspace.
In the shading graph we can go to Add > Search we can then search for whatever node we need and drop it into our graph. You can also press Shift+A while your mouse is inside the node graph to bring up the Add menu at your cursor position.
For the wood texture we will need a noise texture, mapping node, and texture coordinate node.
Choose a Coordinate from the Texture Coordinate node. For our example we can use the UV coordinate and connect it to the mapping node vector input because I have a UV map setup on my object.
If you don’t want to rely on UV coordinates, you can also try object or generated coordinates.
Connect the mapping node vector output to the noise texture vector coordinate.
The axis we need to scale our noise texture will depend on the object but usually this will be either X or Y. I recommend shrinking the scale of one axis and keeping the scale of the others the same.
In this example I will decrease the scale on the Y axis to -0.02 as you can see on the mapping node in the image below.
To preview our noise texture we can connect the noise texture to a color ramp and then connect that to the Principled BSDF color. For this example I’ve changed the color to more closely match wood and adjusted the color ramp.
Creating a procedural wood plank effect
We can fairly quickly create a wood plank effect using Blenders brick texture node. We will mainly be using the brick texture to add bump detail to our material as well as darkening the texture we use to create the wood grain.
First we’ll want to make sure we navigate to the shading workspace and then in the shader graph we can go to Add -> Search and search for the Brick texture node. Add that to the shader graph as well as a mixRGB node.
Connect the wood grain effect you plan to use for the first node of the mix node or you can set its color. Connect the brick texture to the second input of the mix node. Connect the mix node output to the Principled BSDF color input.
We can now use the Brick Texture factors to adjust the scale of our planks. The frequency and offset values can be used to adjust how uniform the planks are. Mortar size can be used to adjust the size of the gap between planks.
Creating a roughness textures
Another aspect of our wood material we may want to control is roughness. By adjusting the roughness values we can give our material more detail as well as making the wood more glossy or rough.
In the shading workspace go to Add -> Search and search for a colorramp node. Connect the wood texture to the colorramp input and connect the colorramp output to the Principled BSDF roughness input.
We can now use the ColorRamp to control the roughness values. I recommend first flipping the nodes around so that the darkest parts of the texture are the lightest making them the roughest and the lightest parts of the wood are the most smooth making them the darkness.
To fine tune the roughness of our wood material we can change the color value for each handle in the ColorRamp. Keep in mind that 0 is the least rough while 1 is the most rough. While this isn’t necessary it is helpful if we want to ensure no part of our wood is completely smooth or rough.
Creating a node group for the wood texture
As we begin to build a more complex node tree for our wood texture it may become a bit of a burden to handle. With a node group we can combine all of the nodes we’ve created into one node that we can adjust the values of instead.
To create the node group select all of the nodes used for creating the texture except for the Principled BSDF, texture coordinate, and Material Output.
I recommend excluding the Principled BSDF so that later on we can mix other textures with our wood texture if we’d like and leaving the texture coordinate out means we can switch which texture coordinate we use without have to open the node group again.
With our nodes selected we can go to Node -> Make Group. When the group is created the shader graph will transition to the nodes inside of that group which we can enter and exit by pressing the TAB key.
While inside of the Node Group we can bring up the properties tab by pressing the N key. We can then go to the group properties and adjust the settings for the input and output values as well as adding and removing inputs.
For this example I’ve added adjustable values for the Roughness, Bump, and Plank Scale. In the outputs I’ve set the roughness to be a value output to match the gray socket of the roughness input on the Principled BSDF.
You may notice that I added the ability to adjust the roughness of the texture, this was achieved by adding a math node set to multiply and multiplying the roughness texture with the value. The math node was clamped since roughness should only go from 0-1.
Final thoughts
Procedural textures can be a great way of creating highly customizable and detailed materials. Especially if we don’t have access to the equipment or the source to capture photos of the material we’d like.
While they may require a bit more setup then just connecting image textures they have quite a few advantages compared to image textures.
With Node Groups we can easily turn a complex node tree into a simple set of values that we can use to adjust our textures making them more versatile and reusable.
Источник