Jump to content
The Dark Mod Forums

what video formats can be used in a "videomap"?


Recommended Posts

Reading id.sdk Tables & Materials for info on making material shaders I'm mostly stumped on the syntax, but can always cut/paste from existing examples and change the values around and hope for the best.

In Stage Keywords is an item

 

videomap [loop] <file> "This stage uses a video stream as an image map".

 

This seems like an easier plan than to make an animation out of a dozen or more diffusemaps. Does anyone know what video format is required, and can someone point me to an example?

 

Link to comment
Share on other sites

As of now, the engine uses old RoQ format https://modwiki.xnet.fi/ROQ_%28file_format%29

 

There are plans for including .mp4 in the future. The question is, what do you plan to use it for? Both video files and gif-like animations for textures are extremely inefficient when it comes to large surfaces and tiling textures. In shaders, it's better to fake animation with instructions like panning, zooming or waving/distorting.

Link to comment
Share on other sites

video map is a very nice way to have texture animations on a mission, what i like about it is that you can apply alpha to a RoQ video and it will work has any other texture, can be used to do caustics effects for example.

 

About examples here are some:

textures/particles/testvideo
{
	qer_editorimage	textures/editor/video.tga
	translucent
	noShadows
	{
		blend add
		videoMap	video/fireball.roq
		vertexColor
	}
}

video/tvshow
{
	qer_editorimage	textures/editor/video.tga
	{
		videoMap	loop video/test_1024.roq 
	}
} 

using the engine console you can convert multiple images into a roq video but afaik has limited resolution, to do higher rez roq's you can use the roq maker in this tools http://www.moddb.com/games/overdose/downloads/overdose-tools-set

Edited by HMart
Link to comment
Share on other sites

We need to talk about changing the video format to a more modern one. .ROQ is ancient and looks terrible. It's time

we added a modern format, like mp4 or something. The main reason, is most affordable video editors don't support

it.

 

If we had a modern video format, we could do so much more with briefing videos and maybe even cutscenes mid level.

Edited by NeonsStyle

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

We need to talk about changing the video format to a more modern one. .ROQ is ancient and looks terrible. It's time

we added a modern format, like mp4 or something. The main reason, is most affordable video editors don't support

it.

 

If we had a modern video format, we could do so much more with briefing videos and maybe even cutscenes mid level.

Targeted for v2.06

 

http://bugs.thedarkmod.com/view.php?id=4519

  • Like 2

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

We need to talk about changing the video format to a more modern one. .ROQ is ancient and looks terrible. It's time

we added a modern format, like mp4 or something. The main reason, is most affordable video editors don't support

it.

 

If we had a modern video format, we could do so much more with briefing videos and maybe even cutscenes mid level.

 

Nothing against implementing mp4, bik or any other modern format for full-screen videos but IMO you guys should still fully support roq, is a very lightweight format and really not very hard to do, you can indeed use modern video tools to make the frames for them, how, just export from your preferred video tool has multiple separate frames, all of them support that functionality and convert those frames to roq, with the engine console or with the tool i posted above and that's it.

Other reasons why i think roq should not be deprecated, like i said is very lightweight, perfect for in level geometry integration (for example non interactive animated computer monitors), i mean it can be used in game as any other texture/material, roq supports all the idtech 4 OpenGL blending modes and alpha, enabling the ability of doing very nice effects, this without the need of, texture strips or separate texture frames ( like using various if stages and timers), for example like i said above, water caustics projecting on surfaces, or a special animated texture being projected from a spot light, for example cloud shadows moving over terrain, etc, no need for high rez videos for that. Effects for who mp4 or other modern format would be overkill imo.

Edited by HMart
Link to comment
Share on other sites

All the examples you mentioned don't need movie files, all this stuff is made with scrolling textures and tricks in materials. Using video files for that is actually an overkill.

 

Oh I know that but roq is a very lightweight video format and making a animation using scrolling textures, sometimes requires a very complicated material setup (if not using a texture strip) where's with a roq is simpler:

 

complex example:

 

textures/anim_caustics

