Forum

Effects for Sound Effects

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Postby Spike » Mon Feb 09, 2009 12:58 am

Baker wrote:But really, Spike said enough ...


Four months ago, I might add.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Baker » Mon Feb 09, 2009 4:41 am

http://connect.creativelabs.com/developer/Gaming

To specify an environment, use an integer constant defined in the eax.h file.
Those environment constants are:
n EAX_ENVIRONMENT_GENERIC
n EAX_ENVIRONMENT_PADDEDCELL
n EAX_ENVIRONMENT_ROOM
n EAX_ENVIRONMENT_BATHROOM
n EAX_ENVIRONMENT_LIVINGROOM
n EAX_ENVIRONMENT_STONEROOM
n EAX_ENVIRONMENT_AUDITORIUM
n EAX_ENVIRONMENT_CONCERTHALL
n EAX_ENVIRONMENT_CAVE
n EAX_ENVIRONMENT_ARENA
n EAX_ENVIRONMENT_HANGAR
n EAX_ENVIRONMENT_CARPETEDHALLWAY
n EAX_ENVIRONMENT_HALLWAY
n EAX_ENVIRONMENT_STONECORRIDOR
n EAX_ENVIRONMENT_ALLEY
n EAX_ENVIRONMENT_FOREST
n EAX_ENVIRONMENT_CITY
n EAX_ENVIRONMENT_MOUNTAINS
n EAX_ENVIRONMENT_QUARRY
n EAX_ENVIRONMENT_PLAIN
n EAX_ENVIRONMENT_PARKINGLOT
n EAX_ENVIRONMENT_SEWERPIPE
n EAX_ENVIRONMENT_UNDERWATER
n EAX_ENVIRONMENT_DRUGGED
n EAX_ENVIRONMENT_DIZZY
n EAX_ENVIRONMENT_PSYCHOTIC


Looks like the basics of this could probably be used fairly easily.

/But using it in a non-hacky way would require some work
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby Spike » Mon Feb 09, 2009 10:07 am

EAX can provide finer control than that.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby mh » Mon Feb 09, 2009 1:06 pm

They look like the very same preset effects that DirectSound provides (as well as finer control through custom effects).

DSFX_I3DL2_ENVIRONMENT_PRESET_DEFAULT
DSFX_I3DL2_ENVIRONMENT_PRESET_GENERIC
DSFX_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL
DSFX_I3DL2_ENVIRONMENT_PRESET_ROOM
DSFX_I3DL2_ENVIRONMENT_PRESET_BATHROOM
DSFX_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM
DSFX_I3DL2_ENVIRONMENT_PRESET_STONEROOM
DSFX_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM
DSFX_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL
DSFX_I3DL2_ENVIRONMENT_PRESET_CAVE
DSFX_I3DL2_ENVIRONMENT_PRESET_ARENA
DSFX_I3DL2_ENVIRONMENT_PRESET_HANGAR
DSFX_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY
DSFX_I3DL2_ENVIRONMENT_PRESET_HALLWAY
DSFX_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR
DSFX_I3DL2_ENVIRONMENT_PRESET_ALLEY
DSFX_I3DL2_ENVIRONMENT_PRESET_FOREST
DSFX_I3DL2_ENVIRONMENT_PRESET_CITY
DSFX_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS
DSFX_I3DL2_ENVIRONMENT_PRESET_QUARRY
DSFX_I3DL2_ENVIRONMENT_PRESET_PLAIN
DSFX_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT
DSFX_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE
DSFX_I3DL2_ENVIRONMENT_PRESET_UNDERWATER
DSFX_I3DL2_ENVIRONMENT_PRESET_SMALLROOM
DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM
DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEROOM
DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL
DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEHALL
DSFX_I3DL2_ENVIRONMENT_PRESET_PLATE

I think the presets look fine for Quake usage; maybe create a number of Secondary Buffers each of which has an effect assigned to it (I'm thinking stone room, cave, stone corridor, underwater, and perhaps one of drugged or dizzy for pain scenes), then mix the sound in software into the appropriate secondary buffer depending on the environment. This is much the same way as Quake already does things (mixing in software into a secondary buffer) only the actual secondary buffer that's used can be selectable. It should be possible to determine which of the "above water" effects to use depending on factors like the amount of visible surfs (more = a larger environment) and whether or not sky is visible. Hacky alright, but might be serviceable enough.

It'll require a bit of jiggerypokery in the sound code to make the secondary buffer being used selectable of course, but should be doable enough.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Urre » Mon Feb 09, 2009 3:14 pm

If this is actually implemented, it'd need to be made into builtins for qc if anything, not hacky ways to determine which is appropriate in the current scene decided by engine alone. Engine handling postprocessing effects on sounds is only appropriate if it has a true 3D sound engine, which can bounce sounds off the environment, with modifier values in the surfaces shader files. Static effects like these are best left for the modder, cause you can never handle all cases appropriately.
I was once a Quake modder
User avatar
Urre
 
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon

Postby FrikaC » Mon Feb 09, 2009 5:17 pm

MDave wrote:But it still lacks things HL does. And it doesn't have a software rendering mode. :( And there is no chance of porting the engine to an embedded device or other low spec platforms because of its much higher requirements :P This might not sound important to people that just like to mod on the PC, but its rather important for people that use it on other devices or platforms.

I love QC though :)


Quake has software and has been ported to loads of other platforms already. The things in DP that require a higher spec machine are not typically the things that mods really require. So right now, making a mod for Quake is already super portable and you can use the DP features optionally on the PC.

My hope is that people who make ports of Quake start integrating some of the DP modding features in the future, but there really isn't a good source base for them to do so right now.

Half Life is a mess to mod for, complicated even more now with Steam.
FrikaC
Site Admin
 
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Postby mh » Mon Feb 09, 2009 5:31 pm

Urre wrote:If this is actually implemented, it'd need to be made into builtins for qc if anything, not hacky ways to determine which is appropriate in the current scene decided by engine alone. Engine handling postprocessing effects on sounds is only appropriate if it has a true 3D sound engine, which can bounce sounds off the environment, with modifier values in the surfaces shader files. Static effects like these are best left for the modder, cause you can never handle all cases appropriately.

True enough, but I wonder how many modders would use them. Would any modders use them?

I was also thinking that maybe an extension to the BSP file would be another way.

Anyway, that aside, I think underwater is fair game for the engine - it's already done with graphics (GLQuake, WinQuake, any engines that do underwater warps) so it's expected behaviour.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby FrikaC » Mon Feb 09, 2009 6:02 pm

Actually I'd prefer the engine to try to determine the effect to use, but provide some builtin to override it in the cases the mod wants to use something specific or potentially different from what the auto-determination does.

I think that should be the general model for modder/engine stuff - do whatever you want engine side but give a way for the modder to alter it if it doesn't fit their mod and a way for the players to disable it if they don't like the effect.
FrikaC
Site Admin
 
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Postby Urre » Mon Feb 09, 2009 6:24 pm

Frik said it.

But yeah I can see modders using it, I would. But then again I only use DP (cause of the modder features).
I was once a Quake modder
User avatar
Urre
 
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon

Previous

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest