Jump to content

q3map_material and/or shader questions


Recommended Posts

First of all, I was working with a map I wanted to make footsteps sound different walking on different types of material/shaders. I tried to find info online about q3map_material "materials" and it was hard to find information about what parameters work with JK2 vs JKA.

 

Such as : q3map_material solidmetal

 

I searched this web site and many others looking for an answer.  I did find one post somewhere where someone said they found some commands in the jamp.exe (I did not read how this was done).  What they posted was this list:

plaster, carpet, tiles, plastic ,rubber, rock, canvas, fabric, greenleaves, dryleaves, bpglass, mud, flesh, ice
snow, water, marble, concrete, glass, gravel, sand, dirt, longgrass, shortgrass, hollowmetal, solidmetal, hollowwood, solidwood

 

I was wondering if these were correct or work for JKA?  A couple in JKA sound the same or similar. I have tried some in JK2 and looking inside JK2 some I can see the footsteps sound files are much less in JK2 compared to JKA.

 

Also, am I missing something or are these options posted on jkhub?  Different q3map_material types for JK2 and JK3?  Is it possible to add new q3map_materials or is there a way to add sound to a shader file to make footsteps?  If so what do I add to the shader file to make it work?  I think I added sound to a shader a long time ago but I don't remember how I tried, if it worked or if I found a solution.  I have looked many places online and JKHub but can't seem to find an answer.

 

 

Link to comment

Yes I looked.  I searched yahoo and google also.  I couldn't find a definitive list of materials except for the one I posted above and I don't remember where I found it but they said it was a list from jamp.exe I think maybe from a source file or something.  Looking at the footsteps directory it also isn't exactly clear on which one is what exactly.  And I've seen nothing about making a new q3map_material to add to the game for use in shaders.  JK2 has 4 materials it looks like that don't involve water but the materials in radiant aren't exactly spelled the same.  JKA has a few.

 

And I didn't see any info about adding a custom sound to a shader to work in the same way a q3map_material would.

Link to comment

I remember I was searching desperately for this too. I think I even asked the OpenJK guys to add support for it before I realized what OpenJK was.

 

From the shader manual:

 

4.8.8 metalsteps
The player sounds as if he is walking on clanging metal steps or gratings. Other than specifiying fleshmetalstepsnosteps, or default (i.e.; specify nothing) it is currently not possible for a designer to create or assign a specific sound routine to a texture. Note: If no sound is set for a texture, then the default footsteps sound routines are heard.

 

 

I don't know if that's entirely accurate for JKA, but it could seem like there's not a way without code editing to add new sounds. I'm a tiny bit skeptical to include new builds of code with my maps too though, since people would have it in their base and it would be affecting/possibly crashing with other mods(?)

Link to comment

The parameters I found above were found by someone who found them in JKA uncompiled code.  I omitted a couple i think were shatterglass and armor (maybe computer also.)  It kind of looks like in the code some of the parameters may play the same sound.

 

I am still unable to find JK2 specifics for materials exactly.  Looking through some of the source code help a little bit.  Looks like JK2 has sounds for default, metalsteps or(metal) and stonesteps (or stone).  The water is for water walk run and wade.  Part of what I found was this:

 

+    FOOTSTEP_NORMAL, +    FOOTSTEP_METAL, +    FOOTSTEP_SPLASH, +    FOOTSTEP_WADE, +    FOOTSTEP_SWIM,

 

 

Also I see this in JK2 source code:

 

Com_sprintf (name, sizeof(name), "sound/player/footsteps/stone_step%i.wav", i+1); +        cgs.media.footsteps[FOOTSTEP_NORMAL] = cgi_S_RegisterSound (name); + +        Com_sprintf (name, sizeof(name), "sound/player/footsteps/metal_step%i.wav", i+1); +        cgs.media.footsteps[FOOTSTEP_METAL] = cgi_S_RegisterSound (name); + +        Com_sprintf (name, sizeof(name), "sound/player/footsteps/water_run%i.wav", i+1); +        cgs.media.footsteps[FOOTSTEP_SPLASH] = cgi_S_RegisterSound (name); + +        Com_sprintf (name, sizeof(name), "sound/player/footsteps/water_walk%i.wav", i+1); +        cgs.media.footsteps[FOOTSTEP_WADE] = cgi_S_RegisterSound (name); + +        Com_sprintf (name, sizeof(name), "sound/player/footsteps/water_wade_0%i.wav", i+1); +        cgs.media.footsteps[FOOTSTEP_SWIM] = cgi_S_RegisterSound (name); +

 

 

 

I haven't checked them in game atm though.  And you can't make new ones without recompiling code so that's not an option.  Looks like the only way to make new ones is to supply new sounds to overwrite the old ones then assign them to the shaders material I want to assign.  However JK2 looks quite limited in this respect compared to JKA.

 

You can add gfx to a shader, I was also asking in my post if a sfx could be added to a shader other than having to stretch a trigger over the brush?

Link to comment

 

I haven't checked them in game atm though.  And you can't make new ones without recompiling code so that's not an option.  Looks like the only way to make new ones is to supply new sounds to overwrite the old ones then assign them to the shaders material I want to assign.  However JK2 looks quite limited in this respect compared to JKA.

 

You can add gfx to a shader, I was also asking in my post if a sfx could be added to a shader other than having to stretch a trigger over the brush?

 

The reason why I'm skeptical to replace them is because it would replace the sounds no matter if people were playing on your map or not. So if you switched out one of the default footsteps to something more convincing, but people would rather play with the sounds they're used to, they'd have to take your map out of their base.

 

What do you mean about adding gfx/sfx to a shader? What do you want to make happen?

Link to comment

Well footsteps would be more complicated than just adding a sound to a shader.  It just wouldn't work right because of how much more complex footsteps sounds are in JK.

 

Also trying to track down sound sets for JK2....I think it's the same as the problem with footsteps having the soundset defined in the code.  I have not tested this though.  Could a sound set be used only if the key has the value?

 

ex:  key : soundset     value: sound/movers/new_soundset

 

then in the sound/movers folder place new_soundset_start.mp3,  new_soundset_stop.mp3, new_soundset_move.mp3, new_soundset_move_lp.mp3

 

I kinda don't think that would work but I haven't tested it to know for sure.  If anyone knows a solution I'd be glad to hear it.  I think this can be done in GTK without using a soundset, I was just wondering if new soundsets can be added also.

 

 

Yeah replacing footsteps in an added pk3 would replace the sounds but if that's the only option to make me happy I guess I would do it.  A pk3 can always be removed.  I mainly was thinking about JO footsteps and not JA, I am pretty happy with the JA footsteps and having the material parameter in the shader doesn't cause JK2 any problems but will still work in JA.  And I can live without being able to add new soundsets lol.

 

Gfx added to a shader wouldn't work either for footsteps to work correctly after contemplating a few things.  It's more than just footsteps that is being determined, landing , walking and running....just wouldn't work.  Too much info to tell JK2 what to do only using a shader and a sound file. 

Boothand likes this
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...