mojira.dev
MC-262644

Issue with shading differing unexpectedly on rotated model elements

Discovered while testing MC-262427.

The bug

In model files, it's possible to specify the same rotated model elements using methods that should mathematically and geometrically result in something visually identical regardless of which method is used. For example, a plane with faces on the west and east which spans the YZ plane rotated -45 degrees around the Y axis should look identical to a plane with faces on the north and south spanning the XY plane rotated +45 degrees around the Y axis, provided that both map the texture in the correct fashion.

However, in Minecraft: Java Edition, this does not appear to actually be the case, and very noticeable visual differences can be seen.

How to reproduce

  1. Download and apply the attached resource pack

  2. Place a torch on the ground

  3. Place a redstone torch on the ground

  4. Place a soul torch on the ground

  5. Inspect

Expected results

All three torches would look identical with these custom models.

Actual results

The soul torch is noticeably darker than the normal torch, and the redstone torch uses two different brightnesses for each half of the block.

Explanation of the resource pack

Each of the torch models in this resource pack uses two elements with four texture planes (two each). The torch model has these planes spanning the yz plane, with both rotated -45 degrees. The soul torch model has these planes spanning xy, with both rotated +45 degrees. The redstone torch has one xy plane rotated +45 degrees and one yz plane rotated -45 degrees. All are mapped such that the texture matches up correctly.

Notes

This issue can be observed on a few vanilla models such as sloped rails, and is more noticeable on potted flowers.

Related issues

Attachments

Comments

migrated
[media][media][media][media]
migrated

Duplicate of MC-185936.

muzikbike

(Unassigned)

Confirmed

Platform

Normal

Rendering, Textures and models

20w21a, 20w22a, 1.16 Pre-release 1, 1.16 Pre-release 2, 1.16 Pre-release 4, ..., 23w16a, 1.20 Pre-release 1, 1.20.1, 1.20.2, 1.21.4

Retrieved