While creating the Red Oak shader, we used the “Object” coordinates:
I mentioned that this will make the wood shader three-dimensional, as if our objects are carved out of a solid block of wood. The reason is that the Object used for the coordinates is by default the object that the shader is applied to. For example, if we duplicate our board that we used to create the shader, you can see that the texture coordinates are the same on both objects:
However, you can actually set the object to anything you want, and your texture coordinates are based on the object selected. Create an Empty and place it at the center of the first object (in this case it’s the origin):
Now, in the Texture Coordinates, select the Object field and choose the Empty object:
You can now see that both objects seem to be cut from the same piece of wood because they share the same texture coordinates:
Moving the empty to the space inbetween the objects, you can see the coordinates track the empty:
If you wanted to make objects that appear to be cut from the same block of material, you now have a very simple way to do so. For example, you could make a diagram showing how a log is cut into boards:
Even if you only have one object with the shader applied to it, using an Empty in this way gives you a convenient “handle” to adjust an object’s texture coordinates visually, rather than typing numbers.
Next post I’ll talk a bit about using a different coordinate system for the wood shader!