Shader nodes: ignore scaling, keep rotation I've successfully built a procedural wood texture, but I'm having problems with coordinate spaces.
By default, textures seem to follow the UV coordinates of the geometry. This is obviously useless; each object I apply the wood texture to gets its coordinates horribly mangled according to the UV map of that object (if it even has one). Most particularly, if you scale an object, the texture is also scaled.
Fortunately, using the &quot;geometry&quot; node, you can get actual, absolute coordinates in 3D space. This allows the wood texture to operate as a correct 3D texture, which different faces of the object showing different sides of the grain and so forth. It also means that every object in the scene has the same size grain.
There's a snag, however: The texture now correctly ignores scaling, but it also ignores translation and rotation. I understand why, but I don't know how to fix it. How can I make it so that rotating an object also rotates the wood grain? It would seem I need some way to read the object's rotation... but I don't see an input node for that. Can I get the local-to-world transformation matrix somehow?
The only other solution I can think of is to have a duplicate copy of the material for every single wooden object in the entire scene, each with the rotation factor manually set to match the object geometry. But that's a horrid, horrid idea! I do not want to have an entire separate material for every individual object! And having to manually update the material every time I rotate the geometry sounds awful. There's got to be a better way...
It sounds as if you should be using Texture Coordinate &gt; Object space.
This is in Blender units, from the object's origin, and in the orientation of the object's axes.
Be aware, that space carries the object's scale transform as well; to make sense, the object's scale will have to be (1,1,1).. (i.e. applied).
There's an example of a procedural wood here