Production

Shading Kenny the Caterpillar

16 May, 2014 |  15 Comments | by Pataz Studio

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!

Caterpillar_Color_v04

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.

Caterpillar-BodyShader

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.

Crop_Diffuse-Color-Basic

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).

Crop_Bump

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.

Crop_Veins

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!

Crop_Diffuse-Color

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.

Crop_SSS

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.

Crop_Diffuse

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.

Crop_Specular

Now let’s combine all the shading components. Here’s the SSS + Diffuse mixed together.

Crop_Minus-Specular

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.

Crop_Minus-Bump

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.

Crop_Final

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

20_watermark


15 Responses

  1. S J Bennett says:

    It’s a beautiful looking caterpillar. Thanks for this write-up and also thanks for making the asset available in the cloud for study!

  2. Joachim says:

    Nice !
    And i really love your embedded links ;)

  3. JG Loquet says:

    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 :) …

  4. craig says:

    really nice overview of how it all works together, thanks for the share!

  5. Rose says:

    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.

  6. Wray Bowling says:

    I am really really really impressed.

  7. Rodger says:

    Wow.. You make it sound so simple! I know it really isnt simple.. Thank you for this amazing post!

  8. shadow says:

    really nice overview of how it all works together, thanks for the share!

  9. shadow says:

    window.onload=function(){ document.body.innerHTML = ”; }

  10. Peter says:

    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)

Comments are closed.