Anisotropy
Related reference: Scene API / Rendering and Materials
Anisotropy is mainly used to improve texture clarity when viewed at oblique angles. Typical cases include:
- ground surfaces
- large-area textures
- distant planes
- model surfaces with lots of fine detail
API
js
await api.setAnisotropy(obj, 8);Parameters
js
await api.setAnisotropy(target, num, mapType, recursive);target: the target objectnum: the anisotropy value, usually a power of twomapType: the texture field name, default ismaprecursive: whether the change should also apply to child nodes, default isfalse
Examples
Increase Anisotropy for the Main Texture on a Model
js
await api.setAnisotropy(model, 16, 'map', true);Increase Anisotropy for the Normal Map
js
await api.setAnisotropy(model, 8, 'normalMap', true);Notes
- Higher values are not always better. They also add rendering cost.
- This works best on large textures viewed at strong angles.
- It will not have any effect on materials that do not have the specified texture map.
Recommended Values
A good starting point is usually 4, 8, or 16.