{

qer_editorimage textures\sfx\caustics_ed.jpg

noShadows

nonsolid

translucent

 

{

if ( ( time * 24 ) % 23 == 0 )

blend add

map textures\sfx\CausticsRender_001.tga

 

}

{

if ( ( time * 24 ) % 23 == 1 )

blend add

map textures\sfx\CausticsRender_002.tga

 

}

{

if ( ( time * 24 ) % 23 == 2 )

blend add

map textures\sfx\CausticsRender_003.tga

 

}

{

if ( ( time * 24 ) % 23 == 3 )

blend add

map textures\sfx\CausticsRender_004.tga

 

}

{

if ( ( time * 24 ) % 23 == 4 )

blend add

map textures\sfx\CausticsRender_005.tga

 

}

{

if ( ( time * 24 ) % 23 == 5 )

blend add

map textures\sfx\CausticsRender_006.tga

 

}

{

if ( ( time * 24 ) % 23 == 6 )

blend add

map textures\sfx\CausticsRender_007.tga

 

}

{

if ( ( time * 24 ) % 23 == 7 )

blend add

map textures\sfx\CausticsRender_008.tga

 

}

{

if ( ( time * 24 ) % 23 == 8 )

blend add

map textures\sfx\CausticsRender_009.tga

 

}

{

if ( ( time * 24 ) % 23 == 9 )

blend add

map textures\sfx\CausticsRender_010.tga

 

}

{

if ( ( time * 24 ) % 23 == 10 )

blend add

map textures\sfx\CausticsRender_011.tga

 

}

{

if ( ( time * 24 ) % 23 == 11 )

blend add

map textures\sfx\CausticsRender_012.tga

 

}

{

if ( ( time * 24 ) % 23 == 12 )

blend add

map textures\sfx\CausticsRender_013.tga

 

}

{

if ( ( time * 24 ) % 23 == 13 )

blend add

map textures\sfx\CausticsRender_014.tga

 

}

{

if ( ( time * 24 ) % 23 == 14 )

blend add

map textures\sfx\CausticsRender_015.tga

 

}

{

if ( ( time * 24 ) % 23 == 15 )

blend add

map textures\sfx\CausticsRender_016.tga

 

}

{

if ( ( time * 24 ) % 23 == 16 )

blend add

map textures\sfx\CausticsRender_017.tga

 

}

{

if ( ( time * 24 ) % 23 == 17 )

blend add

map textures\sfx\CausticsRender_018.tga

 

}

{

if ( ( time * 24 ) % 23 == 18 )

blend add

map textures\sfx\CausticsRender_019.tga

 

}

{

if ( ( time * 24 ) % 23 == 19 )

blend add

map textures\sfx\CausticsRender_020.tga

 

}

{

if ( ( time * 24 ) % 23 == 20 )

blend add

map textures\sfx\CausticsRender_021.tga

 

}

{

if ( ( time * 24 ) % 23 == 21 )

blend add

map textures\sfx\CausticsRender_022.tga

 

}

{

if ( ( time * 24 ) % 23 == 22 )

blend add

map textures\sfx\CausticsRender_023.tga

 

}

{

if ( ( time * 24 ) % 23 == 23 )

blend add

map textures\sfx\CausticsRender_023.tga

 

}

}

 

Better example using a texture strip:

 

textures/particles/caustics

{

qer_editorimage textures/particles/causticsstrip_ed.jpg

translucent

{

blend add

map textures/particles/caustics.tga

scale 1 / 24 , 1

scroll table32[ time * .2 ] , 0

rgb 0.1

}

}

 

video map version:

 

textures/particles/caustics

{

qer_editorimage textures/particles/causticsstrip_ed.jpg

translucent

{

blend add

videoMap loop video/caustics.roq

}

}

Quality is a problem tho using a 512x512 roq vs a 1024x1024 or larger texture strip does make a diference, but the tool i posted above solves that problem has it makes larger rez roq's.

 

