Aircraft textures

This topic contains 13 replies, has 4 voices, and was last updated by kdrnic kdrnic 3 months, 1 week ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Spoonboy
    Spoonboy
    Participant
    #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?

    rnlf
    rnlf
    Keymaster
    Podcaster
    #3404

    I 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 ๐Ÿ˜›

    Spoonboy
    Spoonboy
    Participant
    #3405

    Ha, 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.

    rnlf
    rnlf
    Keymaster
    Podcaster
    #3406

    Might be interesting to check out, but even for an experienced programmer it’s not easy without the actual code being available.

    sorceress
    sorceress
    Participant
    #3440

    .rb might abbreviate “rigid body”, ie a vector model which doesn’t change shape.

    Spoonboy
    Spoonboy
    Participant
    #3441

    I 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

    sorceress
    sorceress
    Participant
    #3446

    I do have some experience deciphering undocumented fiile formats, but alas, I don’t have this particular game.

    kdrnic
    kdrnic
    Participant
    #3447

    I’ve made you a .ZIP of the .RB files mentioned:

    RBS.ZIP

    sorceress
    sorceress
    Participant
    #3450

    does this point cloud look like a plane to you?

    Attachments:
    kdrnic
    kdrnic
    Participant
    #3452

    heh, how you managed the result so quickly?
    I tried this code but didn’t get good results:
    link

    rnlf
    rnlf
    Keymaster
    Podcaster
    #3455

    Clearly looks like the vertices of a plane. The outliers might be color information or triangle index lists intermixed with the vertex coordinates?

    Spoonboy
    Spoonboy
    Participant
    #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 ๐Ÿ™‚

    kdrnic
    kdrnic
    Participant
    #3468

    Managed 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:
    kdrnic
    kdrnic
    Participant
    #3470

    Here a DOS program for you to play with:

    Link

    It uses my TAPEGRO framework

    Use backspace to loop through the model files

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.