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

Bamboo fence multipart rendering optimization - requires texture mapping modification

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.4, 25w03a
    • Community Consensus
    • Rendering, Textures and models
    • Normal
    • Gameplay

      Relates to: MC-260296 MC-262427 MC-262452 MC-262461 MC-262470 MC-262527 MC-262641 MC-262652 MC-262689 MC-262953 MC-267127 MC-267281 MC-267315 MC-267864 MC-279350 MC-279354

      The bug

      Bamboo fences, like other fence types (see MC-267281), are not modelled in a way which is optimal for rendering performances. As a result, areas which use large amounts of bamboo fences will decrease framerate much more than otherwise should be the case.

      Bamboo fences use a fundamentally different system for modelling compared to other fences, which is why I'm reporting this separately from the other fences. Tragically the issues with the normal fence model have carried over to the system used for bamboo fences.

      The model system bamboo fences use is also more complicated than is neccessary - it uses four models for orthogonal connections, whereas this optimized system achieves a visually identical outcome using just three.

      Note that since bamboo models use a unique texture rather than just copying the bamboo planks texture, the texture mapping will need to be shifted around. A modified version is found within the attached resource pack - the visual outcome will be identical, but existing resource packs will need to be changed by their authors to fit around it (assuming they don't take the lazy route and just copy over the old, terrible models).

      How to reproduce

      1. Create a creative Superflat world with the following preset:
        minecraft:barrier;minecraft:the_void
      2. Enter flying mode by double pressing the jump button
      3. Run the command
        /tp @s 0 -20 0 0 90
      4. Run the command
        /fill -30 -63 -30 30 -56 30 bamboo_fence
      5. Open the performance graphs via F3+2
      6. Switch between the default resources and the attached resource pack, comparing the performance

      Expected results

      Good framerates in vanilla.

      Actual results

      We can do far better.

      How to fix

      Simply implement the resources in the attached resource pack into vanilla. I give Mojang my full permission and encouragement to use these files to make vanilla Minecraft run better.

      Further notes

      Mipmapping will be affected, however this is a non-issue.

      The bamboo fence item model is also updated to fit the new system.

      Many of the old model files can be safely deleted once the new ones are added, as this improved system renders them completely superseded.

            Unassigned Unassigned
            muzikbike Connor Steppie
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              CHK: