Sometimes when working with architecture visualization we want a material to be seamlessly repeateable and to set its size based on the material real dimension.
For instance, let’s say we have a photo of a wood texture which corresponds to 2.0 x 0.1 meters.
If we want to re-use this texture for different objects we can’t rely on UV Coordinates to guarantee the correct real world dimensions.
So, how to do it?
To get this properly rendered you can use a node group that I prepared just for that:
- Download this [sample .blend]
- Import and add the “Architecture Coordinates” node group to your material
- Link it to a Mapping node, with Scale: 2.0 (X) 0.1 (Y)
- Link the Mapping node to your Image Texture node
Optionally you can change the Location (X, Y) and Rotation (Z) of the Mapping node.
Note, for this to work the object scale should be 1, 1, 1.
Incorrect Textures 🙁
Correct Textures 🙂
Sample File Explained
Note, the sample file requires you to Run Python Scripts for the drivers
This file has a cube object which has its mesh controlled by hooks. And the hooks are driven by custom properties of the “Origin” empty. This way you can play with different values without changing the object scale (which would affect the final result).
The test image has a 2 x 1 aspect ratio. If we pretend it was originally a 4.0 x 2.0m texture the whole image will be seen when the width and height of the cube are 4 and 2 respectively.
The Architecture Coordinates Node group take the Object coordinate and tranform it based on the facenormal (i.e., whether the face is facing the X, Y or Z axis).
Tcharan! The texture is properly setup regardless of the face direction.
I hope you find this useful, and you have a diferente solution for this problem please let me know. Maybe this is something Cycles should have by default?
Note: This file was developed for Blender 2.77, it may not work in different versions