Model Gap Fix

Model Gap Fix

23M Downloads

heavy fps drop with animated item in hand

harithmf opened this issue ยท 18 comments

commented

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

commented

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

commented

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

commented

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

commented

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

commented

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

commented

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

commented

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?

commented

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?

commented

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

commented

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

commented

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

https://streamable.com/u4arex

the book i believe was from simply swords

commented

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

commented

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

commented

is it possible to disable all animations using a mod?

commented

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

commented

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

commented

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

Didn't see this, thank you

commented

i had similar fps issues in certain places on one server. not related to holding items but editing config to make quad expansion 0.0 instead 0.002 fixed my fps problems. also disabling continuity's emmisive textures also makes fps normal. hope this helps.