Article #1 - Comparing procedural and painted texturing - Procedural

Comparing procedural and painted texturing

Article #1: Procedural

This article is part #1 of my 2 articles to compare procedural and painted texturing. Next in Part #2 I'll give my view on painted texturing, here we will have a look on procedural texturing the same asset. The intro of both articles is identical, but the conclusion of the series is included at the end of part #2.


I have been planning to write some articles honoring the 1st year I have spent in training until now to become a 3D artist. As subject of the first 2 essays I thought it would be appropriate to choose something which has given me the most thoughts in the past year. I have been fighting with a couple of things while getting to know different techniques for modeling, shading, lighting, rendering and post production, but from all these one of the few things currently, which seemed to me as a matter of preference instead of the actual progress of an artist on the learning path is the question: Should I use procedural or painted texturing on my model. I was searching a lot on this matter, but was not able to find any usable writings on the issue. I do not think, that reading mine will bring any revolution into the topic, but it will give a nice overview of the conceptual difference in the 2 approaches and maybe some hints on where to use which technique or how to combine these.

Boulder low poly

Demonstration base

For demonstration I will use a boulder on which I have been working on for the closing scene of my 1st year educati
on. Sounds serious ey? But that' another topic... So I have sculpted a plain rock in Zbrush, UV-d it, exported the low poly mesh, the high res displacement map and there I stand now thinking: "Mmmmmh, which method to use? Procedural or painted/photo texture?"

Boulder with displacement

Scene set-up

This is of course software dependent. I used maya and vray, but I will try to write it down somehow platform independently, wherever possible.

I did not put a huge effort in the environment, as the asset will come in to a more complex scene anyway, but it is worth to set-up some lighting and rendering settings to see a result, which doesn't produce completely the opposite, when you put the asset into a scene. A plain lighting and rendering setting would show an unrealistic, that's why I choose to set it up as follows...
Scene lighting
There is a plain background, basically a box, with an ambient lighting linked to an image (image based lighting) a warm light coming from the top (4500K) and 2 colder lights coming from the bottom sides (7500K). I found that this environment reflects a non homogenic lighting in strength and colour, which can be used as a pre-viewing basis for a complex scene.

Render setting
For rendering I kept in mind, that it has to give me a fast preview, to be able to stop it, if any error occurs (obvious for experimenting purposes, as this one), but be accurate enough to see details. This meant for me to set up a progressive sampler with a resolution lower than 1K, not limited by render time, min desired noise or max subdivision levels, as I will probably never finish a render during most of this experiment. One other thought. I realized some render passes to be very useful when it comes to troubleshooting, so I include separately view able lighting, diffuse, global illumination, reflection, specular and sample rate. I'm not sure if I'll come across anything in this article where this will be of importance, but I got used to set this up for almost every render, as it is extremely useful.

I did not use any specific camera settings, apart of setting my perspective view to a vray physical camera and setting up the basics, so I can see properly what I'm doing. This seems perfectly adequate for this usage. The final render (if any would be done) will be set up completely differently.

Camera setting
Some things which I did not take into account here:

  1. Global illumination: I'm not sure if I'll use it... maybe in the final render, but there it will be probably an irradiance map- brute force combination
  2. Post processing: Well, as this is just an experiment I will not make any specific settings, which may be useful for a later post processing of the render passes in Photoshop, Nuke or whatever.

With all this prepared, let's get to the real topic here :-)

Procedural rock texturing - diffuse

I have read separate opinions and tutorials about where to start, but my experience from my own projects is, that this highly depends on the type of asset we are dealing with. I found it more useful for an organic type of asset to start with the diffuse and reuse components of it for the other nodes later on. So exactly that's what I'll follow also here.

As for almost everything in our work/hobby/education (feel free to underline the appropriate word for 3D/CG in your life) it is true also for this asset, that it makes sense to look at some reference images to get a feeling for the real stuff... finally that is what we want to rebuild in many cases. I found that a rock texture consists of the following sub-components:
  1. Layering: We can see a layering of several softly diffused colours on each other repeating in a random sequence. They are usually of a similar saturation and brightness but different hue (if talking in a HSV color space)
  2. Small scale noise: A smaller (0.1-0.2% relative size in the view space), smooth deviation in colour can be seen usually coming from dust, dirt and local environmental effects. This can actually reflect in all 3 parameters of the HSV color space, because there might be also other physical material included, so that can be more challenging
  3. Grain: Not surprising, as sand is grained stone, the stone texture has a sand like grain all over it, producing a noisy, rather rough finish. That map is basically above the previously mentioned 2 layers as multiplier (as it seems). We will see, how to get this done :-)
  4. Large scale noise: There is also a larger scale (5-10% in the camera view) difference in color coming from again different encounter our stone has seen in his life. This effects the saturation and/or brightness slightly, but not the hue.
  5. Brighter edges: Overlaying on the existing texture, there is a brightening towards the edges, which comes from weathering. This can be more challenging from a procedural point of view, because we only have the displacement map.
  6. Darker cavities:Again overlaying on the others, there is dirt and stuff stuck in regions of the rock, where it is hidden from the previously mentioned weathering. This is simulated in a nice way by a dirt texture (if vray), but surely can be found with other names in other shading engines.
