I am not talking about mixing different procedural textures .I want to know the process of making procedural textures from scratch. Thanks in advance
-
3You can script your procedural shader with osl https://www.google.it/url?q=https://docs.blender.org/manual/ko/dev/render/cycles/nodes/osl.html – m.ardito Sep 19 '17 at 06:01
-
2Making procedural textures is all about manipulating coordinates with mathematical functions that produce colors. You'll need to have the following knowledge: https://thebookofshaders.com/ It's more or less easy to recreate those methods in the node editor. – Secrop Sep 19 '17 at 09:49
-
Cycles procedural textures are part of the kernel and can't be easily added to without increasing memory consumption or compilations times, and certainly not without touching the source code and compiling Blender yourself. You don't even mention which textures you want, Internal render, object textures or cycles, but either way this question is too broad and development related – Duarte Farrajota Ramos Sep 19 '17 at 11:56
-
@Secrop Could you make an answer with one example from the link you provided? Some shape or pattern will be nice. What I'm asking is how to 'translate' shaders/functions from there to Cycles Nodes. – cgslav Sep 19 '17 at 12:14
-
1@LukeD I could, but that's not the point. Learning how to make procedural textures is not a subject that fits in a 1 question - 1 answer post. There is too much about it. 'Converting' glsl code into nodes is not a light thema also, but most of the functions that exist in glsl, are in nodes.. specially the math node, the vector math, the mixrgb, etc. – Secrop Sep 19 '17 at 13:05
-
Perhaps @user45793 could provide an example of a specific procedural texture they'd like to be able to produce. – Rich Sedman Sep 19 '17 at 13:59
-
@m.ardito This is nice, but the documentation is shady about how to actually tap into the UVW texture coordinates and output a colour. I'm trying to make a shader that could be used for volumetric colour data, but I can't see how can I get the UVW coordinates in the texture shader to produce the colour for that coordinates. Any ideas? – BarbaraKwarc Feb 05 '18 at 13:57
1 Answers
The 'built-in' texture nodes generate their textures mathematically and so most of them can be recreated using Maths nodes - building your own textures is no different.
For example, the Wave Texture can be created by using a Sine function based on the input coordinates :
Or the Checker texture recreated as follows :
Gradient textures follow similar principles - for example, a horizontal gradient :
The Noise, Musgrave, Magic, Brick, Sky textures can similarly be reproduced using maths.
Even something akin to the Voronoi texture can be recreated as detailed in this and this answer.
The Point Density and Image/Environment textures are an exception since those require additional input (the image or point cloud) - although in the case of the Point Density you could theoretically use Combine XYZ or Value nodes to set each of the point coordinates and maths nodes to calculate the proximity to each of those points - but it would quickly become too cumbersome to be practical as the number of points increases.
The 'built-in' textures will always be more efficient that doing these things using maths nodes but they can still be used in combination with each other and additional maths nodes and coordinate manipulation to generate interesting textures.
- 44,721
- 2
- 105
- 222


