Star Trek 25th Anniversary Raw Ship Sprites

Here are the raw ship sprites extracted from the ".R3S" files. These files are simple bitmap images stored it a little additional data which uses the colors from BRIDGE.PAL. The first 36 bytes are currently unknown to me, but I believe it to be orientation information (it depends only on the angle of the ship sprite, and not on which ship it is). The next 4 bytes are two little-endian unsigned 16-bit integers which specify the location of the center of the sprite (aka the center of mass is fixed as the ship rotates). The next 4 bytes are two little-endian unsigned 16-bit integers which specify the width and height of the sprite. After that is a sequence of bytes that lookup into the palette table. I've colored the transparent pixels (byte 0) as magenta.

Star Trek 25th Anniversary Scaled and Shifted Ship Sprites

While the above images are all pixel-wise accurate, it is clear from looking at the Enterprise sprite that they are designed to be stretched to have 5:6 pixels so that the native 320 x 200 resolution displays in the 4:3 aspect ratio. In the below images, I've stretched the pixels, centered the center of mass points on a grid, and supressed the magenta pixels so it can be used as a correct aspect ratio visual reference sheet for each ship.

The View Angles

To use these images, you need to also know what angles the images were taken from. I'm believe this is in the file as nine 32-bit signed floating or fixed point numbers that represent the view matrix (exactly 9*4 = 36 bytes, which is the unknown segment's size), but I cannot make that hypothesis fit. I can, however duplicate the views!

The easy part is that, if the ship's center of mass is at (0,0,0), then the camera is located at evenly spaced euler angles around the hemisphere, which is to say that the i,j-th image is generated by looking at (0,0,0) from the point (sin(theta)*sin(phi),cos(phi),cos(theta)*sin(phi)) with phi = (j/6.0)*PI and theta = (i/6.0)*PI and taking an orthographic projection (or nearly so, as these are digitized photos). This determines everything except the rotational orientation of the camera. In modern systems, this is done by defining an "up direction" which faces up in the camera. This game did not do this, instead opting to define a "right direction" that always faces right. In particular, the right direction is taken to be the left-right axis of the starship itself. This means that, for instance, the warp nacelles are always perfectly flat (or nearly so). This was likely useful as it is easy to pickout that orientation with a camera. This choice isn't always possible, in particular it completely fails when the starship is viewed from the side. The developers decided to fix this issue by instead defining a fixed up direction for that entire row of photos.

Back.