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
Consider to use equalpower panning model #5278
Comments
There are some documents that describe that
But I couldn't find any resource which compare the actual performance difference between them. And unclear how likely much gain we can get with So I would like to start with adding "use equalpower panning mode" in the preferences. We can test in Hubs by switching it. If we get noticable performance benefit, we can keep the preference and/or introduce smarter optimization like dynamically switching it depending on the FPS number. If we don't see actual performance improvement we may revert the change. Any thoughts? |
From the tests I ran in #5057 (comment) equalpower definitely made a noticeable difference in perf on my Android device, especially in Firefox. The "web audio perf" doc you linked also suggests there is a pretty massive difference, calling Since we have had issues with audio on Android and were considering disabling panning altogether (#5291) I think just always using equalpower on Android might be a good idea (maybe all mobile devices?). This would probably also apply on Android based VR headsets which I don't think we have heard as many complaints about, so we might consider filtering those out. As you said, ultimately we probably want to decide this based on actual system performance instead of just device detection, but I think doing it based on device type would be a good start. No strong opinion on if we also expose this as a preference, though if we do maybe we should call it something like "positional audio quality" with |
Thanks for the comment. The test is a bit too panner node intensive. Perhaps more many panner nodes than actual use. I'm not really sure how much performance gain we will get in practical use cases because I don't know how much audio processing consumes hardware resources. Even if the document mentions hrtf is very expensive, I want to test on actual devices and use cases at first.
I speculate "perf" in this context means how much the audio is fine/broken on Android devices in the tests. Likely the audio quality in the test may be related to CPU usage, but not 100% sure. I want to check the FPS number or take profiling in actual systems. The test will be easier with the preference than with forcing equalpower on mobiles. Personally I want to separately think of And the actual performance difference is unclear while the actual panning quality difference is obvious (for me). I think perhaps we will want to keep "panning model quality" in the preferences, tho this is what we should discuss later, not now. |
The panning quality difference is obvious for me between I would like to propose to introduce |
Is your feature request related to a problem? Please describe.
Three.js uses
HRTF
as panning model by default. It is higher quality but probably more costly thanequalpower
.Describe the solution you'd like
Consider to use
equalpower
as optimization. Some options how to use/switch.equalpower
. It mighe be good enough. (We should test.)equalpower
only on (low-end) mobile devicesequalpower
if the quality mode is lowAdditional context
Making benchmark test would help us determine whether we should use
equalpower
or not.The text was updated successfully, but these errors were encountered: