Solution for individual objects - volumetric - bad topology
This solution requires that you set the origins of the objects to the center of the circle. (You do that by placing the 3d cursor at the center - shift + right click, then select all objects, right click, set origin, origin to 3d cursor)
Use this to copy material to all objects: Copy material to another object? (where the "special" in newer blenders is a "down arrow")
(the same principle for copying apply to geometry nodes, in blender 4.2, you click the down arrow on the material or the modifier)
Geometry nodes
- Calculates the mean position of the faces
- Calculates a provisory vector from the origin (center) to the mean position, discarding Z (provisory local X)
- Uses maths to create local X and local Y for each face based on this provisory X
Shader nodes
Gets the local X and Y and calculate the position of the geometry in this local coordinate system
Result for volumetric objects with bad topology
For flat (2d) objects with good topology
Geometry nodes
These store a X axis for the texture.
- It needs tiles with 4 edges
- It takes the two smallest edges and calculate X based on the center of these edges
- It stores the normalized X axis in a named attribute (important: store as vector)
Shader nodes
- Take the Texture X axis
- Calculates the Texture Y axis by cross product Normal x X
- Calculates the position of the geometry in the new texture coordinate system (dot products)
(The wave texture represents your wood texture)
PS: you might need to rescale the texture, in this case, add a multiply or a vector map right before the texture.
Result
Solution for mesh islands
Here, you have a single object instead of many individual objects.
- This requires that all islands have 4 vertices!!
Solution for volumetric objects with good topology (faces = quads)
Here, we extrapolate the previous island solution.
- Split the edges to make every individual face its own UV island
- Store the X axis for each face
- Join the geometry together again (merge by distance)