Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heavy fps drop with animated item in hand #34

Open
harithmf opened this issue Dec 5, 2023 · 16 comments
Open

heavy fps drop with animated item in hand #34

harithmf opened this issue Dec 5, 2023 · 16 comments

Comments

@harithmf
Copy link

harithmf commented Dec 5, 2023

when holding an animated item, my fps drops to around 40 or 30

@MehVahdJukaar
Copy link
Owner

Can you give an example of animated item you are using?

@harithmf
Copy link
Author

harithmf commented Dec 6, 2023

Can you give an example of animated item you are using?

https://streamable.com/u4arex

the book i believe was from simply swords

@MehVahdJukaar
Copy link
Owner

Can you try a normal vanilla item with animated texture? From texture pack or something

@harithmf
Copy link
Author

harithmf commented Dec 6, 2023

it seems only simply swords items lags. im looking at amethyst imbuement items that are animated and they seem fine

@MehVahdJukaar
Copy link
Owner

Take a spark profiler of that old. Something is off and might be on their end

@Korothi
Copy link

Korothi commented Feb 14, 2024

is it possible to disable all animations using a mod?

@King0fgames
Copy link

the simplyswords unique weapons are especially bad with this, watching warglaive if you need an example to test with

@MehVahdJukaar
Copy link
Owner

Once again I need a spark report. Also animated items work fine. This is specifically something with simplyswords

@King0fgames
Copy link

Apologies, here is a spark report. Haven't used it before so if I did something wrong, let me know. Should I report this to the simplyswords devs as well? https://spark.lucko.me/Le4E6FfDVp

@MehVahdJukaar
Copy link
Owner

i dont see it lagging in that report. Modelfix doesnt even show up in there (as its its expected behavior as models are modified and slightly alered logicis just run there on texture reload, mod doesnt do anyting else beside that, this is why this issue seems so messed up, that mod must be doig some real hackeries).
Are you sure you got the report while holding those items?

@embeddedt
Copy link

Here is a profile with just Model Gap Fix and Simply Swords installed, looking at the bottom of the Simply Swords creative menu.

I can confirm that performance is noticeably better when MGF is removed. The bottleneck appears to be the actual rendering of vertex data, so is it possible that MGF causes more individual quads to be generated?

@MehVahdJukaar
Copy link
Owner

Thanks for taking the time to get the profile. More quads could explain it however this would also have to happen without simply swords. I see some methods called that are only supposed to be called when resource packs are reloaded, the one responsible to generate the quads for the generated models. Those "only" take up 2% which is still a lot. I'm not sure what's going on, even if that mod were to recreate new generated models every single frame for those items it wouldn't explain why this would not have the same effects in vanilla only

@MehVahdJukaar
Copy link
Owner

To add to this I would actually expect opposite behaviour if it was due to too many quads as the mod tries to optimize those models to use merged quads when possible

@MehVahdJukaar
Copy link
Owner

Here's whats happening:
this mod has various way to try to mitigate gaps. main way is super simple and just disable atlas shrink ration.
I have however 2 other ways to mitigate it incase that doesnt work as it can still be hardware dependant.

One of the consists in making the side quads of the generated item models a bit bigger. This however can only be done to quads that do not have transparent pixels in between. If i were to do so another gap would appear logically as the pixels are slightly pushed apart and enlarged, making the center part of the quads show its (invisible) pixels.
To contrast this i am infact creating new quads for all continuous pixels unlike vanilla that just has 1 that include both transparent and non pixels

The reason its so bad with that mod is that it has 32x32 textures which greatly increase the number of quads to begin with, and most of those do fall in that category of having many pixels in the same row or column with transparent pixels between them so the mod will have created more quads.

This quad expansion stuff is only a secondary way for the mod to function and was meant to be there as a bonus. Aparently i left it on by default but disabling this (setting expansion to 0 in the configs) will get rid of this

I'll publish an updated verson with this config off by default as it was meant to be

@ShadowTech99001
Copy link

Any fix for this? It's not just Simply Swords also

@embeddedt
Copy link

It should be fixed in the latest version but you may have to reset the config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants