Sound Physics Remastered

Sound Physics Remastered

15M Downloads

Entities (animals) cause huge lag

VL4DST3R opened this issue ยท 7 comments

commented

Bug description

Note: This is something of a cross-post between this project and Presence Footsteps where I have posted a similar thread.

I have reasons to believe this mod is the main culprit in my situation, but I couldn't help but notice how the issue gets compounded by the other mod, so I figured mentioning it on both ends was the best course of action.

I've read that an issue related to performance issues with entities was already reported and presumably fixed before, but after recently updating my Sound Physics from soundphysics-fabric-1.20.1-1.1.1 to sound-physics-remastered-fabric-1.20.1-1.4.2 (among a few other unrelated mods) I started to notice that in one particular area of my base where it was previously fine performance-wise, now I would get notable fps drops even when outside the room itself, lower 20s or so from otherwise 60.

image

HOWEVER If Presence Footsteps is also installed/enabled (which I also had previously running together with this one just fine) it tanks to 1fps and becomes completely unplayable.

Any advice what may be causing this?

Minecraft version

1.20.1

Mod version

1.20.1-1.4.2

Mod loader and version

Fabric Loader 0.15.11

Steps to reproduce

Spawn a lot of entities (in an enclosed space?)
Enable both this mod and Presence Footsteps

Expected behavior

While I expect some performance drops given both mods are quite cpu heavy, certainly it should not be to this extent.

Log files

i get no error logs whatsoever when this occurs and enabling debug logging

Videos

i.can.see.sounds.i.can.hear.colors.720p-crf21.mp4
commented

Does the lag improve if you exclude the footstep sounds from being processed by sound physics?

commented

Does the lag improve if you exclude the footstep sounds from being processed by sound physics?

How can I do this? I can't seem to find the option within Sound Physics settings. If you're referring to disabling it within Presence Footsteps instead, then setting footsteps for player only does indeed restore the fps as if Presence Footsteps was disabled entirely. Note it is still lower than on the older version of Sound Physics, ~14fps when facing the entities to ~21 with the back turned)

image

Also for reference I rolled back my entire game install to what I had before this round of mod updates and the performance I had before (while not stellar) was ~25 fps when looking straight at the mobs (using better animations so the entity rendering itself eats most of the fps) and almost locked 60 when turned around (using entity culling) while still in the same room with them.

image

image

commented

How can I do this?

You need to add the sound ID to the allowed_sounds.properties.

What are the specs of your PC? (CPU, RAM, GPU)

commented

You need to add the sound ID to the allowed_sounds.properties.

I'm gonna assume you mean all the random vanilla *.*.step sounds from within the allowed_sounds file, as there were no sounds specifically registered by presence footsteps? With those disabled indeed the performance is back up!

Interestingly enough with SP set this way and not "hogging" the cpu so to speak, also following the suggestion on the other thread about switching footsteps to player only (i.e. no mobs) shows the huge performance drop PF was also causing when enabled, hence why having both on would demolish my fps into seconds per frame.

What are the specs of your PC? (CPU, RAM, GPU)

Way more than it should be needed to handle this I reckon XD:

Ryzen 9 5900X (12c/24t @4.5ghz)
64gb of ram of which 7are reserved to minecraft via Xmx (many mods and resourcepacks)
RTX 4090

commented

Are you facing any other performance issues while playing normally when having the footsteps disabled?
It's generally recommended to disable any sounds that are spammed a lot in your world. Every sound has a lot of processing which would obviously lag if its spammed a LOT.

commented

Are you facing any other performance issues while playing normally when having the footsteps disabled? It's generally recommended to disable any sounds that are spammed a lot in your world. Every sound has a lot of processing which would obviously lag if its spammed a LOT.

As far as I can tell no, the cpu usage is mostly stable throughout the game (gpu is basically sleeping) except when I get to this area, at which point indeed all core usage jumps up and fps dies.

The thing is that me and my friends use mostly the same mods and we intentionally shoved all the mob farms in an isolated room below us specifically to minimize entity lag felt around the base area, and it worked just fine till now, when I would basically trigger it by just getting in proximity of it, even outside. I was wondering if some culling changed that may be causing this?

If nothing else comes up I plan on taking some time later and sort of make a diff between my old install and this one, and see if there is something else that once updated is causing this. As I said, I updated (not added) a number of mods I had, so maybe it's caused by something else now acting somehow differently? I genuinely don't know why this happened now so I'm kinda grasping at straws here.

commented

The thing is that me and my friends use mostly the same mods and we intentionally shoved all the mob farms in an isolated room below us specifically to minimize entity lag felt around the base area

Yeah thats definitely hurting performance. You should avoid this at all cost or excluding these sounds from getting processed.

If nothing else comes up I plan on taking some time later and sort of make a diff between my old install and this one, and see if there is something else that once updated is causing this. As I said, I updated (not added) a number of mods I had, so maybe it's caused by something else now acting somehow differently? I genuinely don't know why this happened now so I'm kinda grasping at straws here.

We made a lot of changes in the last versions that made the mod more stable. Some of these come with the cost of performance, but were necessary to maintain compatibility with certain other mods. Theres nothing we can do about that. I'd suggest avoid having a lot of sounds spammed. If it works for you with excluding these sounds, thats also fine.