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

Flower pots have redundant coplanar top faces, impacting performance, and extra interior faces that cannot normally be seen

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.19.4, 23w18a
    • Confirmed
    • Performance, Textures and models

      This ticket is effectively an extension of MC-262427.

      The bug

      Extra planes exist inside of the flower pot model, as well as many other potted plant models, which cannot be seen without clipping into the block model somehow. In addition, the top rim is composed of four planes, when it can be achieved in just one.

      MC-262427 has already discussed how the current flower pot models are unoptimized, and has proposed an improved model. However, some further testing has revealed that unifying the top four planes into one can boost frames even more, to the point where the framerate with these planes removed is roughly twice that of vanilla in the testing conditions described in said ticket.

      Implementation

      Three of the four resource packs attached to this ticket include an optimized version of the flower pot (and the flower pot only). The "5-14" version is identical to the flower pot improvement included in MC-262427, based on the existing flower pot model, which has 14 texture planes distributed across elements.

      Also included are resource packs for "6-11" and "2-11" optimized versions of the flower pot. These versions are the focus of this ticket, and are more reflective of flower pots from release 1.4.2 to 1.7.10 prior to their conversion to proper block models: a 6x6x6 cube is used for displaying the outermost faces. The 6-11 model uses five more elements to render the four inner pot faces and the inner dirt texture, meaning that it has more elements than the 5-14 model but fewer planes. The 2-11 model uses an inside-out element (where one or three of the "to" coordinates are greater than their corresponding "from" positions) to render all five inner faces in one shot, meaning that the flower pot as a whole can have all eleven faces rendered using only two elements. However, there doesn't appear to be any rendering/performance benefit for the 2-11 model compared to the 6-11 model, and I'm not sure if "inverted" elements are even supported in the first place.

      Drawbacks

      There is one thing worth pointing about both the 6-11 and 2-11 versions of the flower pot model: due to tiny precision issues, very small gaps can be seen in some of the inner edges of the flower pot rim due to MC-73186. It may be possible to mitigate this by extending some of the faces further, however it'd probably be more worthwhile to spend time looking into why these precision errors occur in the first place.

      How to reproduce

      MC-262427's reproduction steps can be used with the attached resource packs for the 5-14, 6-11 and 2-11 flower pot models to see how they compare in rendering performance. The spectator gamemode can be used to clip inside of the flower pots to check for the presence of interior faces.

      How to fix

      Also attached to this ticket is a resource pack which makes flower pots and all potted objects use the 6-11 flower pot model. Fixing this should be as simple as replacing the flower pot texture file in the default resources with the texture file in the attached resource pack, replacing Programmer Art's flower pot texture with the updated Programmer Art flower pot texture, and replacing the model files flower_pot.json, flower_pot_cross.json, potted_bamboo.json, potted_cactus.json, potted_mangrove_propagule.json, template_potted_azalea_bush.json, tinted_flower_pot_cross.json with the model files in the resource pack attached.

      I give Mojang full permission to use the assets inside of the attached resource pack in Minecraft, either as-is or with any modifications deemed appropiate.

        1. 2023-05-07_21.23.40.png
          135 kB
          Connor Steppie
        2. 2023-05-07_21.24.11.png
          151 kB
          Connor Steppie
        3. 2023-05-07_21.24.41.png
          165 kB
          Connor Steppie
        4. 2023-05-07_21.25.07.png
          164 kB
          Connor Steppie
        5. 2023-05-07_21.56.49.png
          27 kB
          Connor Steppie
        6. 2023-05-07_21.56.53.png
          171 kB
          Connor Steppie
        7. 611PROGRAMMERART-flower_pot.png
          0.3 kB
          Connor Steppie

            Unassigned Unassigned
            Awesoman3000 Connor Steppie
            Votes:
            13 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: