Author Topic: Robot Transcoding with Alpha Channel  (Read 11874 times)

0 Members and 1 Guest are viewing this topic.

Offline Trembyle

Robot Transcoding with Alpha Channel
« on: June 19, 2019, 07:53:10 PM »
I'm new around here and have been spending the last few weeks using the great tools developed by this community to extract, convert resources, and just generally poke around in the Sierra games I grew up with.

I wrote a Powershell script to pull all VMD files directly from the Phantasmagoria and GK2 discs and transcode them to H.264 using VAG's ffmpeg codec.

To do something similar for the Robot files, I see that the CLI tool for SCI Resource Viewer allows me to convert these to AVIs. Does anyone know of a way to copy them while preserving alpha channel / transparency? Or at least the ability to select a key color other than black?

If not, is the source code for video.exe available somewhere? Or maybe some documentation on the Robot format? I'll try digging in the ScummVM repo for some clues.



Offline Collector

Re: Robot Transcoding with Alpha Channel
« Reply #1 on: June 19, 2019, 08:33:25 PM »
Sadly there is no source for SV or any of its command line tools.
KQII Remake Pic

Offline MusicallyInspired

Re: Robot Transcoding with Alpha Channel
« Reply #2 on: June 20, 2019, 07:36:02 AM »
Years ago I attempted to track down the creator of SCI Viewer. I finally did somewhere somehow but he said that his source was lost and that there would be no more releases.
Brass Lantern Prop Competition

Offline Trembyle

Re: Robot Transcoding with Alpha Channel
« Reply #3 on: June 20, 2019, 12:16:15 PM »
The ScummVM code for Robot handling is very well documented. Unfortunately, it's pretty far above my head. It's also not well suited to exporting video, as far as I can tell.

https://github.com/scummvm/scummvm/blob/1a097b1d971e6e3cf3c10f6eb7c7a30def2d2f7c/engines/sci/video/robot_decoder.h

I guess even without using SV, are there any other tools for working with Robots? On VAG's SCI Page (which admittedly looks very old), he says that his RBT player is 50% complete. Considering that he finally did complete work on the VMD player / decoder, did he or anyone else make progress with Robots?

Offline OmerMor

Re: Robot Transcoding with Alpha Channel
« Reply #4 on: June 20, 2019, 04:27:19 PM »
are there any other tools for working with Robots?

Here are some undocumented DOS utils that might be helpful with ROBOT files:
https://drive.google.com/open?id=1hRFSVkcZ2FKHvgLQZuOkcHhqrSsl6k8W

Offline lskovlun

Re: Robot Transcoding with Alpha Channel
« Reply #5 on: June 20, 2019, 05:18:52 PM »
A quick peek indicates those RBT tools will only generate version 3 files (a few even work with version 2). There were six versions in total, and we only have interpreters that will read version 4 (just one: the SWAT DEMO interpreter), 5 and 6 (I believe most other interpreters will read both of these). I haven't checked your source archive to see which versions we have in there.

Offline Trembyle

Re: Robot Transcoding with Alpha Channel
« Reply #6 on: June 21, 2019, 09:04:48 PM »
Here are some undocumented DOS utils that might be helpful with ROBOT files:

Thanks OmerMor! These are cool and will be fun to play with. And from a historical perspective, this helps piece together how the SCI devs worked.

However, I'm guessing that the SCI devs didn't need tools to extract video from RBTs since they would've had the source files. For example, MakeRbt creates the output "from a sequence of dib files." I had to look that up, but it seems like dib files are BMP files (device independent bitmap).

If only there was a tool to extract DIBs or Views from RBTs. We can already get the audio by using SV.

A quick peek indicates those RBT tools will only generate version 3 files (a few even work with version 2).

I tried this with RBTs from Phant1. Even though these should be version 4 types, I got "This robot file type not supported by Cuerobot!" a couple of times. Other tools output messages like ** Special version for Phantasmagoria project **.

I guess Phantasmagoria "project" means that the format hadn't been finalized yet. That's a bit odd to me, since I would've thought Phant1 development didn't start until KQ7 was done and version 4 was already in use.

