Entradas

Mostrando entradas de abril, 2013

Fabric Material for Upholstery

Imagen
Hi. Today I'm going to show you a fabric for upholstery material: This is the main node setup. It is divided into two blocks: bumping and fabric material. The fabric bumping consists of a subtraction of two colors from wave texture nodes ( bands option). I have added a power node and a color ramp node to make the color transition of the pattern sharper. The synthetic fabric consists of a material with fresnel and facing reflections. The diffuse node uses Oren-Nayard algotithm (its roughness is higher than 0.0), and the glossy nodes also have a high roughness.  The setup is as follows: Here theres is a simple test. Hires version here (model by Klaus Gollwitzer, @iamklaus): Bye

Dark Metal Material

Imagen
Hi everybody. Today an easy but interesting material. Dark metal, useful for kevlar helmets or certain parts of robots. The node I have used is the same mango node of other posts . This is its setup: Bye

Blender Cycles OSL: Voronoi Tiles Material

Imagen
Hi everybody. This code is ported to OSL from a GLSL version . The material looks like this: The OSL code is as follows: #include <stdosl.h> #define TILE_MAX_HEIGHT 0.12 #define TILE_MIN_HEIGHT 0.05 // GLSL function float fract(float x) { return (x - floor(x)); } // GLSL function vector fract(vector v) { return vector(v[0] - floor(v[0]),v[1] - floor(v[1]),v[2] - floor(v[2])); } float rand(vector co){ return fract(sin(dot(co ,vector(12.9898,78.233,0.0))) * 43758.5453); } vector random2f( vector seed ) { float rnd1 = mod(rand(seed), 1.0); float rnd2 = mod(rnd1*2.0,1.0); return vector(rnd1, rnd2, 0.0); } float hash(float n) { return fract(pow(sin(n), 1.1)*1e6); } float noise(vector x) { vector p = vector(x[0],x[1],x[1]); vector d = vector(1.0,30.0,30.0*30.0); vector f = fract(p), p0 = floor(p)*d, p1 = p0 + d; f[0] = f[0] * f[0] * (3.0 - 2.0 * f[0]); f[1] = f[1] * f[1] * (3.0 - 2.0 * f[1]); float t = mix(mix(m...

Marble / Stone Material

Imagen
Hi everybody. Today I'm going to show you a marble / stone material. I have used two wave textures and a color ramp node to generate de base color of this material. After that I have added a translucent shader to get some light absortion, and the normal fresnel-glossy mix to get reflections: The colors of the ramp are: #523025, #8C5947, #BC8F79, #A9765F, #BC8F79, #8C5947, #BC8F79, #8C5947, #C2AEA7 and #C29B89. The marble patterns are mixing using screen option, which produces a clearer image, and are like these: One is more scaled to produce little details inside the main wave texture. If you want to get a fast version of this material you can remove the translucent shader node. This node makes the render slower. You will get this material: Here there are other renders: I hope you like it. EDIT: Now you can download these materials in blendswap . Bye

Ancient Gold Material

Imagen
Hi everybody. Today I'm going to show you an ancient gold material. This is a variation of the material shown in this article . I have mixed two main colors with a facing layer weight node, and included a third color to darken the objects backwards, in this case with a more pronounced effect. This is the final node group setup:   You can download this (called colombia ancient gold) and other node setups at blendswap . Bye

Sand Material

Imagen
Hi everybody. Today I'm going to show you a sand material: This material setup is very basic. The secret is in the bumping node. The base is a noise texture node, modified by a wave node to include grainy aspect in some parts of the sand. You get this plugging the wave node factor to the distortion socket of the noise node. After this, there is a color ramp node wich can modify the proportion between smooth and flat parts. You can see how the pattern is on the bottom-right corner. Here there is a view of the color ramp node variation: Bye

Blender Cycles OSL: Mandelbrot Fractal (Interior Colors)

