Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-161948

Models with alpha channel do not render all faces consistently

    XMLWordPrintable

    Details

    • Confirmation Status:
      Confirmed
    • Category:
      Rendering
    • Mojang Priority:
      Important

      Description

      The bug

      When viewed through certain faces, other faces of a model with alpha channel transparency do not render.

      How to reproduce

      The easiest way to view this bug is to summon an invisible armor_stand with a semi-transparent block in its head armor slot:

      /summon minecraft:armor_stand ~ ~ ~ {ArmorItems:[{},{},{},{id:"minecraft:black_stained_glass",Count:1}],Marker:1,Invisible:1,NoGravity:1}
      

      In this way, every face can be observed independently of the others.

      Affected models

      Any model with alpha channel transparency is affected in a similar way. This currently includes:

      • any stained_glass
      • any stained_glass_pane
      • minecraft:ice
      • minecraft:slime_block
      • minecraft:slime (entity)

      Models without alpha transparency (i.e.: only full transparency) are not affected:

      • minecraft:glass
      • minecraft:glass_pane
      • minecraft:beacon
      • minecraft:iron_bars

      Model rendering issues

      The following table shows the deficiencies in model rendering for semi-transparent textures. This table is relative to the stained glass Model Cardinality (see below).

      Looking In Face Renders Bottom Renders Top Renders North Renders South Renders West Renders East
      Bottom N/A No No No No No
      Top Yes N/A No No No No
      North Yes Yes N/A No No No
      South Yes Yes Yes N/A No No
      West Yes Yes Yes Yes N/A No
      East Yes Yes Yes Yes Yes N/A

      This table does not appear to be the same for the stained glass pane model, though similar issues can be observed.

      This table is the same for the slime entity model, but the faces are in a different orientation (see below).

      Cause

      There are multiple locations in the code and model files where the faces are added/defined in the order DOWN, UP, NORTH, SOUTH, WEST, EAST, and this can be seen in the table.

      Visual evidence

      Relative to the texture (when placed in the world) these are the assigned cardinalities of the faces for full blocks (stained_glass, ice, slime_block):

      When looking through the face in the Looking Through column, the other faces in the Render X column contain the render status of those faces.


      The slime model exhibits the same table, but in a different orientation, which can be seen here:


      Here is an example model showing the extent of the issues:

      In the model cardinality, this is looking from South-East-Above.

      Note: this is not a block in the world, it is a Head Item on an invisible armor_stand.

       

      Here is an interactive example:

        Attachments

        1. ItemModel.gif
          ItemModel.gif
          277 kB
        2. ModelCardinality.png
          ModelCardinality.png
          18 kB
        3. SampleModel.png
          SampleModel.png
          95 kB
        4. SlimeCardinality.png
          SlimeCardinality.png
          18 kB

          Issue Links

            Activity

              People

              • Assignee:
                fry [Mojang] Georgii Gavrichev
                Reporter:
                Tedstar Tedstar (Curtis Anderson)
              • Votes:
                12 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: