Since I play CoD 1, I can't tell anything about CoD 4. So I don't know anything about these functions, roq files and shaders on CoD 4.
I found a couple of problems already, because there is a 3rd party program that allows it to convert AVI, GIF and JPG files into ROQ files. I tried to convert a couple of things, like gifs, but AVI files didn't quite work. The program says the resolution needs to be 512x384 although some of the stock video (ROQ) files aren't in this resolution and those are the ones that are working!
Importing those video's isn't very hard.
Here are a couple of steps you need to use in CoD 1:
1. Create a new shader (a new text file, with the extension .shader)
2. Create a new texture, it doesn't matter what's on this texture at all.(This step could be optional!)
3. Create a very small test map, with this own-made texture.
Put it in your pk3-file, with the texture and shaders.
4. Create a new ROQ file with the 3rd-party program (
QVM)
Don't use this step if you just want to see how it works.
5. Create a new folder in your pk3 called "video", put your ROQ file in here.
6. Open your shader and use this peace of code:
Code: Select all
textures/thawalrus/thawalrus
{
surfaceparm nolightmap
noPicMip
noMipMaps
{
videomap cod_end.roq
rgbGen identity
}
}
The 1st line defines the texture that will be modified(where the movie is played on)
The 3-5 lines are needed to get the right settings for the environment.
The 7th line is the most important one, this will make the texture play the ROQ-Movie
The 8th line is used so all Colors are assumed to be white (1.0, 1.0, 1.0).
I will play the movie "cod_end.roq" here, because it didn't fail.
This should do the trick... Tell me if there are any mistakes or questions about it
Gr, Walrus