Author Topic: WoodMachine - all-purpose procedural wood generator  (Read 10551 times)


Being unsatisfied with existing wood substances and tired of using photo textures, I began to create a new wood substance last year. It grew, went through lots of iterations and I believe it is about time to share it!

My goal has been to create a substance that does not only generate a realistic-looking surface but is also versatile and customizable enough that it can be used for creating virtually anything made from all kinds of wood in every possible condition from brand-new to ancient and torn-up. No matter if you need to texture a medieval barrel, a fancy speaker, an old painted door, floor planks, wall panels, a fake wood Ikea table or a piece of driftwood, this substance should be able to do it.

Apart from just generating textures it also handles a few other things:
The pattern can be rotated in predefined areas. This means you don't need to align your UV shells according to your texture any more, the grain always goes into the right direction (mask input required). An offset function is included as well. This is useful for all kinds of parquet, planks and larger objects made of solid wood.
Matching wood ends are generated as well if needed! Last but not least there are also mesh and grain adaptive wear effects.

How to work with this substance:
The masks for grain rotation, ends etc. can be created directly in SD with SVG or Bitmap nodes if you need the transformation functionality. Alternatively, you can do that by applying color to your highpoly mesh in your 3D app and bake it into a map.
After plugging in your maps and masks, you can adjust the parameters to achieve the look you’re aiming for. The amount of variables and possibilities to customize the wood is quite large, I tried to set things up as logical and clear as possible though. Tooltips are included and I recommend reading them!

The idea behind this substance is that the generated wood surface should behave just like real wood. Here’s some theory:
Wood consists of layers, visible as growth rings on a perpendicularly cut trunk. The bright parts are known as early wood, the darker parts are the late wood. Early wood grows quickly during springtime in a temperate zone, late wood grows slowly towards the end of each growth period.
These two do not just differ in color: early wood is usually softer and less dense than late wood. This means:

- It absorbs more material when wood stain or oil is applied
- It has a rougher surface even when sanded
- It is somewhat more prone to wear and damage

These things matter when working with a real piece of wood and they matter with this substance! Not only does the Roughness slider in the Color & Roughness settings determine how shiny or matte your object is, it also affects the way it will look when wood stain is applied. Setting the Base Roughness is like sanding your piece of wood prior to staining. There’s also a map slot for Roughness Variation.

You can choose the Natural Wood Color from a drop down list or apply custom colors for early and late wood. Of course, you can specify any colors you want but I’d always recommend using natural wood colors and, if needed, applying Stain Color additionally. The results may be slightly less predictable but more natural with more variation and possibilities. As in reality, staining wood makes it darker and more saturated. The darker or more saturated the Stain Color, the greater its effect. You cannot use this parameter to bleach your wood, light gray values will have no effect.

As mentioned above, early wood usually absorbs more color than late wood during the process of staining. The third important parameter for color – Absorption Difference – can be used to control how big this difference is. At some point, the stain color is distributed in a way that practically lets the pattern disappear. From some other point on, the wood pattern may be inverted: the early wood becomes darker / more saturated than the late wood.  The position of these points depends on the respective Natural Wood Color / Stain Color combination.
I'd recommend increasing this especially when dealing with bright softwoods such as pine or spruce or generally if you stain it very dark.

Last but not least you can add further variation into your stained wood by limiting its intensity on certain areas with a mask. This is very useful for everything that consists of several pieces of solid wood such as large pieces of furniture or parquet. Because in reality, individual pieces of wood don't necessarily absorb the same amount of stain, especially when taken from different trees. You can also feed this slot with a grunge map for extra color variation and/or dirt.

The Main Pattern settings control the generation of the early / late wood mask. Set them accordingly to the type of wood and object you wish to create. Oak and rosewood, for example, would need some Horizontal Distortion. And when generating spruce wood for violin fronts, Disorder should be kept at a minimum to receive a pattern of relatively even lines.

Micro Grain adds tiny detail to the surface that makes it look more realistic. Set it accordingly to the type, age and finish of your wood.
Depending on what you are creating (natural pine, polished oak, artificial Ikea veneer…) the influence of fibers and pores on Albedo, Roughness and Normal varies. Therefore, you can adjust the intensity separately for each map.

There are also Knots, of course. Amount, size and condition are variable. Knots have a great influence on the flow of the Main Pattern which you can control with the Push, Pull and Swirl settings.

Under Flaws you can find effects that might occur by processing or during aging such as cracks, saw marks, scratches or damages caused by vermin.

Damage & Edges includes the settings that control the built-in edge wear effect. It requires a Curvature and Ambient Occlusion Map to work. You can adjust the settings to achieve slightly worn edges right up to a splintered, destroyed look. Also, Additional Damage can be applied which is independent from edges and curvature.

The Ends settings can be used to adjust the look of wood ends. These need to be defined by a map input first.

Finally, the Paint Layer settings control the look and condition of paint on your wood surface if you have any. The wood surface underneath determines where the paint is prone to flake off.

The main outputs are: Base Color, Normal, Roughness and Cavity. The generated masks for damage and paint are also available as outputs as these might be handy for further processing.

About the graph: since wood is an organically grown matter, most of the components influence each other in several ways which often prevented me from combining node groups into individual nodes. Therefore, the graph is a huge thing that might scare your kids and eat your cat. I’ve done my best with frames, comments and docking nodes to make it less of a mess.
Currently there are 100 exposed parameters stacked in 9 groups. Each node with exposed parameters has an according comment so that you know what it does.
There are still some things I’d like to include and some others that might get changed or removed – I’m sure with a substance of this size and complexity there’s always room for improvements and optimization. Feedback is appreciated!

Important things you should know beforehand:

- Substance Designer 2018.3+ required.
- It is not (yet) optimized to work with non-square formats.
- Editing parameters may be a bit slow due to complexity. My machine’s GTX970 and 16GB RAM have been sufficient for 4k. YMMV though especially when using this substance in a greater context. When in doubt, try the demo first!
- The substance is neither designed nor optimized to run directly in realtime engines. Creating and exporting textures from SD only! It is also not intended to be used as a Smart Material in Painter.
Last Edit: February 28, 2019, 05:38:00 pm

I'm working on some small, blocky wooden toy designs. The grain structure and variables look great in WoodMachine but I also need to have an end grain on the top/bottom of the blocks.
Is there any way to do a 3d procedural so the same shader can handle end grain and long grain with WoodMachine?

The way it works is that areas can either be a standard wood surface or an end surface but not both at the same time – blocks would be OK but it won't be optimal on round, organically shaped objects such as chess pieces that require smooth transitions. Of course you could use grayscale values and gradients (e.g. world space information) as End input but the result will not be on par with 3D noise based solutions. Which is a thing that I'd love to implement in the long run though. Currently this substance is rather suited for relatively planar surfaces.
Last Edit: May 20, 2019, 08:41:20 pm

Hello and thank you for that great plugin.
After some playing around I noticed that it seems to be great for most purposes.
I am currently trying to get acacia as a wood pattern, and it has an additional element of between early and late wood. Here is a reference image:

Any idea where to start adding something like those darker areas?
I bought the procedural version...

Hi, sorry for the delay! By procedural version you mean the SBSAR version? In this case the easiest yet not-as-elegant solution would be to duplicate the Wood Machine node and to set the wood color to black and white to receive an early/late wood mask. With this mask you could create another mask (with e.g. Perlin Noise) that can be used to add further detail.

I remember that I had an early/late wood mask as an additional output but dropped it at some point during development. Would have been useful in such a case though.
Last Edit: October 15, 2020, 11:44:17 am