Jump to content
The Dark Mod Forums

Ishtvan

Member
  • Posts

    14796
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Ishtvan

  1. Presumably they do, because that's where Oddity said he found this information, in a 3d modeling for games forum...
  2. Ishtvan

    Prelates

    Badass!! I bet having the armor over the robe like that would cause some major chafing though... maybe that's why they're angry all the time!
  3. That's actually an intersting question, because in reality, people's field of vision (in degrees) is narrower in the vertical direction than the horizontal direction. Plus, people naturally look from side to side, but do not often look up at the ceiling. vanilla Doom3 uses a cone field of view, you specify the cone angle and it spreads equally in all directions. So to implemented the fact that people have a narrow vertical view, we would have to do a slightly different field of view calculation. Both of these things can be done with scripting. Doom3 scripting is pretty powerful. Scripters will be able to call a function like AlertAI( amount ), in addition to AI being automatically alerted by sight, sound and touch. So for the example with the birds, you would just call AlertAI() in the script if the player walked near enough to the birds to trigger them.
  4. Doesn't D3 have code to bind two models together? I thought I saw something like that for weapons or something. Of course using it unwisely might result in T3-like jewelry.
  5. I only know this because I was a forum lurker whore on the Unreal Tournament : Infiltration forums for so long. I believe it somehow also makes distances in front of you look shorter than they actually are (like 100m away will look like 80m), but I'm not sure how that works.
  6. I'm not sure about AI fighting for you. We are definitely planning to have AI able to fight eachother though.
  7. Ishtvan

    Footsteps

    Update: I noticed in the D3 sounds file (pak003.pk4), they have several sounds for "stoneimpact_*" and "woodimpact_*" I dont know if it's implemented yet. They're probably intended to be the sound a bullet would make, but maybe we could use some of them for arrows as well. The wood ones sound good!
  8. Okay another question for oddity: Do you know about what frame in the attack animation the fist is making contact with the player? I need to know that to add in the damage and knockback when it punches you in the face EDIT: Nevermind I didn't know it could tell you the frame number when you play the anim in the editor.. it looks like the instant of fist-to-face contact is somewhere around frame 10.
  9. We still have ways to go. I hope I'm not revealing too much though by saying that, as of today, our AI see and hear So if you were excitedly waiting to play a game against blind and deaf AI, I'm sorry to disappoint you.
  10. Well the thing is: Going from our real life field of view, which is something like 160 degrees horizontal, to a monitor which takes up maybe 90 degrees of our view, when you're sitting at a reasonable distance in front of it. So until whatever company makes VR wrap-around goggles a commodity, playing a game on a monitor IS like looking thru a lens because it has to compress that 160 degrees down to 90 degrees somehow. The result is that stuff around the edges get distorted. You could only display 90 degrees of the vision arc and be 100% accurate, but then it would look like you were wearing horse blinders or looking thru a narrow opening in a helmet or something. So if you have a model in a 3d engine, on a monitor, it CANNOT look good from every perspective, because the edges of your vision will always be slightly distorted. So a model maker has to make the decision: At what angle will the player MOST OFTEN look at this model, and at what distance? The answer is pretty clearly eye level, and a medium distance. You COULD make the boots look the perfect size, and it would look right if you looked right at the boots, but then when you move your view back up to your regular eye level, the boots would move to the edge of the screen, getting compressed and looking ridiculously small. So I guess model makers have a decision to make, and the route Oddity has chosen (and apparently a lot of other professional modelers) is to assume the player will usually be looking eye to eye with the model. This means that the model's head is about in the center of the screen, and the boots are towards the bottom of the screen, where the "lens" distortion/compression of distances effect is the greatest. So they make the boots a little bigger than they "should" be, to compensate for the shrinking of distances that takes place near the edges of the screen (ie, where the boots would be if the player looks eye to eye with the AI).
  11. I have CVS access but don't know where model files are supposed to go.
  12. Okay, thanks. Sorry, I must have missed your post ealier on the animation frame numbers.
  13. @Oddity: I would like to do a CVS update very soon that will include your Revenant models. In the zip file you have on ftp, they are put in the directory "darkmod/models/mymodels" Is this the location you modeler guys want to have them in CVS? Or should we add a new folder like models/characters (/char for short)? Also the same goes for the "mytextures" folder in textures. I have no idea where this stuff is supposed to go, and I want to put it in the right place when I update CVS, so we don't have to remove them from CVS and re-place them later. What's the SOP on this? Also, it would be awesome if you could put a .zip file on the ftp with all the necessary files in the correct paths, once we decide what those are. But if you don't have time to do that, you guys can just tell me the paths you want and I'll put them there. ALSO: Any news on what frames in the animation should have footsteps? I can try and judge it myself, but this will take type, and I'm no animator/sound editor, so the sync up to the animation may be crap But once I know what frames to put in the footsteps, adding footstep sounds for the Revenant will be a a very simple matter of editing only 2 or 3 lines in the def file. I want to get footsteps on them so you can hear them move around as they patrol (although NH's Benny humming impersonation is doing a pretty good job of that right now
  14. This is a dumb question, but what's the best way to convert to Unix linefeeds after you've written a file from scratch in notepad or something.. can you just "save as" and choose ASCII or something?
  15. I think realistically, a high value on the hard-o-meter should negate the "wall hugging" bonus as well, 'cause you know, AI are going to be bumping into that thing all the time if they're walking past you in the hallway. Also, if the hard-o-meter is within the "semi" range, your dong may be used as a poor substitute for a blackjack (you have to stand on a table or jump pretty high to reach the AI's head though.) Think about how AWESOME that would make our stats screen:
  16. @Sax : Yeah, glad to hear you're back in business and feeling better! @Pak: About the "body crumpling to the ground" sound: D3 supports sounds that happen whenever the joints of an Articulated Figure move. I'm not sure how realistic it would look if an AI fell to the ground and the ragdoll flops around in different ways, but the sound is always the same regardless of how long the ragdoll takes to fall, etc. It might work better to record (or slice up that sound) into individual sounds for like joints bending, arms and legs scraping the ground, etc, then the final impact for when most of the AF hits the ground.
  17. Wow.. speechless. Don't have anything useful to say, just wanted to throw in my support for an awesome model.
  18. Happy Birthday Man! (even tho it is not really your birthday and this is just some prank right?)
  19. Ishtvan

    Footsteps

    Appendix 2. Sound Prop (or Step 4: Adding your sound to sound prop) SUBJECT TO CHANGE because I'm still finalizing soundprop code I'm writing sound prop to work in a very similar fashion to how actual sounds are played. This means that, just as you added "snd_footstep_wood" to the entity def, to have that sound propagated, you will add "sndpS_footstep_wood", and instead of a global soundshader for the value of this key, you put in a global propagated sound (I'm still working on how to define those). This is how you'd do it with the current soundprop build (SUBJECT TO CHANGE): Add to the player.def file: "sndpS_footstep_wood" "sndpGS_footstep_default:1,1" Note: in sndpS, the S stands for "suspicious sound" as opposed to sndpE, which stand for "environmental sound." In sndpGS, the "G" stands for "global," and the "S" still stands for "suspicious sound" When you call a global sound from sound prop, you can modify some values from the default. The syntax is: "sndpGS_<global sound name>:<volume multiplier>,<duration multiplier>" This is so we don't have to write a bunch of definitions for different materials, AI with louder footsteps, etc, we can just modify the volume and duration of the same footstep. In this example, I assumed footstep_default was the same as footstep_wood. These modifiers are optional, so you could have also written: "sndpS_footstep_wood" "sndpGS_footstep_default" and it would work the same. Supposing we want a stone footstep, that's louder and lasts slightly longer (due to reverb or something). You'd write the following: In player.def "sndpS_footstep_stone" "sndpGS_footstep_default:1.5,1.3" So the volume of footstep_stone will be 1.5x the volume of the default footstep (in dB), and the duration will be 1.3x the duration of the default footstep (in milliseconds). Side note: As I understand it, sounds are psychoacoustically perceived as being louder as the duration increases up to 200 mS, above which they sound the same (assuming the amplitude doesn't change for the whole sound duration, which is the assumption we're making for "impulse sound" sound propagation). So for our purposes, propagating a sound with duration over 200 mS will not change anything.
  20. Ishtvan

    Footsteps

    [EDIT: Dammit, after writing this, I found a tutorial on the exact same topic in D3World from January! Here is the link to that, it is better in some respects than this one: D3World Tutorial http://www.doom3world.org/phpbb2/viewtopic.php?t=8503 ] How to add different footstep sounds for different materials Step 0. Sound Guys: Record the footstep sounds Self explanatory Step 1. Mapper/Texture Editor Guys: Write the Material File -If you created a new material, make sure you set the surface type for that material to the appropriate thing (eg, Wood, Stone, etc). The bad news is: It looks like parsing of material files is precompiled and we don't have the source for it, so we cannot add a new surface type keyword in addition to the existing ones. EDIT: THIS IS WRONG! You can add a surface type to the definition in GameLocal.cpp, and apparently it will be automatically parsed in the material file. So we can add as many surfaces as we want by changing that line in game_local.cpp Here's the list of surfaces in vanilla D3 (from game_local.cpp) : List of D3 Surface Types Allowed on a Material: How to add the surface type in a material file Very simple: Just put the surface name on a line by itself. Example from hell.mtr textures/hell/qfloor { stone // <--- there's the surface type! qer_editorimage textures/hell/qfloor_ed bumpmap addnormals( textures/hell/qfloor_local.tga, heightmap (textures/hell/qfloor_h.tga, 5 ) ) diffusemap textures/hell/qfloor.tga specularmap textures/hell/qfloor_s.tga } So you just put the surface type in there. I don't think it has to be at the top, that's just a coincidence. Step 2. Sound Guys: Add the footstep sound to the entity def file In the entity.def (or the base definition if the entity inherits sounds from another entity), you must include the key/value pair: KEY: "snd_footstep_<surface name>" VALUE: <the sound shader you want it to play> Example: To add sounds for the player stepping on wood surfaces: In player.def "snd_footstep_wood" "footstep_wood" NOTE: In this case, this means we have to have a soundshader called "footstep_wood." The soundshader name doesn't have to be called footstep, but to work properly, the key on the left MUST be "snd_footstep_<surface>", where surface is one of the defined surface types. Step 3. Sound Guys: Write the soundshader Assuming a soundshader does not already exist for footsteps on the surface in question, you'll have to write the soundshader yourself. There is already a lot of documentation on iddevnet, etc. on how to write soundshaders, so I'll just go over it briefly. Assuming you have recorded some wood footstep sounds and put them in sounds/footsteps/wood_01.ogg, wood_02.ogg etc. In some soundshader file: (it could be in player.sndshd, or we could make our own footstep.sndshd to group all footsteps together, that's an organizational question and doesn't matter for the purposes of the example) footstep_wood { minDistance 1 maxDistance 15 volume 0 no_dups sound/footsteps/wood_01.ogg sound/footsteps/wood_02.ogg sound/footsteps/wood_03.ogg // and so on } You're done! If the mapper now places the texture with surface type "wood" in their map, and the player steps on it, it will play the correct sound. Appendix 1. Problem with vanilla D3 D3 knows when to play a footstep sound because in the entity .def file, there are a bunch of animation defs, and in them, it will say something like Within the def file, within the def of an animation (eg anim_runforward) There are different animations for running, walking etc. So D3 will play the footstep sound more frequently for running than for walking. However, in real life, running vs walking also effects the volume of your footsteps (because you're coming down harder on the ground when running). As is, D3 does not change the volume to reflect which movement animation is playing (run/walk/etc). So we will have to modify PlayFootStepSound to take this into account as well. IMO, the most simple modification would be to set some movement state when we are walking/running/crouch walking, etc. And then have PlayFootStepSound check this movement state and modify the volume of the soundshader before playing it.
  21. Ishtvan

    Footsteps

    EDIT: Don't bother reading this entire thread if you don't care to... I posted a thread in Documentation that explains this much better. The only really relevant part is the last post on adding sounds to SoundProp Brief note: It looks like D3 already has a system in place for playing different footstep sounds based on the material you're walking on. Here's the code in idActor void idActor::PlayFootStepSound( void ) { const char *sound = NULL; const idMaterial *material; if ( !GetPhysics()->HasGroundContacts() ) { return; } // start footstep sound based on material type material = GetPhysics()->GetContact( 0 ).material; if ( material != NULL ) { sound = spawnArgs.GetString( lva( "snd_footstep_%s", gameLocal.sufaceTypeNames[ material->GetSurfaceType() ] ) ); } if ( *sound == '\0' ) { sound = spawnArgs.GetString( "snd_footstep" ); } if ( *sound != '\0' ) { StartSoundShader( declManager->FindSound( sound ), SND_CHANNEL_BODY, 0, false, NULL ); PropSoundDirect( static_cast<const char *>( localSound ), true, false ); } } In game_local.h: static const char * sufaceTypeNames[ MAX_SURFACE_TYPES ]; // text names for surface types In game_local.cpp: const char *idGameLocal::sufaceTypeNames[ MAX_SURFACE_TYPES ] = { "none", "metal", "stone", "flesh", "wood", "cardboard", "liquid", "glass", "plastic", "ricochet", "surftype10", "surftype11", "surftype12", "surftype13", "surftype14", "surftype15" }; Conclusion: When a footstep happens, D3 checks the material of the ground. Several materials are already defined, including metal, stone, wood, liquid, glass, etc... However, D3 did not really record sounds for different materials and implement this. If you look in player.def, there is only one "snd_footstep" and it is linked to "player_sounds_footstep" (the default footstep sound). This is a link to the soundshader, and you can see the actual soundshader files that get played in player.sndshd: player.sndshd So while it looks like there are sounds recorded, and a soundshader defined for players stepping on dirt, there is no "snd_footstep_dirt" in the player.def, so this will never be called. Stay tuned for the next post in this thread where I'll try and guess how we actually make use of this.
  22. Cool, thanks, I'm probably going to sleep now, so it will have to wait until I next have some time.
  23. Could you or someone update the non-leaking map to either ftp or CVS so those of us that are editor-challenged can play the map?
  24. I think both sound power level and sound pressure level at 1m are in dB. When a sound program outputs a volume in dB, that is probably the sound power level going to your speakers right? Using the same format as D3 is fine, but you'll still need to provide a volume for 'suspicious sounds' to balance for gameplay reasons, etc. Propagated sounds will sort've be a separate definition in a def file. So footsteps on different materials could have several different actual sounds, but for propagation there might be only one existing "default footstep," and the player object would multiply the propagated volume by some amount based on how fast you're moving (creeping/walking/running/crouching) and what material you're on (wood/tile etc)
  25. Question : How do you guys want to input the volume of sounds? Do you want to do sound pressure level measured at 1 meter, assuming you're in an anechoic chamber, or would you rather input absolute sound power level for the sound? It's pretty easy to code one or the other, since SPL at 1 m = SWL - 11 (for spherical spreading, or - 8 for half-spherical spreading). So I'll just put in whatever's easier for sound designers, I just need to know which is easier to put in realistic values for. A whisper has SWL of 25 dB, and SPL at 1 meter of 14 dB. Just lemme know which it is easier to obtain real values for, and I'll code it that way. [side note:] One advantage of using SWL is we could actually do physics-based sound somewhat correctly: The harder a physics object hits something, the more sound energy it produces. We could say SWL is some fraction of the object's kinetic energy, which we can easily calculate the instant before the collision (1/2 * mass * velocity^2). (The fraction represents how much kinetic energy gets converted to sound vs other forms of energy... it would probably have to be slightly different for different types of objects. When you drop a ball of clay, it deforms and doesn't make much sound. If you dropped a ball of wood of equal mass, it would make a lot more sound).
×
×
  • Create New...