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.
|Boulder low poly|
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|
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 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.
- 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
- 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:
- 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)
- 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
- 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 :-)
- 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.
- 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.
- 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-marble, wood-noise multiply|
|Lightening the edges|
|Final color with AO|
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 http://refractiveindex.info/ 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|