DoD:S Customization Questions


ez
06-05-2005, 01:17 AM
I'll start this thread for anyone who has questions about customizing DoD Source.

My first question is:

If I remember correctly, I think Jed told me there is no sprites in DoD Source. Was I hearing fairies or is this correct?

Tonedef
06-05-2005, 02:25 AM
Simple question here is, Do we need to do anything fancy to the weapons so they look normal? I thought I heard somewhere that the source engine creates 2 FOVs so that nothing is scewed...am I right?

Trp. Jed
06-05-2005, 08:19 AM
Originally posted by ez
If I remember correctly, I think Jed told me there is no sprites in DoD Source. Was I hearing fairies or is this correct?

There are sprites but not as there were in DoD 1.3. Rather than a seperate sprite SPR file, they now just use regular VMT textures as per everything else.

So for example, the muzzle flash sprite is no longer a SPR file, its just a regular VMT texture in the materials folder.

Trp. Jed
06-05-2005, 08:21 AM
Originally posted by totally_tonedef
Simple question here is, Do we need to do anything fancy to the weapons so they look normal? I thought I heard somewhere that the source engine creates 2 FOVs so that nothing is scewed...am I right?

No, you don't need to edit the FOV. Source can render the world with one FOV and draw the model with another (I believe weapons are drawn with an FOV of about 54 degrees, off the top of my head).

So just model them as normal with no FOV tweaks and the engine will alter the FOV internally as needed.

macoto1209
06-16-2005, 09:09 AM
1.how to make a real-time reflection in the scope
is that a sprite or a vmt

http://sureshot.bullet-head.net/releases/stoke.birdhouse.awm.jpg
Stoke's AWM SF-AOP from [cdg forum]

2.max size of tga texture in source engine?1024x1024??

3.[model and animations]...i can change a action without replace a MDL files?

hobosphere
06-16-2005, 09:39 AM
i have that awp and the guy seems to have used a normal map for the reflection.

In the alpha channel of the normal map, you can see a white circular gradient for th e scope. In his vmt he has

"VertexLitGeneric"
{

"$baseTexture" "models\weapons\v_models\snip_awp\scope"
"$bumpmap" "models\weapons\v_models\snip_awp\scope_norm"
"$envmap" "env_cubemap"
"$normalmapalphaenvmapmask" 1
"$selfillum" 1
}


So everything that's white in the alpha channel of the normal map refelcts stuff i think? Jed would know.

Trp. Jed
06-16-2005, 11:25 AM
Yeah, to add a world reflection you use the environment map in your textures VMT file. Providing the map has enough env_map entities placed strategically around the scope will reflect the world around it. When GingerLord and I did our fabled dod_density test we didnt know about the env_map entities which is why the scope only reflected the skybox. NOTE: it only reflects the static surroundings so no models, etc.

The masking can be used to set how much of the reflection is used. So in the example quoted, "$normalmapalphaenvmapmask" tells it to use the alpha channel of the normal map to determin how much to reflect the environment on the texture.

Like an alpha channel, areas pure white reflect the most, those that are black dont reflect.

ez
06-16-2005, 01:14 PM
Jed, do you think there is any possiblity to animate a gun to go from normal view to iron sight w/ the new source engine? Or is it hard coded into game to where you cant?

Billie|Joe
06-16-2005, 01:52 PM
of course you can - as a draw or something. But if you're thinking of it going off on command at anytime... no. The devs would have to code in an extra sequence for that and fully incorporate it into the game w/o the need of Mr. MSA's (which will not happen). It's not something to do with the engine itself (we have the same ordeal with the whole "iron sight" thing on the current engine) as it is with the game itself..

ez
06-16-2005, 02:16 PM
So it is hard coded?

Trp. Jed
06-16-2005, 02:19 PM
Pretty much what BJ said. I doubt DoD:S will have a unaimed weapon anim like HL2 had (if you aimed at friendlies it would lower the weapon) so you can assume the weapon will be held ready all the time. So you'd either have to re-animate or re-origin it to be ironsight all the time or the standard view.

darkflame
06-18-2005, 12:12 AM
Will it be possible to animate the W_models, since there are no longer P_models?

Trp. Jed
06-18-2005, 07:47 AM
No idea. Technically theres no reason you couldnt but I don't think theirs any code in DoD:S that would specificall load and use your w_model animations.

ez
06-18-2005, 12:33 PM
There's no more p models? :confused:

BibFortuna
06-18-2005, 03:54 PM
Nope. I believe HL2 uses w_ models for both w_ and p_ now.

Trp. Jed
06-18-2005, 04:34 PM
Correct. There are no p_models. The w_model serves both.

2ltben
06-24-2005, 02:01 AM
Outside of the inability to selfshadow, are there any other negative effects to normal mapping?

