Xonotic Forums

Full Version: material specific footstep sounds
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
At the moment, the footstep sound is the same no matter what surface you are walking on. what would improve the feeling of the game a great deal is if a different sound was played for different surfaces, such as wood, grass, metal, water, etc.

implementing this would involve creating a way for the engine to detect different materials, and making sounds for the different materials.

would it be possible to add some information in the shader file of the texture that darkplaces could use to detect when to play certain sounds?

EDIT: oops, I meant to post this in the suggestions subforum XD
I'd also like material specific footstep sounds, but I think that would be much more work for the mappers!

@mods: please move!
the way i see it, if the information could be added to the shader file, mapper's won't have to do ANYTHING. the information will already be there.

it will be work going through adding the information to the shader's, but I am willing to help with that.
In the Source engine, things like footstep sound are defined by a "surfaceprop" file, which is connected to a material or texture. Implementing footstep sounds in DarkPlaces would require all textures to have a material associated with them. I'd imagine the code for this wouldn't be too difficult, but the manual assignment of materials would take a while.
Then what's metalclip?
Quake 3 has it via surfaceparam flags for metalsteps and nosteps, but the outcome is bad.
With Urban Terror maps I used a program (bsp-redone) to import/export surface types from the Quake3 BSP files (source here)

Quote:The textures lump stores information about surfaces and volumes, which are in turn associated with faces, brushes, and brushsides. There are a total of length / sizeof(texture) records in the lump, where length is the size of the lump itself, as specified in the lump directory.

texture

string[64] name Texture name.
int flags Surface flags.
int contents Content flags.

I think that it uses the flags field to store the value.
The engine, when reading the bsp file, can asociate the surface and its sound.