Offline OmerMor

Re: Robot Transcoding with Alpha Channel
« Reply #7 on: June 22, 2019, 04:41:01 AM »
I added another application to the archive: AVIROBOT.EXE
It's a 16-bit windows app which I never tried to run. Perhaps this would be of more help.

Offline Trembyle

Re: Robot Transcoding with Alpha Channel
« Reply #8 on: June 22, 2019, 05:52:32 PM »
I managed to get this to run by copying any missing DLL files from Turbo C++ 4.5.

Unfortunately I can't get it to read any AVI or RBT files I've tried. First of all, when I go to File > Open nothing happens. If I go to File > Palette, the application crashes Windows (within Dosbox - haven't tried any other emulator).

So it won't open existing RBT files, but if I go to File > New, the file dialog wants me to browse to an AVI. I tried AVIs that I converted from RBTs using SV, from both Phant1 and the SWAT demo. I'm getting an error when reading the palette (see attached).

OmerMor, is there any source code for these utilities?
« Last Edit: June 23, 2019, 10:33:28 PM by Trembyle »

Offline lskovlun

Re: Robot Transcoding with Alpha Channel
« Reply #9 on: June 22, 2019, 06:14:42 PM »
Eh? Both KQ7 and Phant1 use Robot version 5. PQ SWAT DEMO uses version 4 (the full version uses version 5).

re AVIROBOT: Strange how it's packaged with runtime files from BC++ 4.0, but compiled with those from 4.5. I may try to find the files from 4.5 to run it, but it only generates Robot version 4, so its use would be quite limited.

Offline Trembyle

Re: Robot Transcoding with Alpha Channel
« Reply #10 on: June 22, 2019, 06:33:03 PM »
Eh? Both KQ7 and Phant1 use Robot version 5. PQ SWAT DEMO uses version 4 (the full version uses version 5).

My point is that the development for KQ7 and Phant1 must have been going on concurrently if the version 5 format hadn't been finalized yet. I would've thought that version 5 was already in use before Phantasmagoria even started development, and was surprised to see it referenced when using version 4 tools.

Offline Collector

Re: Robot Transcoding with Alpha Channel
« Reply #11 on: June 22, 2019, 06:49:59 PM »
If it is having trouble reading AVI files could it be an issue with the codec used to create the AVI? Wouldn't AVI files from the era use Indeo?, not one of the more modern ones?
KQII Remake Pic

Offline Trembyle

Re: Robot Transcoding with Alpha Channel
« Reply #12 on: June 22, 2019, 07:41:21 PM »
I used video.exe from the SV CLI tools to create AVIs from the game files. It's not much to go by, but for what it's worth FFmpeg reads them as rawvideo codec.

I tried both with and without RLE compression for Phant1 and SWAT demo. The tool gave the same error message on all of them.

Offline OmerMor

Re: Robot Transcoding with Alpha Channel
« Reply #13 on: June 23, 2019, 01:35:20 PM »
OmerMor, is there any source code for these utilities?

Yes, but I'm not sure I can share it.
I can share an AVI file which might be compatible, as well as a DIB file.

Offline Trembyle

Re: Robot Transcoding with Alpha Channel
« Reply #14 on: June 23, 2019, 07:33:00 PM »
This does work! I was able to convert this AVI to RBT without error. I'm able to open the resulting file in SV and view the animation, now on a black background.

FFmpeg sees this AVI as using Microsoft RLE codec. It doesn't seem to have an encoder to actually get video into this format. If someone needs to do this, then they may need to rely on early 90s Windows software. There is an MSVIDEO.DLL dependency that I got from Turbo C++ 4.5, along with an MSRLE.DRV file. So maybe it's something that could be built if we knew more about what the software was doing.

OmerMor, apologies for the blunt question since I'm new to the forum. Are you concerned about sharing the source code due to the current IP holder? Or were you given access to it on some conditions that prevent you from sharing it now?


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.061 seconds with 22 queries.