About performance i didn't tested side by side a roq video vs a texture strip, so i can't really say for sure what's faster or slower, i only know idSoftware used plenty of 512x512 roq videos in Doom 3, but imo is a matter of preference, if you don't want to use a video for a texture animation, you are not forced to and by not using roq, you also gain the ability to better tweak the animation at run time.

Edited by HMart
Link to comment
Share on other sites

I was thinking exactly about this. With 1k or 2k textures it's not much of use. That first example is a huge overkill, to put it mildly, you're basically multiplying the number of tris on a model by 23 (!), not to mention additional drawcalls. That said, using video for this seems like an unintuitive idea as well (and not exactly cheap, performance-wise). Usually 2-3 scrolling tileable textures is a way to go:

 

Edited by Judith
Link to comment
Share on other sites

I was thinking exactly about this. With 1k or 2k textures it's not much of use...

Personally i would not use .roq with 2k textures as well (i don't even think roq can go that far), at lest for ingame affects but for small ingame screens and some effects i don't think 512x512 roq's are that bad, but is personal opinion.

 

...That first example is a huge overkill, to put it mildly, you're basically multiplying the number of tris on a model by 23 (!), not to mention additional drawcalls...

Yes is overkill, that is why i also don't recommend it to anyone, my recommendation is to use a texture strip or a roq if you need so much frames.

 

Can you explain why changing stages on a single material causes you to multiply the tris on a model? Is the first time i'm hearing that.

 

...That said, using video for this seems like an unintuitive idea as well...

Ok but I don't agree, apart from the inability to tweak it after the fact (change frame speed for example) imo is a very fast and easy way to have texture animations on levels. But like i said before, anyone is free to use whatever they like, the final outcome is what matters.

 

(and not exactly cheap, performance-wise).

How much impact in performance are you saying this have?

 

I know roq is a very old but very cpu efficient video format, personally I have not tested it, at lest not on a performance basis, i did tested it visually, for example, the .roq based caustics against the texture strip ones and apart from roq looking more blurry, personally i didn't saw any performance impact of note between the two, but the roq was 512x512, i don't know how would it behave with a much larger roq, i'm sure the larger the .roq the bigger the performance impact.

 

...Usually 2-3 scrolling tileable textures is a way to go:

That is true, if your texture animation works well with so few frames, with no noticeable ick-ups or repetitions but if you are trying to simulate, for example, rain drops streaming down windows, or a TV show (like those of Max Payne for example) or even a video communication on a screen, like those of Doom 3, etc, you certainly need more than 2 or 3 frames, in the caustics case i posted, it has 24 frames, and you are right is indeed overkill, i'm certain it can work with less, is just a test i did and the source data was made of 24 frames.

 

Btw that UE4 tutorial is very nice thanks for posting it, but i most say his caustics do not behave exactly like mine, at lest not on flat surfaces, like flat floors and walls, on mine the caustics undulate and change shape but his is a very efficient trick indeed and i would recommend it over mine.

Edited by HMart
  • Like 1
Link to comment
Share on other sites

When ROQ video is played, the whole texture is sent from CPU to GPU each frame.

This is OK for FMV, but if you start putting it all over the level, performance would suffer, I guess.

I don't know how easy it is to share the same video across several objects/materials, and how easy it is to avoid video decoding/uploading if the player does not see the material from his area...

  • Like 1
Link to comment
Share on other sites

 

How much impact in performance are you saying this have?

 

What Stgatilov said about ROQ. As for materials, I didn’t test it super-thoroughly, but did some tests in my WIP map thread, as I was curious why my 500-tris model shows us as a 3500 tris in a caulked room.

Apparently both ambient light and fog light add the initial number of tris to the model, as every additional light touching the model will do. Same applies to material complexity. When you have a simple material with diffuse, specular, and normal shortcuts, they don’t have any additional cost. But every stage defined within {} brackets adds the base number of tris to the model (and some drawcalls too). While idtech4 seems to be pretty generous in terms of number of tris per scene (we’re talking millions of triangles, literally), I’d rather be on the safe side and have that overhead for AI, animations, transparency, things like that. You never know when you might need it :)

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 2 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...