DaemonEngine / Daemon

The Dæmon game engine. With some bits of ioq3 and XreaL.
https://unvanquished.net
BSD 3-Clause "New" or "Revised" License
298 stars 61 forks source link

Keyframed videoMap #961

Open illwieckz opened 10 months ago

illwieckz commented 10 months ago

@slipher wrote in #954:

A pretty bad shortcoming that we haven't discussed yet is the way that the video stops playing when you're not looking at and resumes where you left off when you look again. It would be better if the video's time advanced consistently regardless of whether is rendered, which would allow synchronizing the video with other map elements such as movers. The crappy behavior is obligated by the ROQ format because it doesn't have keyframes. If you wanted to keep the timing consistent you'd have to either potentially decode the whole video during one frame, or always continue decoding even when the video is not being seen. A decent video format has keyframes which allow jumping to any time point with only a little processing. It would be unfortunate if we gave the stopping and starting behavior to other video formats in the name of consistency. Thoughts?

illwieckz commented 10 months ago

It's totally OK to implement a feature with another codec that RoQ can't do.

The purpose of having videoMap RoQ support is to only have what Quake 3/Tremulous had, no less no more. We can see videoMap RoQ support as a kind of “GIF” to be applied on surfaces.

We don't need to extend RoQ support to other things even if one day we allow the engine to do more video things with other video codecs. If one day we have another video format that allows us to do things RoQ can't do, we would not be obligated to port the feature back to RoQ, and we would not be obligated to not implement the feature with the new codec because RoQ cant.

illwieckz commented 10 months ago

According to the Multimedia Wiki the RoQ format supports keyframes in RoQ_JPEG chunk, but if Quake 3/Tremulous never implemented that we are not expected to implement it.

illwieckz commented 10 months ago

If one day we implement a keyframed video codec, we would be able to add a specific material keyword to control if the playback behavior would be the legacy one or be absolute in time, and we would document that the absolute time playback is only available with the supported codecs and not RoQ.