id Tech Forums

id Tech 4 (Doom3/Prey/Q4) => id Tech 4 Mods => Topic started by: bitterman on July 04, 2016, 10:14:33 PM

Title: New old video format in BFG (.bik vs .roq)
Post by: bitterman on July 04, 2016, 10:14:33 PM
I totally miss this thing.

To create custom video in D3 I used some console command to generate sequence of .tga files and then used Quake Video Maker to make .roq file.

In BFG I see only .bik files. Is anyone know how to work (create, edit, etc) with it for modding purpose?

And second moment.

In Code I see a doom3Intro param wich set as "gui/intro/introloop".

And there is a /base/video/intro/loopintro.bik into resources.

But I don't see and don't remember - what is correct sintax for this?

Is it .gui or .mtr? How to set correct path for "gui/intro/introloop"?

Thanks.

************************************

O, I see:

http://idtechforums.fuzzylogicinc.com/index.php?topic=141.msg1073#msg1073

Why ID do this?
Nevermind.

QuoteBink:
-----

The Doom 3 BFG Edition GPL Source Code release does not include functionality for rendering Bink Videos.

Still don't see a license for BINK. Is it individual for each developer?

About replace from video to cinematics: How to create an Intro using cinematic? Place the trigger in the beginning of a map?
Title: Re: New old video format in BFG (.bik vs .roq)
Post by: The Happy Friar on July 05, 2016, 06:17:32 PM
the bink tools are here: http://www.radgametools.com/bnkdown.htm

In the bink FAQ page this is what it says (well, part):
QuoteWe have several options for redistributing Bink files. We have tried to handle most licensing situations, but it you don't see a license that works for you - just give us a call. We're happy that you're using Bink, and we want to make distribution easy!

       
  • For non-commerical use, your first distribution option is to accompany your Bink files with one of the players from the RAD Video Tools. These utilities all display a RAD Game Tools credit. You can distribute these utilities for no licensing fees as long as you do NOT circumvent this notice and if your use is non-commmercial. Any attempt to hide the notice voids your right to distribute the files.[/l][/l]
So if you included the tools you're a-ok.  D3 BFG would still play them I expect.


But since you can't play back bink with the gpl code, and you just want to trigger a cinematic, yes, trigger @ start of map.
[/list]
Title: Re: New old video format in BFG (.bik vs .roq)
Post by: bitterman on July 05, 2016, 10:21:30 PM
The Happy Friar, thanks.

Well, '\neo\renderer\AutoRenderBink.cpp' is totally empty.

So I think this part of code was excluded from BFG GPL code.

But now I wonder this thing:

Into doomintro.swf I see script functions 'startIntro()' and 'playVo()'.

Perhaps this funcs interacts with RenderBink (something like 'startIntro -> SWF_Main -> AutoRenderBink -> play_bik_file').

RBDoom contains FFmpeg wich can play video. Is there a some equivalent for scheme wich was described above?

In other words how to play any video file in RBDoom (including from menus)?

********************* upd *******************

Hmm...

/*
=================
idCommonLocal::RenderBink
=================
*/
void idCommonLocal::RenderBink( const char* path )
{
const float sysWidth = renderSystem->GetWidth() * renderSystem->GetPixelAspect();
const float sysHeight = renderSystem->GetHeight();
const float sysAspect = sysWidth / sysHeight;
const float movieAspect = ( 16.0f / 9.0f );
const float imageWidth = renderSystem->GetVirtualWidth() * movieAspect / sysAspect;
const float chop = 0.5f * ( renderSystem->GetVirtualWidth() - imageWidth );

idStr materialText;
materialText.Format( "{ translucent { videoMap %s } }", path );

idMaterial* material = const_cast<idMaterial*>( declManager->FindMaterial( "splashbink" ) );
material->Parse( materialText.c_str(), materialText.Length(), false );
material->ResetCinematicTime( Sys_Milliseconds() );

while( Sys_Milliseconds() <= material->GetCinematicStartTime() + material->CinematicLength() )
{
renderSystem->DrawStretchPic( chop, 0, imageWidth, renderSystem->GetVirtualHeight(), 0, 0, 1, 1, material );
const emptyCommand_t* cmd = renderSystem->SwapCommandBuffers( &time_frontend, &time_backend, &time_shadows, &time_gpu );
renderSystem->RenderCommandBuffers( cmd );
Sys_GenerateEvents();
Sys_Sleep( 10 );
}

material->MakeDefault();
}