Trp. Jed
06-24-2005, 10:09 AM
Only that you need to make sure your model looks O.K without it as its usually only the DX9 cards that support it.

Doc Orange
06-24-2005, 12:41 PM
About the sounds...
Are they sampled at 44100 khz stereo Mp3, or Wav? Are there any other specifications as well?

Also, does the engine alter the sounds over distance? In HL2, the default weapon sounds (mp7/ pulse rifle) sound normal at hearing distance, but from far away, it get's muffled to simulate ambience. I tried searching through the gcf files for their "muffled" counter parts but was unable to find them, assuming the engine muffles them...
I then replaced the mp7 sound and the pulse rifle sound, with my custom audio sampled at 44100 stereo, but then I get the same sound playing near, and far, with no muffled alterations.

Does the replacement have to fit a certain specification, or do I have to make a muffled counter part?

Thanks,
-Doc

Zao
06-24-2005, 12:57 PM
Originally posted by Doc Orange
About the sounds...
Are they sampled at 44100 khz stereo Mp3, or Wav? Are there any other specifications as well?

Also, does the engine alter the sounds over distance? In HL2, the default weapon sounds (mp7/ pulse rifle) sound normal at hearing distance, but from far away, it get's muffled to simulate ambience. I tried searching through the gcf files for their "muffled" counter parts but was unable to find them, assuming the engine muffles them...
I then replaced the mp7 sound and the pulse rifle sound, with my custom audio sampled at 44100 stereo, but then I get the same sound playing near, and far, with no muffled alterations.

Does the replacement have to fit a certain specification, or do I have to make a muffled counter part?

Thanks,
-Doc

I'll go ahead and answer this. As for the format, I can't recall right now, and I lost the beta in a format a while ago and haven't been able to download it since. As far as I know, they're in the same format as CSS. As for the distance muffling and stereo sounds, it's not handled the way you would expect. The answer is, it's part engine, and it's partly your responsibility to make your distant sound version for each gunshot sound. The shootsound is stereo, but either the left or the right channel, I can't remember which just now, has a distant version. The other channel is the regular version. So, the engine plays the near sound channel through both channels, and the distant one when you're a certain distance away. I played around with the sounds some and found that I didn't like the fact that there was no delay in the sound for the distant sounds, so I added some extra silence before the distant shot to simulate the speed of sound. Kinda fun, actually.

tl;dr: You have direct control over the distant sounds, it's not a purely engine-controlled effect. I'm pretty sure this is the way HL2 does it also. Dunno why CS:S developers didn't put this in.

Trp. Jed
06-24-2005, 01:16 PM
To expand on what Zao wrote...

Gingerlord and I spent fscking hours trying to figure out the distant sounds as part of our mod. As you may of noticed in HL2DM distant sounds don't work and its simply down to the fact HL2DM is clumsy hack of HL2. They work fine in CS:S and DoD:S, you just have to prepare you sound files and weapon scripts for them.

Sound format for weapon sounds can be as high as 16-bit, 44100Hz, stereo although lower formats will work too.

You define what sound a weapon uses for certain events (e.g. shoot, reload, clip-in, etc) in the weapons script file. Apart from just listing the path and filename of the sound file to use, you can pre-fix the filename with a special character to tell the Source sound engine that the sound file has some special properties.

To quote from the SDK (src\public\soundchars.h):


'*' indicates streaming wav data
'?' indicates user realtime voice data
'!' indicates sentence wav
'#' indicates wav bypasses dsp fx
'>' indicates doppler encoded stereo wav: left wav (incomming) and right wav (outgoing).
'<' indicates stereo wav has direction cone: mix left wav (front facing) with right wav (rear facing) based on soundfacing direction
'^' indicates distance variant encoded stereo wav (left is close, right is far)
'@' indicates non-directional wav (default mono or stereo)
')' indicates spatialized stereo wav
'}' forces low quality, non-interpolated pitch shift


For distant sounds, you set-up your stereo WAV file so that the left channel represents the sound up close and the right, the sound at distance. When you then specify the sound in the relevant script, you then prefix its filename with '^', for example:


"Weapon_AK.Single"
{
"channel" "CHAN_WEAPON"
"volume" "1"
"soundlevel" "SNDLVL_GUNFIRE"
"pitch" "95,105"
"wave" "^weapons/AK/AK_fire1.wav"
}


This tells the engine that the sound file is distance encoded and the engine will mix the left and right channels as appropriate based on the distance from the player of the sound source.

Ginger Lord
06-24-2005, 01:22 PM
Oh gawd I had forgotten about the days we spent trying to figure that out. Not nice.

Trp. Jed
06-24-2005, 01:47 PM
Originally posted by Ginger Lord
Oh gawd I had forgotten about the days we spent trying to figure that out. Not nice.

Yes, but it was our plucky British determination that got us through those long and difficult nights.

Doc Orange
06-25-2005, 01:54 AM
WOW... I'll try and figure this out... Thanks for the info guys!


Cheers,
-Doc

[DoD]Agent~0
06-28-2005, 05:48 AM
I *think* up to 2048x2048 textures are possible on Source.

ez
06-30-2005, 12:25 PM
Possible on maps or models?

mXed.dk
06-30-2005, 12:54 PM
both

darkflame
07-01-2005, 03:30 AM
Originally posted by Trp. Jed
Yes, but it was our plucky British determination that got us through those long and difficult nights.

You Brits have it so damn easy:p

Cpl. Entek
07-24-2005, 06:28 AM
Not sure if this has been asked before but, i have a large selection of custom gun models from various sources, some of which are no-longer producing models.

Am i right in thinking that i cannot take a standard gun model from old DOD and use it in DOD source? Can i just copy the model file into the DOD source folder and use it or does it need to be in a diferent format or something?

I guess what im asking is, can we use old dod models and stuff in new dod?

Zao
07-24-2005, 10:01 AM
Originally posted by Cpl. Entek
Not sure if this has been asked before but, i have a large selection of custom gun models from various sources, some of which are no-longer producing models.

Am i right in thinking that i cannot take a standard gun model from old DOD and use it in DOD source? Can i just copy the model file into the DOD source folder and use it or does it need to be in a diferent format or something?

I guess what im asking is, can we use old dod models and stuff in new dod?

No, you won't be able to. The system is completely different and you'd have to convert them over.

Cpl. Entek
08-02-2005, 06:47 AM
Oh i forgot to mention, if theres no sprites in the game, how will we do stuff like custom crosshairs and scope sprites - or are these different?

macoto1209
08-02-2005, 10:11 AM
Originally posted by Cpl. Entek
Oh i forgot to mention, if theres no sprites in the game, how will we do stuff like custom crosshairs and scope sprites - or are these different?

vtf(vmt) substitute for them

Cpl. Entek
08-03-2005, 02:48 AM
I have no idea what that means - you wouldnt happen to know a webby for that would you? A place to get a proggy? :D

Cpl. Entek
08-04-2005, 05:16 AM
OK brain engaged today - downloaded the Source SDK thingy on the Steam tab window thing that pops up when i load steam.

Found the VTF thingy in there.

:D

Watchtower
08-04-2005, 11:58 PM
--------------------------------------------------------------------------------
Originally posted by Cpl. Entek
Not sure if this has been asked before but, i have a large selection of custom gun models from various sources, some of which are no-longer producing models.

Am i right in thinking that i cannot take a standard gun model from old DOD and use it in DOD source? Can i just copy the model file into the DOD source folder and use it or does it need to be in a diferent format or something?

I guess what im asking is, can we use old dod models and stuff in new dod?
--------------------------------------------------------------------------------


What Zao said was right, they need to be ported. AND - there are plenty of user made programs out there that make it quite easy to do.

To elaborate just a bit further, this porting process is relatively simple if your textures are in the right size already. Ive been able to port a few map models from dod 1.3, but the textures had to be the right size.

Another words, if your original model used a texture(s) that HL2/source can except (16, 32, 64, 128, 512, 1024, 2048 powers)
than your model will be much easier to port and can be done in the space of a few short minutes.

Otherwise, count on at the very least re-skinning the model to a size format HL2/Source supports.

Cpl. Entek
08-06-2005, 04:36 AM
So essentialy, if i have an oldish gun model say, of the BAR, and i want it in DOD:Source, i (theoretically) could "port" it over to DOD:Source, and if the textures arent in the same format/size, i can alter them to a format that Dod:Source will accept?

I hope thats the case - im no modeller myself - i used to make cars for Midtown Madness 2 and that was hard enough - i finally figured out how to work the model program just as the MM2 scene started to collapse lol - i really dont have time to work out another modelling program.

Now the big question is, ive got to find a program i can figure out quickly to port the guns across lol.

hobosphere
08-06-2005, 10:33 PM
It's pretty easy to port old stuff to source, there's a tutorial on the sdk documentation here
http://developer.valvesoftware.com/wiki/Porting_Goldsource_content_to_Source

It's basically.

1. Decompiling your old mdl
2. Changing a couple of lines in the qc.
3. Turning the bmps to tgas and putting them in the right directory with the right dimensions
4. Compiling.

Cpl. Entek
08-11-2005, 02:13 AM
theres a compiler in the source sdk aint there? or am i being stupid and need to get a model proggy teehee

Trp. Jed
08-11-2005, 07:56 AM
Yes, the StudioMDL compiler is included in the SDK and theres a couple of front-ends for it so you don't need DOS.

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.