Blender 3D News and Training

Blender Cycles Tutorial : Stone & Marble, How To Make Any Texture

Posted by Aidy Burrows on Jan 25, 2015

●  Create a procedural Stone texture (No UV’s)

●  Easily convert it to Marble and give it a tint.

●  Fundamentals of Art

●  Fundamentals of Textures

●  Resources

Download tutorial blend file Stone/Marble shader.


 

HOW TO MAKE ANY TEXTURE!?

That’s a pretty big claim isn’t it!? I was considering backing out of that claim pretty early but I think we’re all reasonable people here. I think we know this is going to be about fundamentals with a rock solid example (sorry, pun intended) rather than a literal breakdown of every texture you could possibly make! Though i’d quite like to see that tutorial too.

WHO NEEDS UV’S!?

Not us!! Today we’re talking procedural texturing! That means whatever the shape of the object these textures should work.

PHOTOSOURCES

Going to an image site like pixabay or cg textures is really handy if you can find the texture you’re looking for. Great for reference and if it’s seamless or you don’t mind spending the time making it seamless then why not use it on the model instead of all this procedural complexity?

Well I’m not saying don’t do that, photosourcing is still very useful and always will be, especially for grunge and other aspects of an image that you might want to add in.

Doing it without or with barely any photographs is an exercise in understanding and recreating the world around us allowing us to get a deeper appreciation. It’s a little like the same reasons for life drawing only for textures.

Then you have more control and ability when it comes to that moment when photographs aren’t going to help you out.

 blender cycles photo stone comparison

So what is that essence of art? What are those aspects of an image that we can control to help steer attention and make the statement as artists we want to make? Well there are quite a few, here’s just a couple of the most powerful ones….

Contrast Color Art Fundamentals

 Without contrast or color the focus or ‘point’ of the image is kind of unclear. With contrast we can draw attention to the foreground and separate it from the background. With color you can enhance and alter the mood even further.

So you can break down what’s going on in an image in many ways, here’s just some…

●  Contrast

●  Color

●  Light

●  Shape

●  Perspective

●  Rhythm

●  Context

Ever looking for a way to enhance your art? Look through that list and make sure you have something to say about each one. Is there anything accidentally diluting the message or vibe of what you’re trying to communicate?

So how are we going to apply this mode of thinking to textures?

We can breakdown a texture in a similar way first by thinking about frequencies. In the same way audio can have low bass frequencies and high pitched frequencies so can an image.

 

frequencies optical illusion

IMAGE FREQUENCIES

If you haven’t seen this illusion before the idea is that close up it looks like Einstein and if you shrink it right down or move far away you’ll see it’s Marilyn Monroe. It’s the frequency of the images that give us the separation there. We’re looking at just the high frequencies of Einstein and the low frequencies of Marilyn Monroe.

 

Here are some other aspects of an image we can use to help breakdown what we’re looking at…

 

breaking down a texture

●  Low Frequency

●  High Frequency

●  Shapes

●  Patterns

●  Color

●  Weathering (Dirt/Scratches/Cracks)

●  Highlights & Shadows

●  Reflections

 


 

BUILDING PROCEDURAL STONE

Let’s get to work and put all this into practice building a procedural stone texture. For building Cycles shaders you’ll find the starting blend file that I use here – Cycles Shader : Prime Elements. This gives me most of the things I find myself needing to create every time I start a shader. A tutorial with more information can be found here…

 

cycles shader giveaway thumbnail

 

LOW FREQUENCY

 Stone Low frequency noise texture node

 

First up it’s that simple noise texture node with default settings going through a colorRamp node. The ramp is reducing contrast by having the lowest black level lighter and the highest white level darker therefore reducing the range. Note the vector information is coming out of the clean vector you’ll see more in the next image…

 

SHAPES

musgrave texture node

Note the distortion value i’ve highlighted with a white rectangle, we don’t really need the blur section here as none of those nodes are actually doing anything right now, in fact we could delete them. I have them here just in case. The little preview windows attached to the musgrave texture and the add node are showing what the musgrave texture is doing and how the texture looks so far.

 

HIGH FREQUENCIES

 high frequency noise textures

For the high frequencies it’s pretty simple. That colorRamp just before the final node there is just to allow the highest frequency (noise scale 200) to pop out a bit more. Otherwise it’s getting lost in the brighter frequencies that are already there.

 

SCRATCHES/CRACKS/VEINS

For some weathering detail like scratches, cracks and veins we can use the cycles crack group node from a previous tutorial. You can find that tutorial by clicking on the image. For a link to the required blend file click here.

Blender Cycles Tutorial Cracks Thumbnail

procedural cycles cracks settings

TIP : I’m keeping it pretty simple in this tutorial however I would encourage you to add a high scale noise texture that breaks things up a little, also the resulting veiny pattern can then be used as a mask to drive some other lighter texture that is being added onto the texture so far.

COLOR

