---
title: "Stylized Hatch Control"
canonical: "https://rmanwiki-27.pixar.com/space/REN27/869007420/Stylized%20Hatch%20Control"
format: markdown
---
![PxrStylizedHatchControl.png](media://5942bea0-75ac-48d6-9251-5f4ef69e9f1a)


> ℹ️ *PxrStylized****HatchControl*** was introduced in RenderMan v27.2


***PxrStylizedHatchControl***: Stylized Artistic Hatching Pattern Shader

Procedural multi‑layer hatching for Stylized Looks. Supports screen‑space and triplanar projections, 8‑layer hatching textures, progressive buildup, color interpolation, signal‑driven hatch selection, and full AOV output for downstream Stylized Looks display filters.

  
Use it to create **hand‑drawn cross‑hatching**, **pen‑and‑ink shading**, **watercolor**, or **stylized tonal rendering** directly in the shading network while remaining compatible with PxrSurface, PxrLama, and RenderMan’s Stylized Display & Sample filters.


## **OVERVIEW HIGHLIGHTS**

- Procedural 8‑layer hatching system
- Screen, Triplanar, and Input‑Texture‑Coords projections
- Packed 4‑channel or single‑texture hatching workflows
- Facing‑ratio or input‑driven hatching signal
- Per‑layer frequency, jitter, and rotation
- Progressive buildup and optional clamping
- RGB, 8‑color interpolate, or 8‑color manual modes
- Darkest‑color override for deep shadows
- Full AOV output for Stylized Looks display filters
- Integrates with PxrSurface via utilityPattern or userColor


**PARAMETERS**  
Below are all parameters grouped by their UI pages.


**RESULT PAGE**

  
**Result**  
Specify what is output to resultRGB. Useful for debugging or soloing this node.  
Use when: previewing hatching, normals, triplanar blending, or input RGB.  
Range: mapper

- Hatching
- Light Rotation Angle
- Input RGB Pass‑through
- Hatching Signal
- Hatch Projected Map
- Triplanar Blend Colors
- UV
- st
- NPRnormals AOV
- Reflection

**Normal Map**  
Upstream normal map used for curvature, lighting rotation, and triplanar blending.  
Use when: providing a custom normal map for stylized shading.  
Range: color input

**Normal Object Space**  
Transform the normal map into object space before calculations.  
Use when: ensuring consistent hatching direction across animated or deforming objects.  
Range: switch on/off


**SIGNAL PAGE**

  
**Signal Mode**  
Choose the source of the hatching signal.  
Use when: selecting how tonal regions drive hatching density.  
Range: mapper

- Facing Ratio
- Input Connection

**Hatching Signal Input**  
Float input used when Signal Mode = Input Connection.  
Use when: driving hatching from AO, dirt maps, lighting control nodes, etc.  
Range: 0.0 – 1.0

**Signal Remap Min**  
Lower bound for remapping the signal.  
Use when: shifting the tonal range that drives hatching.  
Range: 0.0 – 1.0

**Signal Remap Max**  
Upper bound for remapping the signal.  
Use when: compressing or expanding the signal range.  
Range: 0.0 – 1.0

**Signal Input Gamma**  
Gamma applied to the signal after remapping.  
Use when: shaping contrast of the hatching response.  
Range: 0.0 – 2.0

**Artistic Hatching: Textures Page**  
This page controls how the shader reads, interprets, and procedurally builds the eight hatching layers. It includes texture selection, frequency, jitter, rotation, remapping, and progressive buildup.

**Textures Mode**  
Choose between packed 4‑channel hatching atlases or a single texture.  
Use when: selecting your hatching workflow.  
Range: mapper

- Packed — uses two RGBA 4‑pack textures (1–4 and 5–8).
- Single — uses one texture and procedurally builds 8 layers internally.

**Hatch Tex Single**  
Single texture used when Textures Mode = Single.  
Use when: generating 8 progressive hatching layers procedurally from one texture.  
Range: texture asset path

**Hatch Tex 1to4**  
RGBA texture containing hatching layers 1–4.  
Use when: supplying the first 4 hatching masks in packed mode.  
Range: texture asset path

**Hatch Tex 5to8**  
RGBA texture containing hatching layers 5–8.  
Use when: supplying the second 4 hatching masks in packed mode.  
Range: texture asset path

**Hatching Frequency**  
Base frequency for sampling the hatching textures.  
Use when: scaling hatch density globally.  
Range: 0.0 – 5.0

**Frequency Step**  
Multiplier applied per hatching layer (layers 2–8).  
Use when: increasing or decreasing frequency across layers.

- 1.0 → higher frequency each layer
- < 1.0 → lower frequency each layer  
Range: 0.5 – 2.0

**Frequency Step Jitter**  
Random jitter added to UVs per layer.  
Use when: breaking up moiré patterns or mechanical repetition.  
Range: 0.0 – 0.1  
(Visible only when Frequency Step ≠ 1.0)

**Hatch Tex Remap Min**  
Lower remap bound applied to each hatch texture.  
Use when: lifting the darkest values of lighter textures to avoid unwanted blacks.  
Range: 0.0 – 1.0

**Hatch Tex Remap Max**  
Upper remap bound applied to each hatch texture.  
Use when: compressing or expanding the tonal range of the hatching masks.  
Range: 0.0 – 1.0

**Progressive Texture**  
Enable progressive accumulation of hatching layers.  
Use when: simulating ink buildup or tonal layering across the 8 textures.  
Range: switch on/off

**Progressive Clamp**  
Clamp darker values of lighter textures (1–7).  
Use when: removing unwanted dark regions in watercolor or wash‑style textures.  
Range: switch on/off

**Invert Texture**  
Invert all hatching textures.  
Use when: switching between black‑on‑white and white‑on‑black hatching.  
Range: switch on/off

**Rotation Degrees**  
Base rotation applied to all hatching layers.  
Use when: globally rotating the hatch direction.  
Range: 0.0 – 360.0

**Rotation Step**  
Per‑layer rotation increment.  
Use when: creating multi‑directional cross‑hatching.

- 0.0 → all layers use Rotation Degrees
- 0.0 → each layer rotates progressively  
Range: 0.0 – 45.0

**Rotation Step Jitter**  
Random jitter added to per‑layer rotation.  
Use when: adding hand‑drawn irregularity to hatch direction.  
Range: 0.0 – 0.1  
(Visible only when Rotation Step ≠ 0.0)


### Artistic Hatching: Projection Page

This page controls how hatching textures are projected onto geometry. It includes screen‑space projection, triplanar projection, custom texture coordinates, and advanced P/N triplanar controls for deformation‑safe stylized hatching.


**Hatching Projection**  
Choose the projection method used to sample hatching textures.  
Use when: selecting how hatching adheres to geometry or screen space.  
Range: mapper

- Screen — screen‑space projection; painterly and stable for static shots.
- Triplanar — blends XY/YZ/XZ projections based on surface normal; ideal for animation.
- Input Texture Coords — uses custom upstream UVs from inputTextureCoords.

**Triplanar Blend Amount**  
Controls how smoothly the three triplanar projections blend.  
Use when: adjusting seam visibility in triplanar mode.  
Range: 0.0 – 1.0

- 1.0 → smooth blend
- 0.0 → hard cutoff between planes  
(Visible only when Projection = Triplanar)

**Triplanar Projection P Page**  
These parameters control which coordinate system is used for triplanar projection and how P is scaled or overridden.

**P Triplanar**  
Selects the coordinate space used for triplanar projection.  
Use when: choosing how hatching sticks to geometry, especially during deformation.  
Range: mapper

- P World (0) — world‑space P
- P Object (1) — object‑space P (default)
- __Pref (2) — uses deformation‑safe rest position if available
- Input P Triplanar (3) — uses upstream PxrManifold3D or custom P
- Size Space Scale (4) — scales P based on a coordinate system’s determinant

**Size Space**  
Coordinate system used when P Triplanar = Size Space Scale.  
Use when: ensuring consistent hatching scale across differently sized objects.  
Range: popup

- world
- object  
(or any typed coordinate system name)

**Input P Triplanar**  
Custom P input used when P Triplanar = Input P Triplanar.  
Use when: providing deformation‑safe or custom projection coordinates.  
Range: color (RGB interpreted as XYZ)

**Triplanar Scale X / Y / Z**  
Scales P before triplanar projection.  
Use when: adjusting frequency independently per axis.  
Range: 0.0 – 100.0


**AOV Data DisplayFilter — N Triplanar Page**  
These parameters control which normal is used for triplanar blending.

**N Triplanar**  
Choose the normal source for triplanar blending.  
Use when: selecting deformation‑safe normals or custom normals.  
Range: mapper

- N (0) — default shading normal
- __Nref (1) — deformation‑safe rest normal if available
- Input N Triplanar (2) — upstream custom normal

**Input N Triplanar**  
Custom normal used when N Triplanar = Input N Triplanar.  
Use when: providing custom normals for stylized blending or deformation‑safe shading.  
Range: color (RGB interpreted as XYZ)

**Input Texture Coordinates**  
Custom UVs used when Projection = Input Texture Coords.  
Use when: projecting hatching using custom UVs, camera projections, or procedural coordinates.  
Range: color (R = U, G = V)

**Facing Ratio Scaling**  
Frequency Scaling  
Controls how hatching frequency is scaled based on various signals.  
Use when: modulating hatching density using facing ratio or UVs.  
Range: mapper

- Facing Ratio (0)
- U (1)
- V (2)
- s (3)
- t (4)


**Artistic Hatching: Color Page**  
This page controls how the eight hatching layers are colored and composited. You can use a single color, interpolate between light and dark colors, or manually assign all eight hatch colors. Background color and darkest‑color overrides allow for fine control over tonal depth.

Hatch Color Mode  
Select how hatching colors are generated.  
Use when: choosing between single‑color hatching, interpolated palettes, or full manual control.  
Range: mapper

- RGB — all hatching uses a single color.
- 8‑Color Interpolate — interpolates between Light and Dark colors.
- 8‑Color Manual — manually specify all 8 hatch colors.

Hatch Color  
Used when Hatch Color Mode = RGB.  
Use when: applying a single uniform color to all hatching layers.  
Range: color

Hatch Color Light  
Used when Hatch Color Mode = 8‑Color Interpolate.  
Use when: defining the lightest hatch color (texture 1).  
Range: color

Hatch Color Dark  
Used when Hatch Color Mode = 8‑Color Interpolate.  
Use when: defining the darkest hatch color (texture 8).  
Range: color

8‑Color Manual Mode  
These eight parameters define the exact color for each hatching layer when Hatch Color Mode = 8‑Color Manual.  
Each color is composited over the Hatch BG Color based on the hatch mask.

**Hatch Color 1 - 8**  
Color for hatching texture 1 (lightest) - 8 (darkest).  
Use when: manually defining the lightest hatch tone.  
Range: color

**Darkest Tex Color Switch**  
Enable blending a solid color into the darkest regions of the signal.  
Use when: adding a custom ink/charcoal color to the deepest shadows.  
Range: switch on/off

**Darkest Tex Color**  
Solid color blended into the darkest signal regions when the switch is enabled.  
Use when: overriding the darkest hatch tone with a specific color.  
Range: color

**Hatch BG Color**  
Background color behind all hatching layers.  
Use when: setting the paper/canvas color or compositing base.  
Range: color


### AOV DATA DISPLAYFILTER PAGE

  
**Albedo Color (Input_RGB)**  
Base color passed through to resultRGB and written to the NPRalbedo AOV.  
Use when: providing the base albedo for stylized shading or PxrSurface diffuse color.  
Range: color

**NPRalbedo 2**  
Second albedo layer written to NPRalbedo2 AOV.  
Use when: supplying additional color channels for downstream display filters.  
Range: color

**NPRalbedo 3**  
Third albedo layer written to NPRalbedo3 AOV.  
Use when: providing tertiary albedo information for stylized compositing.  
Range: color

**Primary Hit Only**  
Controls whether AOVs are written only on primary rays.  
Use when:

- ON: XPU mode — prevents secondary bounces from polluting stylized AOVs.
- OFF: RIS mode — always write AOVs.  
Range: switch on/off

**Hatching Mask**  
Mask for controlling where hatching appears. Stored in the GREEN channel of NPRmask AOV.  
Use when: masking out regions from hatching (e.g., specular highlights, emissive areas).  
Range: 0.0 – 1.0

**N Triplanar**  
Selects which normal is written to NPRNtriplanar AOV.  
Use when: providing deformation‑safe normals or custom normals for downstream hatching filters.  
Range: mapper

- N
- __Nref
- Input N Triplanar

**Input N Triplanar**  
Custom normal used when N Triplanar = Input N Triplanar.  
Use when: supplying custom normals for stylized shading or deformation‑safe workflows.  
Range: color (RGB = XYZ)

**Input Texture Coordinates**  
Custom UVs written to NPRtextureCoords AOV.  
Use when: providing custom projection coordinates for downstream hatching filters.  
Range: color (R = U, G = V)

**Frequency Scaling**  
Controls how hatching frequency is modulated in downstream display filters.  
Use when: varying hatch density based on facing ratio or UVs.  
Range: mapper

- Facing Ratio
- U
- V
- s
- t


### Version Page  


**Notes**  
Read‑only version notes.  
Use when: tracking shader version or internal notes.  
Range: string (read‑only)


### OUTPUTS  


**resultRGB**  
Final color output of the shader.  
Use when: connecting to PxrSurface utilityPattern or userColor.  
Range: color

**resultAOV**  
Integer output used internally for AOV routing.  
Use when: not typically user‑modified; included for completeness.  
Range: int

### AOV WRITES (Automatic)

When Primary Hit Only conditions are met, the shader writes:

- NPRalbedo
- NPRalbedo2
- NPRalbedo3
- NPRmask (lineMask, hatchingMask, toonMask)
- NPRPtriplanar
- NPRNtriplanar
- NPRtextureCoords
- NPRnormals
- NPRhatchOut
- NPRhatchTriplanar1to3
- NPRhatchTriplanar4to6
- NPRhatchTriplanar7to8

These AOVs are consumed by downstream Stylized Looks display filters.


## QUICK USAGE TIPS

1. For stable animation, use Triplanar Projection  
Screen projection is beautiful for stills but can shimmer in motion.  
Triplanar sticks to geometry and is deformation‑safe when using __Pref and __Nref.
2. For **watercolor** or **wash** textures, enable Progressive Clamp  
This removes unwanted dark spots in lighter textures.
3. For **cross‑hatching**, use Rotation Step  
Small increments (5–15°) create layered cross‑hatching patterns.
4. For **hand‑drawn** variation, add small jitter

- Frequency Step Jitter: 0.01–0.05
- Rotation Step Jitter: 0.01–0.05

5. For stylized lighting, drive Signal Input  
Connect:

- PxrStylizedLightingControl
- PxrDirt (Ambient Occlusion)
- Custom float patterns  
This controls which hatch layer is selected.

6. For custom UV workflows, use Input Texture Coordinates  
Useful for camera projections, planar projections, or procedural UVs.
7. For **deep shadows**, use Darkest Tex Color Switch  
Blend a custom **ink/charcoal** color into the darkest tonal regions.
8. For consistent scale across objects, use Size Space Scale  
Ensures hatching frequency matches across differently sized assets.