D3 assets, video.mtr:

gui/intro/introloop {
translucent {
videomap loop video/intro/introloop.RoQ
linear
}
}

gui/intro/introid {
translucent {
videomap video/intro/introid.RoQ
linear
}
}

video/idlogo
{
qer_editorimage textures/editor/video.tga
{
videoMap loop video/idlogo.roq
}
}
Title: Re: New old video format in BFG (.bik vs .roq)
Post by: The Happy Friar on July 06, 2016, 06:53:27 AM
What happens if you use RBDoom to play the stock D3 BFG game?  Does it play any videos at all or does it skip everything?  I don't own D3 BFG so I can't test.  Did id happen to leave the ability to play ROQ's in there & just add bink support?
Title: Re: New old video format in BFG (.bik vs .roq)
Post by: caedes on July 06, 2016, 12:19:22 PM
RBDoom3BFG can play .bik videos, it uses ffmpeg libs do decode them
Title: Re: New old video format in BFG (.bik vs .roq)
Post by: bitterman on July 06, 2016, 10:08:22 PM
Sorry, my fault.

Looks like RBDoom can play both (.bik and .roq).

And seems like D3BFG GPL can't play both.

Quote from: caedes on July 06, 2016, 12:19:22 PM
RBDoom3BFG can play .bik videos, it uses ffmpeg libs do decode them

Don't see any link with ffmpeg in RB Code. Can you point, please?

Title: Re: New old video format in BFG (.bik vs .roq)
Post by: caedes on July 07, 2016, 11:25:32 AM
neo/Renderer/Cinematic.cpp
Title: Re: New old video format in BFG (.bik vs .roq)
Post by: trebor on July 07, 2016, 01:57:45 PM
RBDoom uses FFMpeg so you can change the code easily by adding support for different file extensions to play pretty much any common video format you want.
Title: Re: New old video format in BFG (.bik vs .roq)
Post by: bitterman on July 07, 2016, 10:00:13 PM
@caedes, trebor

Thanks, guys.

doomintro.swf is not neccesary, but it uses a cool teletype effect (you know "The Union Aerospace Corporation is ...") and I'm totally stuck with it.
Title: Re: New old video format in BFG (.bik vs .roq)
Post by: bitterman on July 14, 2016, 01:36:36 AM
QuoteFFmpeg encoder is based on the Switchblade roq encoder which was originally at http://icculus.org/homepages/riot/ . Its author continue the development of the original code.

https://wiki.multimedia.cx/index.php?title=RoQ (https://wiki.multimedia.cx/index.php?title=RoQ)

*************************

.roq which generated by QVM (30 fps, 512x384) looks archaic.

roq.exe (1995, Quake3) from id - well, not tried yet but have same feeling...

SwitchBlade 2/3/4 was mystically disappeared from net (license issue again?).

.bik is not open.
Title: Re: New old video format in BFG (.bik vs .roq)
Post by: motorsep on July 14, 2016, 09:20:22 AM
Let's face it - you are using ancient engine already. How bad is it using ancient video format with ancient game engine? :)

Nowadays, videos are used for small things like GUI elements, or maybe one or two intro videos (usually just a fancy logo anim). RoQ works fine for that purpose.

Btw, RoQ in Storm Engine 2 is 1024 x 1024 @ 30 fps.

roq.exe still works fine on Windows 7 64bit.
Title: Re: New old video format in BFG (.bik vs .roq)
Post by: bitterman on August 01, 2016, 10:21:06 PM
If you follow my way: CamStudio (GPL) can record a demo (via capture video from game's window).

Not perfect but acceptable (may be I set wrong options).

Quote from: motorsep on July 14, 2016, 09:20:22 AM

Nowadays, videos are used for small things like GUI elements, or maybe one or two intro videos (usually just a fancy logo anim). RoQ works fine for that purpose.

Btw, RoQ in Storm Engine 2 is 1024 x 1024 @ 30 fps.

roq.exe still works fine on Windows 7 64bit.

Thanks, it's useful.