# Believable procedural wood in Cycles

I’m trying to get something like what the user toward the bottom of this page (hjaarnio) has created.
But I don’t really understand what is happening in his node tree from the screen shot.
He also uses a distance calculation equation, but it’s not clear how he wrote the code for that.
[Edit: he didn’t write code, just used vector math nodes]
Maybe it doesn’t have to be this complicated, but if anyone looking at the page can understand what’s going on I would appreciate an explanation, or suggestion for an alternative approach.
Thanks!

(What I have so far - needs more ripples)

Got it sorted out!

Nice and may i ask: What was your solution? Can you show the nodes?

Sure. It’s not too easy to see what’s going on at a glance. But basically I used the vector math from hjaarnio’s explanation. Then made another branch whose coordinates and color ramp vary slightly to create offset interference and therefore more interesting detail. Then added subtle displacement, subtle gloss, and subtle color variation throughout.

I plan to release a .blend after I clean up the nodes a bit and add some labels so people can understand what’s going on.

Another procedural Cycles wood material I’m working on now is for floorboards.

Progress so far:

Here is the node setup for this one, with some commenting.

This was a proof of concept, that the floor boards can be given variation in wood grain texture so as to appear like separate individual boards. But with the benefit that you don’t have to model individual boards, or rely on an image texture which can appear tiled when used in large rooms.

My goal is to incorporate the more detailed procedural wood grain material into this sort of procedural floorboard pattern.
And if possible incorporate knots in the wood. Today I discovered this can be done with OSL.

I’ve tried a couple of pretty complex procedural wood before, but I’ve typically found them to be too complex and too slow to be useful. Especially for floor woodboards I feel that there has to be a good way to make a seamless tiled image texture appear varied enough to remove repetitiveness. I.e. mix in a couple of noise nodes to modulate HSV, and offset tiling with bricks to break up the pattern.I love a good wood pattern, but it have to be efficient as well, especially for large floors where it may contribute a large part of the final scene.

This was one I made quickly a while back. Wall is two triangles:

A bit messy, but maybe I’ll clean it up eventually:

After I clean that up and add some options, I could always give a go at adding procedural knots.

SynaGl0w, that is beautiful! And just perfect for anyone looking for that style of wood.
Please consider sharing the .blend, even if it’s not polished yet!
I am about to do the same…

You’re right. Reconstructing node trees from screen shots? Ain’t nobody got time fo’ dat!

Here are the .blend files.
Procedural Wood ver. B25
Procedural Floorboards ver. D09

I felt compelled to look through the files and clean up various things, but I knew if I started down that road it would turn into endless revisions. So in the name of getting it to you quickly, here they are as-is.

Will do when the project it’s for is released. For now got a billion projects going at once. :spin:

I hear ya. Well hopefully sooner than later. Or I’m sure nobody would mind if you release it unpolished for now and revisit it later.

Today I happened to get a chance to see a lot of examples of wood work up close at a craft fair, and I noticed something about gloss/specularity in polished wood - the darker rings are more rough (diffuse) and the lighter rings are more glossy/specular. And it seems like you have incorporated that into your material to a degree! I haven’t analyzed all the nodes yet, but it looks that way. Anyway, I remain optimistic for realistic procedural wood in Cycles. There was nothing I saw that couldn’t be represented algorithmically - it’s just a matter of being clever enough to route/code a close enough approximation.

Knowing that vector/normal XYZ data is handled the same as RGB color data, it’s likely you can mix a spotted texture into that channel. If you mix that in a way which effectively turns the vector 90° where the spots are… It should change the pattern of waves or noise when fed into the vector input. I would think it should warp around from side grain pattern to end-grain if you do it right.