2
$\begingroup$

I'm making stairs with glass steps, which have a big amount of metal bolts. The problem is that when each bolt is separated into individual object, the Anisotropic shader looks alright, but when I merge them into one object, it looks bad. Is there a way to make it work properly without having 40 individual objects for each bolt?

This is an example of two separated objects:

enter image description here

And this is how it looks when I merge them:

enter image description here

And finally, this is how the stairs look like:

enter image description here

$\endgroup$
1
  • $\begingroup$ It looks like dupliverts or dupligroups may also be viable solutions. I think they also cut down on render cost too. I would try using dupliverts for your bolts. $\endgroup$
    – Tavi Kohn
    Jun 14, 2018 at 17:54

1 Answer 1

2
$\begingroup$

The issue is that you are not using any coordinates to control the mapping of the texture. In this case you have not defined a UV map.

When you create a single object that contains the meshes for all of the bolts you are enlarging the bounding box of the object. And, since you are not using any UVs, then the bounding box happens to be the key element in defining the anisotropic qualities of the surface.

Quote from the blender manual

The Anisotropic BSDF node is used to add a glossy reflection, with separate control over U and V direction roughness. The tangents used for shading are derived from the active UV map. If no UV map is available, they are automatically generated using a sphere mapping based on the mesh bounding box.

A single mesh:

enter image description here

Several copies of the same mesh:

enter image description here

The bounding box:

enter image description here

To make all of the elements have the effect you are after, you need to unwraop the mesh to define the UV coordinates for the original object.

enter image description here

And have the anisotropic BSDF node use the UV coordinates as tangent. Note that the UVs should be unwrapped as 'Project from View' in isometric view (rather than perspective view - Numpad-5), viewed in the direction of the desired anisotropy, and moved to be centred on the UV origin (as that is where the centre of anisotropy will be located).

UV unwrapping

Then every copy of the original mesh will be using the same mapping, regardless of the bounding box of the object.

enter image description here

enter image description here

NOTE : This will produce a slightly skewed anisotropy due to the raw UV coordinated being used for the Tangent rather than an actual tangent. This can be adjusted using the Anisotropic Shader 'Rotation' property, but a better fix is to use a Cross Product node to generate the tangent from the UV coordinate and a fixed (0,0,1) vector (which is perpendicular to the UV plane) using the following nodes :

generate tangent


The alternative to this is not to merge all of the meshes into a single object, but to make a single bolt, then use instances with Alt+D, that way each copy will be a single object, but will share the same mesh and material. If you want to edit the original, then all other instances will be editied as well

$\endgroup$
0

You must log in to answer this question.