tipforeveryone
Bronze Supporter
|
Esenthel/Titan with FMOD intergration
I have learnt how to intergrate FMOD into Esenthel. This might extend the engine ability in sound process. So that I write down my learn process here for everyone who want to do the same thing (example codes included and updated along side my learning curve)
---
Because it is hard to write stuff in thread editor, I leave the link to public notion link here, hope this help
https://cscdvmp.notion.site/How-to-imple...08ef?pvs=4
|
|
08-04-2023 09:05 AM |
|
Esenthel
Administrator
|
RE: Esenthel/Titan with FMOD intergration
Why would you need Fmod?
|
|
08-04-2023 10:29 AM |
|
tipforeveryone
Bronze Supporter
|
RE: Esenthel/Titan with FMOD intergration
Requested by modders who use fmod studio to create their sound collection. It helps implement sound effects via banks which are built by fmodstudio too and can be adjust by many filters in realtime.
Btw, 3D sound in EE does not really provide good sound location recognition, as my experience, the 3D sound example shows that the sound source has too small volume when going behind the listener. And if sound source is in front of listener, I can hear it loud even far away.
|
|
08-04-2023 12:28 PM |
|
Esenthel
Administrator
|
RE: Esenthel/Titan with FMOD intergration
I don't have this problem.
On Windows, 3d calculations are done here:
https://github.com/Esenthel/EsenthelEngi...r.cpp#L511
I've checked and if sound is in front or behind camera (same distance), then volumes are the same.
You can check dsp.pMatrixCoefficients[0..3] all are 0.25
I have headphones (2 channels).
You might get different results if you have surround system.
Calculations are done by 'X3DAudioCalculate'
|
|
08-04-2023 03:55 PM |
|
tipforeveryone
Bronze Supporter
|
RE: Esenthel/Titan with FMOD intergration
https://streamable.com/ueousa Here you are. pay attention to the moment that sound source goes behind camera (listener) and front, the volume suddenly changes. too small even behind but close to listener but still loud (normal) when in front
Mine is headphone too, computer use generic Realtek audio system
|
|
08-04-2023 04:16 PM |
|
Esenthel
Administrator
|
RE: Esenthel/Titan with FMOD intergration
That's weird because I don't have this problem, it works completely fine for me.
You can observe how the dsp.pMatrixCoefficients[0..3] values change from the source code, that will help you narrow down the problem.
|
|
08-05-2023 06:41 AM |
|
tipforeveryone
Bronze Supporter
|
RE: Esenthel/Titan with FMOD intergration
(08-05-2023 06:41 AM)Esenthel Wrote: That's weird because I don't have this problem, it works completely fine for me.
You can observe how the dsp.pMatrixCoefficients[0..3] values change from the source code, that will help you narrow down the problem.
I still cant figure it out how to fix this, not only my computer, many others has the same problem. Here I have a very simple code setup for Listener
Code:
// In Update() function
sound.pos(pos);
if(Kb.b(KB_W)) pos.z += 0.05;
if(Kb.b(KB_S)) pos.z -= 0.05;
if(Kb.b(KB_A)) pos.x -= 0.05;
if(Kb.b(KB_D)) pos.x += 0.05;
Listener
.orn(Vec(0, 0, 1), Vec(0, 1, 0)) //Camera has the same matrix so i dont write it here
.pos(Vec(0, 0, 0));
// In Draw() function
D.text(0, 0.9, S+pos);
And here is the video https://streamable.com/eqi13d
when Z value of pos change between > and < 0, sound changes suddenly
and when sound is on the right(or left) size, move sound along Z axis will make ear on the other side hear the sound suddenly too
I think this is a serious problem
|
|
03-17-2024 07:30 PM |
|
Esenthel
Administrator
|
RE: Esenthel/Titan with FMOD intergration
You need to debug
void SoundBuffer::set3DParams(C _Sound &sound, Bool pos_range, Bool speed)
and check values of
dsp.pMatrixCoefficients
dsp.DstChannelCount should be 2 if you have 2 stereo speakers, maybe you don't have, and that's why something like that happens.
|
|
03-18-2024 07:51 AM |
|
Esenthel
Administrator
|
RE: Esenthel/Titan with FMOD intergration
|
|
03-18-2024 02:18 PM |
|