Skip to content

Anisotropy rotation appears incorrect (clockwise) #26967

@emackey

Description

@emackey

Description

The glTF anisotropy specification indicates counter-clockwise rotation when an angle is provided. But, in ThreeJS the rotation angle appears clockwise.

The AnisotropyRotationTest model is available for testing this feature. Please read its description for how the test is performed, but the short version is, the resulting model should display horizontal stripes on all test meshes. Here it is in Don's glTF Viewer:

screenshot of anisotropy in glTF Viewer

The six "Basic Anisotropy" meshes are correct. But on the left side, both the texture-based rotation and JSON-based rotation are incorrect, and in the lower-right, the combination of both is also incorrect. These test meshes use a 30-degree slant in the tangent vectors that is intended to be undone by a 30-degree counter-clockwise rotation in the material. However in this image, a 60-degree clockwise rotation is visible, indicating that the material rotated the opposite way.

For comparison, in BabylonJS and in Khronos glTF Sample Viewer, the rotation is correct:

sample viewer screenshot

(Apologies for the use of a different IBL in the above. But you can see the stretching is horizontal in all the test meshes anyway.)

/cc @elalish @cx20

Reproduction steps

  1. Load AnisotropyRotationTest.glb
  2. Compare result to the sample model's description.

Version

r154

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions