โ† All examples

godot shaders

Procedural wood with growth rings and grain

Solid wood from object-space 3D math: growth rings around a trunk axis with noisy distortion, sharp latewood bands, fine grain streaks along the axis and per-ring colour variation, so cut ends and long sides both read correctly.

Recorded render of Procedural wood with growth rings and grain

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • component.json
  • demo.tscn
  • inspect_shader.py
  • material.tres
  • preview.png
  • test_package.py
  • verification/native.json
  • wood_rings.gdshader

How it works

Shader type
spatial
Parameters
early_wood (vec4 = 0.78, 0.56, 0.34, 1), late_wood (vec4 = 0.45, 0.26, 0.13, 1), ring_density (float = 18), ring_sharpness (float = 0.7), distortion (float = 0.6), grain_density (float = 140), grain_strength (float = 0.25), axis_tilt_degrees (float = 4) and 1 more
Use it on
A mesh whose object Z axis runs along the grain (rotate the node to change it).
Result
A plank with arched grain on top and a log end showing concentric growth rings.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/wood_rings/

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • contract_static
  • engine_run
  • engine_log_clean
  • shader_in_scene
  • capture_written
  • render_not_uniform
  • shader_changes_pixels

Limits to consider

Solid texture in object space: scaling the object scales the rings. No knots, pores or normal relief. Rings are centred on the object origin; offset the mesh to move the pith.