Procedural journey in Blender

For quite a long time I have been looking for a way to create some stone wall texture procedurally. I’ve spent hours upon hours trying to get some decent result in Blender, using the node system in Cycles. Alas, all the results I was able to achieve so far were poor, unrealistic, unpleasing and mostly impracticable.

That was until today, when I had that kind of eureka moment where I thought of an alternate approach to the method I’ve used so far in that project. It’s a breakthrough in my endeavour to come up with a usable way to procedurally create some stone wall texture and most importantly : its displacement map.

Unless you paint it, it won’t match perfectly.

The difficulty with stone wall is that any edges, door, window or junction will inevitably produce difficult area for texture matching. Hence, the coherence of the structure is very much disturbed when stones don’t seem to fit properly on the corner of a wall or when it doesn’t match with the top or side surfaces. Of course you can always spend a lot of time, and I usually do, to try to unwrap the volume with the best match possible but it is mission impossible unless of course all the textures have been specifically made for that particular mesh. So unless the project you are working on has enough time and resources budgeted, most of the time, creating 100% custom textures all over the place just won’t be always possible.

Here comes the procedural magic.

The beauty of the procedural process is that it is consistent across all the model because it is volumetric (at least in the case of this example) and it is also extensible and none repetitive if you setup your procedure properly. No matter where you cut, punch or joint your mesh, the pattern will always be matching with very few problematic areas. There are of course some limitations but it is mostly fool proof and for the most part far superior to most unwrapping techniques, no matter how sophisticated, in my experience at least.

Did I say none repetitive? Yeah baby, that alone is a big seller. Endless variations with mostly endless boundaries. No more seams, simple as that. Moreover, if you setup a procedural texture that is well designed, you can typically use it in many scenario, hence a huge time saving bonus later on.

There is a big drawback though : it can be very processor intensive. So no real time here. At least not in its raw form. But you can always bake your procedural texture and then apply it for some real time application if need be.

Not quite there yet, but much closer than I have ever been.

Ok, I must admit that the results aren’t totally satisfying. The stones look a bit bloby and I am still unable to control the size of the groves between the stones. Yes there is still a lot of work to make this really helpful. However, I can set the average size of the stones on the three axis separately and in general as well as the amount of roughness detail and distortion.

What about the stone wall?

Well, here it is with the procedure applied as a bump map. It’s black and white because my goal was to produce a height map that I could then bake and use with a displacement modifier (since vertex displacement is still experimental).

Nodes

The mesh is a very simple one with very few vertices and just a diffuse white. What appears to be in volume is simply the procedure being feed through a bump node to the displacement of the shader output.

Now, this is the same mesh with tons of subdivision and the baked procedure map in a displacement modifier.

Wall1

The same mesh in the live viewport preview with a simple material : a couple of colour map mixed with the cavity map factor. Nothing fancy, just to preview the effect of the displacement modifier.

Wall2

As you can see, there is no seams at the corner and most importably, the stones have a coherent continuation at the corners and on the top.

Wall3

Wall4

The stone are larger on the x and y axis than on the z axis. This produces a quite pleasing effect on the top of the structure where usually stones are larger to cover more space.

Wall5

The seam visible here is simply that of the colour map I slapped carelessly on the model, not of the stones themselves.

Hopefully, I will find some time to continue develop this and maybe make it better so one day, I won’t have to spend hours sculpting every freaking stones to produce a decent normal map or height map.

Cheers.

Leave a Reply

Your email address will not be published.

Do the math * Time limit is exhausted. Please reload the CAPTCHA.