Textures and animation

Have a question about modding, modelling or skinning? Have a tutorial to post? Post here!

Moderator: Core Staff

ThaWalrus

Textures and animation

Post by ThaWalrus » May 5th, 2012, 11:13 am

Hi CoDJumper,

I have a question about a function in CoD called "videoMap", it's used in .shader files (files to change textures).

I made this:

Code: Select all

textures/thawalrus/thawalrus
{
	surfaceparm		nolightmap

	{
		videomap	iw_logo.roq
	 	rgbGen		identity
	}
}
If I place this texture in my map, compile it and play the map, the console will say this:

Code: Select all

SCR_PlayCinematic( iw_logo.roq )
trFMV::play(), playing iw_logo.roq
What means that the movie is playing. It's the same when I change a menu for playing a roq movie:

Code: Select all

		itemDef
		{
			visible 		1
			rect			64 32 512 416
	 		style			WINDOW_STYLE_CINEMATIC
			cinematic		"iw_logo.roq"
			decoration
		}
But, the problem is that the menu will play roq files(pretty cool btw). But the texture will be black..

Can somebody help me, or tell me what I am doing wrong?

Greetz Walrus

PS: It is possible, I'm sure, to play roq files at textures:
Image

Nekoneko
CJ Fan
CJ Fan
Posts: 170
Joined: April 18th, 2011, 3:48 pm

Re: Textures and animation

Post by Nekoneko » May 5th, 2012, 4:38 pm

I have no clue what you are doing, but it looks pretty impressive (never thought you could play videos in cod multiplayer)

ThaWalrus

Re: Textures and animation

Post by ThaWalrus » May 6th, 2012, 12:33 pm

Haha, I thought the same.

I got it 'kind of' working, because some roq files will play and some roq files won't. I don't know why this is, and if anyone knows something about these functions and shaders, please tell me.

I'm happy because it works, but the results are not that satisfactioning as you might think.
Btw, there are 0 tutorials on how to implement such movies to cod, so it would be great if there are people that could make tutorials about this...

There are 3 ways to show roq files in-game.
1. Through menu's
2. On textures
3. On huds

Gr, Walrus
Last edited by ThaWalrus on March 29th, 2013, 9:24 pm, edited 1 time in total.

Nekoneko
CJ Fan
CJ Fan
Posts: 170
Joined: April 18th, 2011, 3:48 pm

Re: Textures and animation

Post by Nekoneko » May 6th, 2012, 5:00 pm

so, if i had a .roq file, how would i proceed to see it ingame, like yours?
Where are .shader files located?

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Textures and animation

Post by Rezil » May 6th, 2012, 5:14 pm

Btw, there are 0 tutorials on how to implement such movies to cod, so it would be great if there are people that could make tutorials about this...
You're the first person to claim that you can play videos in-game(and has video footage to back it up). It's up to you to research this and provide us with a tutorial. :)
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Re: Textures and animation

Post by F |Madness| U » May 6th, 2012, 6:51 pm

KillerSam wrote:
Rezil wrote:
Btw, there are 0 tutorials on how to implement such movies to cod, so it would be great if there are people that could make tutorials about this...
You're the first person to claim that you can play videos in-game(and has video footage to back it up). It's up to you to research this and provide us with a tutorial. :)
This. If it can be done and the file size isn't huge - this is massive.
You could almost say it's comparable to the size of Rezil's mapmaking skillzzzzzzz.
-

ThaWalrus

Re: Textures and animation

Post by ThaWalrus » May 6th, 2012, 7:56 pm

ThaWalrus wrote:I'm happy because it works, but the results are not that statisfactionary as you might think.
I need to figure things out first, but I am not the first one who claims he can do it. Look at the video of kaje11.

I just found the right function so it isn't that huge, however, I haven't seen something like this since cod1 has been published in 2003!

I could make a tutorial for this, but Call of Duty 1 is 'dying' and modders are rare...

F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Re: Textures and animation

Post by F |Madness| U » May 6th, 2012, 9:35 pm

Do you have any later CoD games such as CoD2 or CoD4 where you could test if the function works? May be useful in CoD4 perhaps.
-

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Textures and animation

Post by Rezil » May 7th, 2012, 10:24 am

F |Madness| U wrote:Do you have any later CoD games such as CoD2 or CoD4 where you could test if the function works? May be useful in CoD4 perhaps.
CoD4 has a way of playing video files as well, there's a mission in single player where at one point you look at a big screen and it's displaying the launch of a nuke and some troops moving IIRC. For CoD2 you'd have to research the way .roq files are played all over again as .shader files aren't used in CoD2.
TheWalrus wrote:I need to figure things out first, but I am not the first one who claims he can do it. Look at the video of kaje11.

I just found the right function so it isn't that huge, however, I haven't seen something like this since cod1 has been published in 2003!

I could make a tutorial for this, but Call of Duty 1 is 'dying' and modders are rare...
If it matters to you that a game is 'past its prime' then you're modding for the wrong reasons in my opinion. So far, kaje11 is the only one who has video proof that animated textures are in fact possible in CoD, and you're the one who has a way of displaying those textures.

I would still like to see a proof-of-concept or a tutorial showing the steps it takes to import a video file into CoD. Hopefully the fact the CoD is dying won't deter you from researching this further.

EDIT:
TheWalrus wrote:I got it 'kind of' working, because some roq files will play and some roq files won't. I don't know why this is, and if anyone knows something about these functions and shaders, please tell me.
I would imagine some .roq files are meant to be played 'fullscreen' and not mapped to a texture. The .roq file you want to play on a texture probably needs to be a power of two since regular textures have this requirement as well. I'm totally speculating here but it's worth a shot.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

ThaWalrus

Re: Textures and animation

Post by ThaWalrus » May 7th, 2012, 11:42 am

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

ThaWalrus

Re: Textures and animation

Post by ThaWalrus » May 8th, 2012, 7:38 am

Could you show me the video, and give me the 10+ mistakes in my 2-minute-made tutorial?

Would be more helpful, wouldn't it?

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Textures and animation

Post by Rezil » May 8th, 2012, 12:26 pm

megazor wrote:Walrus, I has found 10+ mistakes in your totorial and also I has a video proof that moving things in CoD1 are possible.
I have*

tutorial*

I have*

'proof' is uncountable -> video proof*
megazor wrote:You didn't put a space break between modified and the bracket - making your tutorial twice harder to read.
(stylistic choice) no hyphen between bracket and making*

twice as hard*
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Textures and animation

Post by Drofder2004 » May 8th, 2012, 12:44 pm

Also, "space break" is not a term used to describe a 'space' and a "moving texture" is not the same as a "video texture".
Everyone knows you can have moving textures in CoD1, that is how they made the tank tracks look like they were moving.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Textures and animation

Post by Rezil » May 8th, 2012, 2:11 pm

Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

ThaWalrus

Re: Textures and animation

Post by ThaWalrus » May 8th, 2012, 3:47 pm

Could we please get on topic?

I'm trying to solve some problems here, but nobody seems to know anything about it. That isn't a problem, but maybe we can get some results here.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests