alCurvature shader

warhammer-curvature-400 (1).jpg

The alCurvature shader measures the local curvature of the surface. This shader is an easy way to add detail and realism to your shaders. In this short tutorial we will use the alCurvature shader to mimic a shading painting technique effect on a model of a lead figurine.

Layer alSurface Shaders

An alLayer shader is used to layer two different alSurface shaders. We will use one alSurface shader for the black paint layer and another alSurface shader to represent the exposed metallic surface underneath.

  • Create an alLayer shader and assign it to the object.
  • Create an alSurface shader and rename it Black Paint. Connect it to Layer 1 of the Layer shader.
  • Create another alSurface shader and rename it Metal. Connect it to Layer 2 of the Layer shader.

alCurvature Shader

  • Connect the alCurvature (Outcolor R) to the Mix attribute of the alLayer shader. This will control the blending between the two alSurface shaders.
  • You can use the Radius attribute to pick out finer details in the figurine model. The default value of 1 is too large for our model. Reduce it to around 0.01. The images below show the effect this has on the alCurvature shading.



Final shader network



Inside is a work of art. Pure poetry. Just a perfect 10 out of 10 game. So good, I just had to make this blog post to share how I feel about it. I have played it through five times now and every time I play it, I discover something new about it. Its a visually rich experience, with incredible lighting, sound and atmosphere. The puzzles are just the right difficulty level and the ending is wonderfully bizarre.
Just a warning, if you start playing this game, you will not be able to stop (and nor should you).


alCel Shader



Cel shading is a rendering technique used to simulate the lighting in cartoon animation. In this short tutorial we will use the alCel shader to apply a cel shaded look to the skin of an anime style character.

  • Start off by assigning an alCel shader to the skin surface of the model.
  • Create an alSurface shader and connect it to the Surface Shader attribute of the alCel shader. We don’t want to add any specularity to the toon shading so reduce the Specular value to 1.


  • Create a ramp texture and connect it to the Diffuse Ramp attribute of the alCel shader. Change the Interpolation to none. This will give a toon like shading effect. Create a colored gradation similar to the example below.


The final shader network should look like this:


alCel: Diffuse Strength

We can adjust the toon shading effect using the Diffuse Strength. This attribute acts as a multiplier on the diffuse component before being passed through the ramp.


alSurface Diffuse Color

A simple way to tint the skin is to apply some color to the Diffuse Color of the alSurface shader. This will give the model a quick and easy tan!

image2016-9-1 12-33-12.png
Color tint added to Diffuse Color of alSurface shader


That concludes this tutorial on how to create a toon shading effect using the alCel shader.

The MtoA shader used in this tutorial is available here.