mojira.dev
MC-161948

Models with alpha channel do not render all faces consistently

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):

[media]

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:

[media]


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

[media]

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:

[media]

Linked issues

Attachments

Comments 1

Great ticket! Can confirm.

Tedstar (Curtis Anderson)

Fry

Confirmed

Important

Rendering

graphics, ice, item, models, rendering, semi-transparent, slime_block, stained_glass

19w39a, 19w40a, 19w41a, 19w42a

19w45a

Retrieved