Examined all this let's try to simulate it virtually...

Rock node
Marble node
Rock-marble difference
I started from inside out. There might be arguments about the right approach, but I think this is subjective preference of the creator. My imagination works better in trying to think on a layer basis. On the most inner layer I have imagined the most well defined structures, with more crisp borders, as the outer layers will smooth that up anyway. For that I used a marble and a rock node, which create that rocky semi-random layering. I blended those 2 together with a difference node, which creates a lighter result for later multiplying. To be honest I was experimenting here some, to find out if it is worth to blend using a 3rd texture, like a wood (basically another layered pattern) or a leather (cell based pattern) texture, but comparing the end result, these did not provide a significant improvement, therefore I stayed with difference.

Wood node
Noise node

Rock-marble, wood-noise multiply
Wood-noise difference
After creating this basis, I create the next blend with the marble-rock mix multiplying it with a noise-wood mix. This is to simulate those slightly varying bright/dark areas throughout the boulder, which come from different mixing materials and environmental effects, which in most cases also seem layered somehow. I use a noise which has its highest peak and lowest valley approx. 5-10% away in the relation of the whole distance of the surface in the view port. I'm differentiating this with a wood texture, where I choose the colors close to 50% grey, but it still gives another layer like impression. Furthermore I have set the grain color in the wood to black, which means, it gives a distinguished graininess to the whole colour. In my opinion it is important, that these layers create also the color base for the whole asset. The colors can be quite saturated if needed, as the following layers will blur them away. In my case the  noise texture was the main colour contributor. However some experimenting has to be done also here to get the right choice as difference and multiply in respect of colour are difficult to predict (you need to have quite some experience to do that, which I did not have at this point :-))  I usually use a color pattern creator like or to create well matching color schemes. With this finished the base color is ready. This doesn't mean we a anywhere close to be ready with the whole shader, but a big step is done.

Lightening the edges
Final color with AO
Now the task is to include some geometry based variance to the material. The reason for this is point 5 and 6 above, which mean, that the color of such assets is not simply a homogenic random difference and multiply on the whole surface. Instead there are local changes depending on the environmental effects, which have influenced the asset. These might be subtle details, but believe me, they make a big difference. To simulate this I first create a utility node, which provides me with a sort of multiply map, where the edges are brighter and the flat areas are darker. In vray this would be a curvature node, but surely there are similar in all engines around. After that I use an AO node (Dirt in vray) with the result, which provides me with darker tints in cavities
and concave areas. Now with these the final color can be considered as finished. It might be necessary to review these on the further way, because reflections and further layering of materials can influence the base colour as well.

Procedural rock texturing - bump

Final colour with bump and displacement
The bump, as probably everybody knows, who has at least 1 week experience in 3D, is one of the most important detail, which make an asset look more realistic. I thought in this case, that only linking one of the blended textures in the bump slot of the material node is fine, but does not add a realistic feel to it. Therefore I added another curvature node (as explained in the previous section) to the bump depth to have a variance of bump strength based on the geometry. This creates the impression, that the edges of the asset are worn, but the more covered or protected areas have more of that edgy look. Actually for the bump base many of the textures used above could fit, depending on the aim which has to be achieved. It could be more layered or just the noisy bumpy part of it, that's up to the creator. Finally making a first test with the above created structure together with the displacement map it looks already quite good.

Procedural rock texturing - reflection

Curvature map with different parameters
Final node network
Regarding the reflection there are quite a few tutorials out there so I would not like to go in deeply, just giving a quick wrap-up. The point is, that all materials in the real world have a varying reflection behavior depending on the material and the angle of incidence of the light. Almost all have less reflection if viewing faces from the front, but more and more if the faces are angled to the view direction. This is explained by the Fresnel equations. To simulate that I searched for some rock like materials like potassium and silicates at and copied their reflectance curves into the reflection amount slot (this is done via a sampler node getting the angle information and remapping it as reflection strength). For the reflection colour I used the earlier mentioned curvature node. This gives a higher reflection in the curved areas and less in the plains. The combination of the above 2 methods creates a very realistic impression. To increase the reality (depending on the final purpose of the asset, e.g.: a hero model) it is possible to layer another few reflective coat materials on top with increasing glossiness, which creates a nice specular fall-off, like at real life materials. Again I want to stress here that this is not the main topic of the article, therefore I will not go in more deeply into the topic, especially that there are many tutorials about this. For more details on this you are also welcome to contact me. So with this finished the procedural texture for the boulder is done. Due to the reflection details it might take some render time to get a high-res image out of it.

So with this finished let's do the same thing with painted textures in the next article and see a comparison of the 2 methods...

Final fully procedural rock



Népszerű bejegyzések ezen a blogon

The Flower - Leaf

Making of the Ent - Painting

The Flower - Stem