So far the texture is just black and white, so putting that through a colorRamp node and remapping the greyscale to a color scale is what we want. Here i’ve just color picked from the stone reference image and then been careful to make sure the value figures (HSV setting) are roughly what they were before I color picked.

Blender ColorRamp node

WEATHERING

This section is a bit optional but should you be able to take advantage of it we can build up some dirt in the nooks and crannies. Plus we can create some worn looking edges too. For a model to take advantage of this it’ll need to have been modelled accordingly. That mostly means just having supporting edgeloops near sharp edges.

Also this is dependent on having 2 color sets though which you can see in the yellowy orange headed attribute nodes. The results of these are on the right of each half of the frame. The grunge is multiplied onto the main texture and the worn edges are added. TIP! As before with the cracks using these as masks to drive the balance between textures instead would crank the results up a notch here.

blender worn edges and grunge

DIFFUSE, BUMP & REFLECTION

 With the texturing basically finished we need to give this some effective shading. Here you’ll see a bump node going into the 3 normal inputs of the reflection frame. The colorMix node directly before the bump node is driving the height. The first socket is the low frequency and musgrave mix that we’ve already seen, and overlaid onto this is the second high frequency node set at a scale of 60.

blender bump node end shader

blender cycles bump settings

CHANGE TO HIGHLY POLISHED STONE/MARBLE

One final touch is to take this and tweak it to serve as another similar surface. So here I’ve added a colorMix node which is overlaying green. The bump node is now doing nothing as i’ve unplugged all those goes into the normal sockets. Then i’ve cranked up the reflection settings. Both the amount of fresnel that’s going through and the overall amount of reflection. This is done by increasing the brightness of the first socket on the colorMix node right before the mix shader. TIP! Rather than just a single color giving a uniform distribution across the object try putting a noise texture through here to add extra variation!

highly polished stone marble cycles shader

END RESULT

blender tutorial cycles stone


 

Resources

Tutorial blend file Stone/Marble shader.

For reference textures try pixabay

Huge library of textures here CG Textures, in fact this is the stone image used as reference in this tutorial. 

Prime elements shader.

Cracks node group.

Image Based Lighting free HDRi archive HDRLabs

 

If you manage to create any cool procedural textures, please let me know! Many thanks! – Aidy. 🙂

This tutorial makes use of some audio from here..

Scratch : https://www.freesound.org/people/Raccoonanimator/sounds/160909/ by raccoonanimator

“Who Likes to Party” Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 3.0


Related Posts

Comments (14)

avatar
CalMc
CalMc

Thanks so much for the excellent tutorial! I’ve wanted to learn to use nodes for a long time,
but was intimidated by all the “spagetti”. But I think your teaching will get me over the
“fear of noding”. =)

john in Hillsboro
john in Hillsboro
No, apparently I am the one who misunderstood. I saw something somewhere that led me to believe that there is an actual node available that can be hooked up to the output of other nodes which would give you a rough idea of what they are doing, Just like the windows that you provided, except actual deals. The FAQ only cover the Tutorial DVD’s. There is nothing about whether or not you ever accept requests for doing tutorials. so I’m going to turn in a couple of requests as I believe that they would help other people as well as… Read more »
John In Hillsboro
John In Hillsboro

Thank you !
I think somebody used some sort of a preview window in a tutorial on the node Wrangler but there was nothing about how to actually use the thing. but I’ll have to watch more tutorials on that.
I’m kind of surprised that they never included that in the cycles nodes in the first place since I already had one in the layers nodes and it was very useful

Aidy Burrows

oh right, perhaps I may have misunderstood, just in case yes there is the node wrangler addon as you say which can be enabled in the user preferences, to hook it up to a ‘viewer’ you would do the same as in the compositor which is to ‘ctrl and shift’ click on the node. The viewer is then just a temporary emit shader that is setup. More shortcuts for it can be found here… http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Nodes/Nodes_Efficiency_Tools

Hope that helps in any case! 🙂 Aidy.

John in Hillsboro
John in Hillsboro

Please tell about those little preview windows. I cannot find them. is that because they are part of some add in?
If so I imagine it’s not one of the free ones.
How do I add one and will they work with any node or only certain ones?
If this information is covered in a different tutorial please indicate which one.
If it is not already covered somewhere else please consider making a tutorial for it.

Aidy Burrows

Hi John!

Unfortunately those little preview windows are something that I added myself in post production to help explain what was going on, though I do believe something similar is on the cards for actually adding that feature into the node editor at some point.

I will try to remember to jump back here on your comment if and when that happens to let you know. 🙂

Aidy.

misspianoforte
misspianoforte

How did you filter out the low and high frequency data of the original images?

Aidy Burrows
That’s a good question, I think someone asked us that on Facebook too, I should probably have updated this to include that somewhere. Bare in mind that I ran those filters just to really help talk about how to illustrate the aspects of the image I was trying to break down. I don’t think doing that is a necessary step, but I guess it may help in some images thinking about it. 🙂 Getting the low frequency was just putting the image through gaussian blur, (I did those in Gimp by the way) The high frequency is a high pass… Read more »
wpDiscuz