0
0

Hello,

the fmod help file confused me a little bit. First of all in the 3D sound
tutorial it says when using a [b:22w0cs32]right hand coordinate system[/b:22w0cs32] (OpenGL)
instead of a [b:22w0cs32]left hand coordinate system[/b:22w0cs32] (DirectX) one has to negate
the z components of the direction and up vector.

In the FSOUND_3D_Listener_SetAttributes description it says only the
z component of the direction vector should be negated.

So does anybody know what exactly needs to be negated (which vectors
and which components of the vectors) ? ๐Ÿ˜• If I have something like that:

[code:22w0cs32]Vector<float> Forward= Cam::ActiveCam.GetForward();
Vector<float> Upward = Cam::ActiveCam.GetUpward();
Vector<float> Pos = Cam::ActiveCam.GetPosition();

FSOUND_3D_Listener_SetAttributes(Pos.Vector, NULL, Forward.Vector[0], Forward.Vector[1], Forward.Vector[2], Upward.Vector[0], Upward.Vector[1], Upward.Vector[2]);

FSOUND_Update();[/code:22w0cs32]

How should it look with DirectX->OpenGL conversion ?

When I convert vertices from 3DSMax (left hand) to OpenGL (right hand)
I always have to flip the y,z components of a vertex and then negate the
z component.

All that confuses me at the moment, shouldn’t I also convert the
Pos.Vector in some way ? ๐Ÿ˜• Or just convert the z components
of Forward.Vector and Upward.Vector like the tutorial says ? Or
just negate the z component of the direction vector like the
FSOUND_3D_Listener_SetAttributes description says ? ๐Ÿ˜ฎ

And how should the position of a sound source be converted ?

I’m sorry for the tons of questions but maybe someone already
figured this out and has a final solution for
A) how to convert the parameters for FSOUND_3D_Listener_SetAttributes
B) how to convert the position vector of a sound source

:)

For B) I would do it like 3dsmax->OpenGL but vice versa ?!
For A) I have no idea…

  • You must to post comments
0
0

Thanks a lot. It works pretty good ๐Ÿ˜€

Another question, I noticed that also other sounds (which are not
loaded with the HW3D flag) suddenly got a 3D effect. Do I have to
OR one of the FSOUND_2D/FSOUND_HW2D flags explicitly in for all
other samples that are not loaded with the HW3D flag ? ๐Ÿ˜ฎ

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.