How to align multiple wave textures? When creating wood textures in Blender, I often use the Cycles 'Wave' procedural texture (the equivalent of the Blender-Internal 'Wood' texture). I can use it to create what appears to be very realistic wood grain.

However, I run into a problem whenever I'm modeling wood blocks with sharply cut edges. Real wood would have a different cross-sectional type of grain on each side, depending on how it was cut (for example, in the image below, one side would have a 'ring' structured texture, and the other two would each have a different 'band' texture). Moreover, if you look at any one of the individual dark bands, you'll see that they 'align' with each other across the three faces.



Is it possible to make three different procedural textures that align with each other in this way? If that isn't possible, is there any way to produce a similar effect using other techniques?
A very flexible way to make the texture is to make it from scratch with the nodes, not relying on the built-in, a bit limited wave texture. Using some math nodes and adjusting the value results in a pretty nice wood texture.





Here the two vector inputs define a line that passes through both (the core of the three), and the distance from that to the object surface is calculated inside the distance node. 



The surface positions are distorted a bit by adding a bit of noise to them, the distance calculation is done per the equation here.

Using modulo makes the distance from the surface to the line a looping range of values from 0 to the distance between the waves in the wood. Multiplying that by the inverse of the distance brings the range to 0 - 1, which can then be mapped into a nice gradient using a map range node. That can be used to multiply or mix the color value to achieve the final result.

See also:


http://www.minimaexpresion.es/?p=690&amp;lang=en
http://materialw.wordpress.com/materials/wood-material/
http://blenderartists.org/forum/showthread.php?246113-A-fine-procedural-wood-material-for-Cycles
http://shiny-dynamics.blogspot.fr/2012/04/wood-texture-for-blender.html
http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Procedural_Textures
http://wiki.blender.org/index.php/Doc:2.6/Manual/Textures/Types/Procedural/Wood
http://www.blendswap.com/blends/view/52626 (mirror of previous link)