Aircraft textures
Home › Forums › Previous Months › 29 – June 2019: Knights of the Sky › Aircraft textures
- This topic has 13 replies, 4 voices, and was last updated 4 years, 4 months ago by kdrnic.
-
June 4, 2020 at 4:27 pm #3401
Does anyone know if it is possible to edit the aircraft textures in Knights of the Sky? And how this could be done?
Just getting back into playing KotS again, and it would be great to make my own ace markings!
In the game folder, the aircraft files are .rb (Ruby?) files. Not sure if/how these could be edited, or if the textures are in a different file.
Loads of other file types I’ve never heard of.
Standard.pln?
Planes.cat?
Has anyone ever tried this?June 7, 2020 at 9:59 am #3404I have no info on that, but I *assume* the “textures” are actually solid color polygons, so editing them would mean editing the plane geometry.
Andy Ruby is 5 years newer than the game, so that’s highly unlikely 😛
June 7, 2020 at 10:08 pm #3405Ha, I wonder what all those weird file extentions mean…
As my programming knowledge is practically zero, I naively hoped to find files with flattened-out versions of the planes, that I could easily edit in Photoshop (or MS Paint!). I fear that may not be the case 😀
I still wonder if these textures can be edited somehow.June 9, 2020 at 11:39 am #3406Might be interesting to check out, but even for an experienced programmer it’s not easy without the actual code being available.
sorceressParticipantJune 11, 2020 at 7:16 pm #3440.rb might abbreviate “rigid body”, ie a vector model which doesn’t change shape.
June 11, 2020 at 10:45 pm #3441I like that theory! Have you noticed this in any other games of the era? (This is a Microprose game)
A lot of the files have quite decriptive extentions (.pln, .pic, .dat, etc). If only I could get into them.
And had the ability to do anything with them once I’d got into them..:D
sorceressParticipantJune 13, 2020 at 5:34 pm #3446I do have some experience deciphering undocumented fiile formats, but alas, I don’t have this particular game.
kdrnicParticipant
sorceressParticipantJune 13, 2020 at 7:37 pm #3450does this point cloud look like a plane to you?
Attachments:
kdrnicParticipantJune 14, 2020 at 4:59 pm #3455Clearly looks like the vertices of a plane. The outliers might be color information or triangle index lists intermixed with the vertex coordinates?
June 16, 2020 at 11:54 am #3460@sorceress looks like a Fokker Eindecker!
One of the early enemy aircraft in the game.
There are some recognisable features, but not sure about the points behind the aircraft. I thought they could’ve been related to the smoke polys (that appear when planes are shot down), or maybe something to do with hitboxes?
But I really LOVE this point cloud gif.
Seeing something recognisable from my past, in an abstract way, it feels like opening Tutankhamun’s tomb and finding his fingerprints on a cup 😉
For those that know the game, this would make a great quiz – guess the object!
Maybe the patterns/colours are kept in a different file, although @kdrnic’s code did seem to contain colour information?
The game is about 1Mb and is available on freeware/abandonware sites, if you wanted to see the rest of the files (Or I could post it here? Not sure if posting whole games is ok?)
Anyway, thanks so much for showing me familiar things in interesting ways 🙂
kdrnicParticipantJune 20, 2020 at 3:15 pm #3468Managed to get a similar point cloud now:
bin = ReadFile("fokker.rb");
_idx = 256;
_offs = 0;
var signed = true;
var short = true;
var endian = false;
var old_buttons = 0;
function Loop(){
ClearToColor(screen, 0);
_idx += dpad[0].x * 0.1;
_offs += dpad[0].y;
var idx = Math.floor(_idx);
var offs = Math.floor(Math.abs(_offs));
var pressed = buttons[0] & (~old_buttons);
old_buttons = buttons[0];
if(pressed & BUTTON_A) signed = !signed;
if(pressed & BUTTON_B) short = !short;
if(pressed & BUTTON_X) endian = !endian;//for(var i = 0; i + idx < bin.length; i += 3 * (short ? 2 : 1) + offs){
for(var i = 0; i < 128; i++){
x = bin[idx + i * (3 * (short ? 2 : 1) + offs) + 0 * (short ? 2 : 1) + (endian ? 0 : 1)];
y = bin[idx + i * (3 * (short ? 2 : 1) + offs) + 1 * (short ? 2 : 1) + (endian ? 0 : 1)];
z = bin[idx + i * (3 * (short ? 2 : 1) + offs) + 2 * (short ? 2 : 1) + (endian ? 0 : 1)];
if(signed){
if(x > 127) x -= 256;
if(y > 127) y -= 256;
if(z > 127) z -= 256;
x += 127;
y += 127;
z += 127;
}dx = bin[idx + i * (3 * (short ? 2 : 1) + offs) + 0 * (short ? 2 : 1) + (endian ? 1 : 0)];
dy = bin[idx + i * (3 * (short ? 2 : 1) + offs) + 1 * (short ? 2 : 1) + (endian ? 1 : 0)];
dz = bin[idx + i * (3 * (short ? 2 : 1) + offs) + 2 * (short ? 2 : 1) + (endian ? 1 : 0)];x += dx / 256;
y += dy / 256;
z += dz / 256;var t = 256, s = 3;
x *= s;
y *= s;
z *= s;
x -= t;
y -= t;
z -= t;var c = 0xFFFFFF;
PutPixel(screen, x, y, c);
PutPixel(screen, x + 256, z, c);
PutPixel(screen, y, z + 256, c);
}
TextOut(screen, "IDX : " + idx, 256, 256, 0xFFFFFF);
TextOut(screen, "OFFS : " + offs, 256, 256 + 8, 0xFFFFFF);
TextOut(screen, "LEN : " + bin.length, 256, 256 + 16, 0xFFFFFF);
TextOut(screen, "SHORT " + short + " SIGN " + signed, 256, 256 + 16 + 8, 0xFFFFFF);
TextOut(screen, "ENDIAN " + endian, 256, 256 + 16 + 16, 0xFFFFFF);
}
Attachments:
kdrnicParticipantJune 20, 2020 at 3:45 pm #3470Here a DOS program for you to play with:
It uses my TAPEGRO framework
Use backspace to loop through the model files
You must be logged in to reply to this topic.
Home › Forums › Previous Months › 29 – June 2019: Knights of the Sky › Aircraft textures