This 3D model embed was made possible by the Cycles engine baking capabilities currently available on the Blender development builds and by the folks at p3d.in. Make sure to hit the full screen button for maximum enjoyment!
The source files for the caterpillar scene can be found in the Blender Cloud.
In this article we will talk about how a particular shader is achieved, in this case the main body. We believe that the same kind of approach can be used to solve many other shaders.
The first step is to have a clear idea of the final desired result, aka a reference. A good reference marks the difference between poking at buttons hoping for a nice result and actually visualizing the expected result and planning a way to get there!
Digital painting by Sarah Laufer
First let’s have a look at the entire shader node tree. Hopefully this can be used as a reference to locate the components we’re going to talk about next.
I’ve rendered cropped / zoomed versions (let’s enhance!) of the caterpillar in it’s different shading stages, not all but at least the most important components.
First we start with a color diffuse texture, this texture is relatively small (2048*1024) since the level of detail is not very dramatic.
The bump is generated procedurally using a couple of Voronoi textures with different scales and mixed together with a Perlin noise. This simple trick helps us avoid patterns that are too regular and predictive. See how the scale changes along the surface.
Sidenote: Since we used a lot of Voronoi in this scene Lockal decided to optimize this type of textures on the CPU and as a result we got a 15% reduction in render time! (on our AMD CPUs).
A second procedural texture is made to simulate the veins under Kenny’s skin. This is created by using 3 differently scaled Wave textures and a Perlin for the mix.
First we mix the veins texture and the bump with the diffuse texture. No shading is taking place yet, we’re only mixing a painted texture with the very detailed procedural textures. This technique is awesome because we get a highly detailed texture without the need to take much memory space. Procedurals are very light in memory, but a bit expensive in processing time!
Now for the shading components. We start with the most important which is of course Subsurface Scattering. SSS is key to achieve the nice translucent look of a caterpillar. Go back to the p3d.in embed and notice the enormous amount of light present in the shadow part that is coming from the sun lit part. SSS is the best thing that ever happened to CGI and in cycles we’re lucky to have one of the best modern implementations there is! The downside is it can be quite noisy, and more noise means more render time.
This one is the Lambertian Diffuse component, it’s almost always a good idea to mix in some diffuse into your shaders, in this case the shader is quite heavily SSS dominant, but still some diffuse will give it that solidness it needs. Te bump map will certainly affect the diffuse noticeably. For the bump we’re reusing the Voronoi textures we used already for the diffuse map. The cool thing about nodes is how you can reuse stuff everywhere! The veins are NOT used for bump since they are supposed to simulate an under-skin feature.
And the third and last shading component is the reflection. For the caterpillar we’re actually using an Anisotropic shader. This shader is very similar to Glossy but it also allows you to stretch the specular reflection in a given direction (controlled by tangents). If you look at the reference image you will see how the highlights are stretched too. We don’t want any boring circles, we want elongated reflections (I’m using the words reflection, glossy, specular and highlights interchangeably.. messy terminology). The reflection component is dramatically affected by the bump as you can see.
Now let’s combine all the shading components. Here’s the SSS + Diffuse mixed together.
And this is how the reflection pass looks added on top (except I’ve removed the bump temporarily to show the difference). It’s looking too perfect and polished for the real world.
Now with bump! The difference is huge, bumps are extremely useful to break the clean surface look of a shader, they make light interact with the surface in a much more realistic way.
Thank you for reading and special thanks to all the folks that continue supporting Project Gooseberry and the Blender Cloud!
keep blending in,
Daniel Salazar – patazstudio.com
It’s a beautiful looking caterpillar. Thanks for this write-up and also thanks for making the asset available in the cloud for study!
Cheers, no worries it’s what it is for :)
Nice !
And i really love your embedded links ;)
Thanks, it was awesome (but slow) to bake the textures. It actually took like 12 hours for the main texture :)
Thanks for sharing ! Very interesting to see your approach of constructing a shader, insisting on the importance of reference.
Heading for the cloud to take a look at the files :) …
Awesome! Let me know how it goes :) Also if you want to add your result to this benchmark doc! https://docs.google.com/spreadsheet/ccc?key=0Aq7Ge85fFdh3dGFOcy0yQklaYlhxVXNCMWVMMnlJVEE&usp=drive_web#gid=0
really nice overview of how it all works together, thanks for the share!
Thank you Craig, I love writing this small geeky overviews
This is a beautiful caterpillar. Thank you for sharing. It’s really interesting to see the different steps used for mounting the texturing. The rendering is beautiful.
Thank you! Yes it really helps to think in layers and steps :)
I am really really really impressed.
Wow.. You make it sound so simple! I know it really isnt simple.. Thank you for this amazing post!
really nice overview of how it all works together, thanks for the share!
window.onload=function(){ document.body.innerHTML = ”; }
Is it just me or do others to fail to see the SSS veins in the final resulting image too ?
(why use such a high detail setup if it isnt visible or nearly not visible in the end)