Imagen
Hi. Today I'm going to show you an OSL code to get a Mandelbrot Fractal with its interior colorized, like this: You can see a HiRes version in this link . This is the code: #include <stdosl.h> shader node_fractal( float CenterX = 0.0, float CenterY = 0.0, point Vector = P, float Zoom = 1.0, int MaxIterations = 50, color Foreground = color(1.0), color Background = color(0.0), output float Fac = 0.0, output color Color = 0.0) { point p = Vector / (2* Zoom); float auxiliar = 0.0; p[0] += CenterX; p[1] += CenterY; point pa = p; point pb = point(0.0); int i = 0; for(i=1; i<MaxIterations; i++) { pb[0] = pa[0]*pa[0] - pa[1]*pa[1]; pb[1] = pa[0]*pa[1] + pa[1]*pa[0]; pa = pb + p; } auxiliar = sqrt((pa[0]*pa[0]) + (pa[1]*pa[1])); Fac = clamp(auxiliar,0.0,1.0); if (Fac == 0.0) Color = Background; else Color = mix(Foreground, Background, ...

Blender Cycles: Append / Link Material or Node Groups

Imagen
Adding materials or node groups from a blender file is easy. You only need to do the following steps: 1) Go to "File" menu and select "Link" or "Append". Link will use the material/group from the file you select; append will create a copy of the material/group in the opened file. 2) Browse and select the file from which you can get the material / group 3)  Then you will see some directories. You can get nodes from three of them: - Material: you will see all the materials including in the file. - NodeTree: it contains all node groups of the file. - World: you can link or append the world node setup from other file. Select the directory you want. 4)  If you select "Material" directory, browse and select the material you want append or link to your file.   If you select "NodeTree" directory, browse and select the node group you want append or link to your file. 5) If you have appended a material, go to the ob...

Aluminium Material

Imagen
Hi everybody. Today I'm going to make an aluminium material, with a little brushed on its surface. I have used a double glossy mix for this material. For base color I have used a facing gradient, through a color ramp node and a facing layer weight node:   The brushed pattern consists of a noise node which is stretched by a mapping node. This is colored by a color ramp node: The stops of the color ramp node are, in RGBA coordenates, #000000FF, #737373BC and #FFFFFF00. After the brushed pattern I have used a gamma node to make it more subtle. Bye

Tablecloth Fabric Material

Imagen
Hi. Today I'm going to show you a tablecloth fabric material: I have divided this material into three parts: 1) Color pattern 2) Bump pattern, for fabric 3) Fabric or cloth material First of all, I have done the color pattern using two wave textures, with "bands" option enabled. You get the tablecloth color with the color mix node (mix option) . I have also used a "MapRange" node, which I saw in some thread in BlenderArtist, to get sharp borders in this pattern.    Secondly, I have done a fabric bump pattern, again using two wave textures. This time I have mixed them with a subtract color node . See right side for an example image. I have flattened this bump pattern with a gamma node (value 3.0), which makes the color of the pattern darker and therefore more flat. Besides I have reduce the strength of the bump node to 0.5. Finally, I have used both pattern in a cloth material, similar to the one shown in Camouflage Material . I have use...

Blender Cycles: Gradient Textures

Imagen
Hi. Here is the node setup to use gradient textures in cycles (linear gradient): Same setup with radial gradient: Bye

Worn Leather Material

Imagen
Hi. Today I'm going to show you a worn leather material. This is a version of my previous black leather material . To make this, I needed two things: 1.- including noise in the color material. 2.- making wrinkles appear clearer in the material, like worn leather. So I have changed the leather group to include another ramp node for getting a clean leather pattern (second point), without any transitions. Using its constant mode you get this. Then I can change the color only for the wrinkles using this new socket (called pattern). I have added a kind of threshold (0.3 value in the image) which let me make the wrinkles thicker or narrower. The final node setup is as follows: The node setup for diffuse/glossy shader is the same as black leather. You can download this material and others with different colors at blendswap . Other renders:   Bye