ROQ

From 3DGE Wiki
Jump to: navigation, search

RoQ is a full motion video format originally developed for The 11th Hour by Graeme Devine. The format was later used as the FMV format for Quake III: Arena and derivative games.

According to excerpts of Devine's 11th Hour development journal published in Wired at http://www.wired.com/wired/archive/3.08/shipping.html, the RoQ format was named after Devine's newborn daughter, Roqee.

3DGE implements full support for ROQ, both as triggerable cinematics and rendering to a surface in the game world. A pre-rendered cinematic also replaces the 3DGE splashscreen (inherited from 1.32). The videos can not be compressed into a WAD, but rather in a subfolder named "/cin". This folder name is hard-coded and cannot be changed - 3DGE will always look in this folder if it is present. If the splash cinematic is not found, 3DGE will skip rendering it entirely.


File Format

A RoQ format is comprised of a series of chunks. These chunks may indicate the format signature or playback parameters, or may contain encoded pieces of video frames or audio wave forms.

Chunk Format

Each chunk has the following format (all multi-byte numbers are little-endian):

bytes 0-1  chunk ID
bytes 2-5  length of chunk payload
bytes 6-7  chunk arguments
bytes 8..  chunk payload

Note that bytes 2-5 only contain the length of the chunk payload, not the entire chunk including the 8-byte header. Also, the RoQ_SIGNATURE chunk contains 0xFFFFFFFF for this field and should only be used for format validation purposes.

0x1084 - RoQ_SIGNATURE

A signature chunk has a length of 0xFFFFFFFF and no payload. The chunk argument represents the movie playback framerate.

0x1000 - RoQ_QUAD

0x1001 - RoQ_INFO

0x1002 - RoQ_QUAD_CODEBOOK

0x1011 - RoQ_QUAD_VQ

0x1012 - RoQ_JPEG

A JPEG chunk contains a plain JFIF file that can be decoded with a standard JPEG image decoder.

0x1013 - RoQ_HANG

The purpose of this chunk type is unclear.

0x1020 - RoQ_SOUND_MONO

0x1021 - RoQ_SOUND_STEREO

0x1030 - RoQ_PACKET

This chunk is known to occur in RoQ files from The 11th Hour. It's use appears to be related to audio processing.

Implementation in 3DGE

Under construction!