MoreMcmeta (Forge)

MoreMcmeta (Forge)

158k Downloads

Poor performance when using high-resolution skybox resourcepacks

Opened this issue ยท 14 comments

commented

Describe the bug
Moremcmeta always causes huge lag when using high-resolution skybox resourcepacks(Such as Hyper realistic sky)

2023-09-26_01 03 37
When I load Hyper realistic sky without any optimization mod,my fps is 400+

But if it works with Moremcmeta,this number decrease to 60
2023-09-26_01 13 11

Animatica has one similar issue:FoundationGames/Animatica#43

To reproduce
Steps to reproduce the behavior:
1.Install fabricskyboxes-0.7.2+mc1.19.4,fsb-interop-1.3.3+mc1.19.4-build.45 and moremcmeta-1.19.4-4.2.3-fabric
2.load any high-resolution custom skybox resourcepack

Which Minecraft versions does this bug affect?
List Minecraft versions that this bug affects.
Only tested on 1.19.2 and 1.19.4,should affect all Minecraft versions.

Mod loader
Which mod loaders does this bug affect?

  • Forge (affect some forge ports of Fabricskyboxes)
  • Fabric
  • Quilt
commented

Good news: with the initial changes, I'm seeing an improvement from 1-2 FPS to 30-40 FPS on my machine. There's still some tuning and other improvements I want to make, but this approach is yielding a significant improvement so far.

commented

Good news: with the initial changes, I'm seeing an improvement from 1-2 FPS to 30-40 FPS on my machine. There's still some tuning and other improvements I want to make, but this approach is yielding a significant improvement so far.

Could I get the latest build?I would like to try how much it has improved on my computer.

commented

Here's the latest development build for Fabric 1.20.1. (I generally develop for the latest MC version and then backport.)

I had to attach this as a .zip for GitHub to allow me to upload it.

moremcmeta-1.20.1-DEV-10-2-2023-fabric.zip

commented

This resource pack uses particularly large animation frames. There are some potential optimizations I could introduce, though I am not sure how much it will help, given the size of these frames. It's updating millions of pixels every 1/20th of a second. I will see how much of an improvement can be made.

Do you see similar performance issues when you use OptiFine only?

As a temporary workaround, you can remove the assets/minecraft/optifine/anim folder inside the pack, or try turning off interpolation.

commented

No,I have never seen similar issues on Optifine.My fps is up to 650 when using optifine only
2023-09-26_02 35 29

commented

Just FYI, this is being worked on, but it will likely take several days. I'm looking at processing these large frames with multiple threads from a cached thread pool (see dedicated branch for this issue if you are curious). It takes some time to introduce multithreading and ensure that I haven't introduced any bugs.

I'm not a huge fan of the cache solution presented in the linked Animatica issue because it can easily lead to multiple GB of extra memory. For example, one of the animations in the pack you provided would require about (1536 pixels * 1024 pixels) * (4 bytes/pixel) * (3 frames) * (40 ticks per frame) = 754,974,720 B = 720 MiB of cache. That will probably be a last resort if I can limit the memory to a manageable amount.

commented

Here is the second development version. This version disables updates for any texture that is not currently being used. So you should see a performance difference between:

  • regular gameplay
  • when a tornado is present at time 126650 in a non-desert biome (/time set 126650)
  • when auroras are present at time 114000 in a snowy biome (/time set 114000)

Can you confirm that you see a significant performance improvement in all three scenarios?

Furthermore, I've noticed that the auroras in this pack flash rapidly. Is that the way this pack is supposed to look? I don't see any issues with the tornado or other animations.

moremcmeta-1.20.1-DEV-10-3-2023-fabric.zip

commented

Fixed aurora rapid flashing.

moremcmeta-1.20.1-DEV-10-4-2023-fabric.zip

commented

image
Amazing improvement!Nice work!

commented

But I suppose there are something wrong in other ways.My FPS is much lower than it used to be when using Reimagined resourcepack,which may add some custom animated textures.
image
(with latest release)
image
(with dev build)

commented

The performance issues with Reimagined are solved as you expect.And I don't think Auroras impact performance significantly,it's acceptable.
image

commented

There is a small bug in the last build that was causing block frames to be recalculated excessively. This build should fix the issue.

moremcmeta-1.20.1-DEV-10-4-2023-2-fabric.zip

Can you confirm whether the performance issues with Reimagined are fixed? Can you also confirm that the performance is reasonable when you can see the auroras from the other pack? There will be some performance hit when the auroras are visible, but it shouldn't be as bad as before.

commented

Thanks for confirming, I am going to backport the performance enhancements to older MC versions. There should hopefully be a release tomorrow or over the weekend.

commented

MoreMcmeta v4.2.5, which contains these performance improvements, has been released. It take a few minutes for the release scripts to run and for the files to be approved by CurseForge. Thanks for reporting!