Kushiro Hatch Lines Shader (blender shader)
* New Version 4.1.0 is released !*
This is a Hatching Lines shader for Blender Eevee and Cycles.
It is created by nodes, 100% procedural and real time. It is designed for rendering toon style comic / manga / anime in blender.
It has some requirement for GPU. If your computer (for example, Macbook) does not have a GPU supported by blender, you may try to use Cycles.
This shader is structured by meaningful node groups, it is easy to understand and modify.
You can tweak the inner nodes for your own needs.
You will got the blender file. It has a material called 'KushiroHatchLineMaterial'.
The shader has two input.
The color input should come from blender's Shader to RGB node, or "Kushiro Fake Lighting" Node.
The difference is that, if you use Fake lighting, then it use a fixed vector for lighting direction, it is fake. It works well for both Eevee and Cycles.
If you want to use Light Source in your scene, then you need to use Shader to RGB node. However, this node only support Eevee.
Another is just your UV coordinate Vector. You can use Camera or Object coord instead if your want. You need to adjust the "scale" of the shader input.
You can see the default setup from the download blender file.
In order to use this shader from another blender file, you can use the blender's "Append" function. It can append anything from another blender file, such as object and material.
Cross Hatch Offset : the offset position of 2 type of lines. You can use negative value to suppress one of them, it will make some of lines without crossing in mid-tone.
Scale : this is very important parameter. Since each object has different size, the scale of lines must be configured.
Stops : This parameter control the number of "shade" across all lighting, from black to white. Default it is 3, that means only 3 lighting levels in the shading. Each lighting level will have different line density.
Density Increase : if you increase this parameter, the lines density will be increased more in each lighting level. If you want darker in dark area, you can increase this a little bit.
Line Num : number of lines.
Line Weight : thickness of lines
Line Length Scale : Using low value will result in longer lines. Using higher values will cause the lines shorter and broken.
Line Rotation : control randomness of rotation. If this value is 0, then the angle of all crossing lines will be 90 degree.
- Further simplify the design, better structure
- Fixed the rotation glitches. Now you can ensure that cross lines are 90 degree without ugly artifact.
- Redesigned the shader from the base of "Simple version".
- Optimize for render speed and low GPU cost
- Dropped support for free-hand hatching (too few use-case)
- Support color stops. Now the density of cross hatching is based on amount of light
- Support fake lighting source. Therefore this shader can be used by Cycles now.
- Fixed design bug
- Separated parameters for Cross Lines and Hand Lines for LineNum and LineScale.
Now you can set them separately to create better cross lines mid-tone, useful for some comic style.
Huge update, redesigned the Shader:
- Simplified the structure and optimized the shade offset
- Now you can accurately turn the hatching lines offset, including the position of mid-tone, low-tone and over-light area.
- Mid-tone now work correctly
- Added number of parameters, such as LineNum, LineScale, LineRotation.
- Overall improvements of node tree
You are allowed to:
- Use it in your own blender project, for personal or commercial.
- Include this shader in your project, for personal or commercial.
- Modify the shader for your project.
You are not allowed to:
- Resell this shader, or modified version of this shader.
- Claim that you are the author of this shader.
- Publish this shader to public for free.
Thank you for your support.
You will get the blender file, containing the shader material.