XSI Tutorial
Hatch Rendering
by Dave Lajoie
davelaj@videotron.ca
davelaj@softimage.com

Hatch_Result.bmp (371022 bytes)



click here for Image of the render tree
The concept if fairly simple. I use the rgb intensity of a lambert illumination node to drive texture line thickness, in order to give out hatching effect.
I inverted the lambert output node to get proper shading ( thick white line in diffuse part / thick black line in the ambient )
You can remove the invert node of the illumination node, but you will have to swap the color1<>color2 in grid node.

For the texture projections, it is important to keep a certain size ratio, so we keep the line density relatively the same over all the object.
For surfaces, I used one UV projection and meshes, I used one Planar projection.
In order to speed up the shader assignation, I have create a rendering pass, and assign the rendertree on the branch material assigned on the background object partition.
 
Texture_Projection:
    This will extract the UVW from the selected projection
    I didn't used repeats since the noise in the lines would be repeated as well
    so I used "Max UV Remap" and set it around 30~60
 
3D_Warp:
    I used to add noise to line position and thickness.
    you will get a better result if you tune the scale and noise at the same value
 
2D_Grids nodes:
    This node is used to sketch the lines. I set the either U of V width to 0, so I can get a U or V oriented line.
    Constrast is set to 0
    Color 1: Black
    Color 2: White
 
 Mixer node:
 	Blends the two lines to create the hatch.
	To control the line thickness result, you can change the illumination diffuse and ambient, and light intensity.
 
Don't forget to add a simple_shadow node on material, this way, shadows will be also hatched as well.
Note: This simple_shadow node is only available in V1.5
Also here another variation of the concept. In this case I have rotated the uv texture projection
to make the hatch swirl. 


click here.
Enjoy!
Dave.