Author Topic: New old video format in BFG (.bik vs .roq)  (Read 982 times)

0 Members and 1 Guest are viewing this topic.

bitterman

  • Sr. Member
  • ****
  • Posts: 250
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
New old video format in BFG (.bik vs .roq)
« 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.

Quote
Bink:
-----

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?
« Last Edit: July 05, 2016, 04:09:35 AM by bitterman »

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 852
  • Karma: +41/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: New old video format in BFG (.bik vs .roq)
« Reply #1 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):
Quote
We 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]

bitterman

  • Sr. Member
  • ****
  • Posts: 250
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Re: New old video format in BFG (.bik vs .roq)
« Reply #2 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...

Code: [Select]
/*
=================
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:

Code: [Select]
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
}
}
« Last Edit: July 06, 2016, 12:54:17 AM by bitterman »

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 852
  • Karma: +41/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: New old video format in BFG (.bik vs .roq)
« Reply #3 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?

caedes

  • Jr. Member
  • **
  • Posts: 51
  • Karma: +17/-11
  • Doom Newbie
    • View Profile
    • My Github Account
Re: New old video format in BFG (.bik vs .roq)
« Reply #4 on: July 06, 2016, 12:19:22 PM »
RBDoom3BFG can play .bik videos, it uses ffmpeg libs do decode them

bitterman

  • Sr. Member
  • ****
  • Posts: 250
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Re: New old video format in BFG (.bik vs .roq)
« Reply #5 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.

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?

« Last Edit: July 06, 2016, 10:11:40 PM by bitterman »

caedes

  • Jr. Member
  • **
  • Posts: 51
  • Karma: +17/-11
  • Doom Newbie
    • View Profile
    • My Github Account
Re: New old video format in BFG (.bik vs .roq)
« Reply #6 on: July 07, 2016, 11:25:32 AM »
neo/Renderer/Cinematic.cpp

trebor

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +14/-7
  • Boomstick Veteran
    • View Profile
Re: New old video format in BFG (.bik vs .roq)
« Reply #7 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.

bitterman

  • Sr. Member
  • ****
  • Posts: 250
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Re: New old video format in BFG (.bik vs .roq)
« Reply #8 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.

bitterman

  • Sr. Member
  • ****
  • Posts: 250
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Re: New old video format in BFG (.bik vs .roq)
« Reply #9 on: July 14, 2016, 01:36:36 AM »
Quote
FFmpeg 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

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

.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.
« Last Edit: July 14, 2016, 02:25:12 AM by bitterman »

motorsep

  • Hero Member
  • *****
  • Posts: 960
  • Karma: +74/-127
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: New old video format in BFG (.bik vs .roq)
« Reply #10 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.

bitterman

  • Sr. Member
  • ****
  • Posts: 250
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Re: New old video format in BFG (.bik vs .roq)
« Reply #11 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).


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.
« Last Edit: August 01, 2016, 10:35:47 PM by bitterman »