Descentforum.DE Forum Index Descentforum.DE
Search | FAQ | Memberlist | Usergroups | Newsfeed Newsfeed  Register
Profile | Log in to check your private messages | Log in 
Chat | D3-Tactics | Downloads | Map | Links | Serverlist | Teamspeak 

OGF Konverter

 
Post new topic   Reply to topic    Descentforum.DE Forum Index -> Level-, Design und Entwicklungs - Forum
View previous topic :: View next topic  
Author Message
Munk
Forum-Nutzer


Joined: 30 Jun 2001
Posts: 2140
Location: Herzogenrath

PostPosted: 05.02.2006, 11:02    Post subject: OGF Konverter Reply with quote

Ich suche einen OGF-Konverter, er sollte sich von der Kommandozeile aus bedienen lassen und möglichst unter Linux laufen. Weiß jemand weiter ?
Alternativ kennt jemand die Spezifikationen von OGF-Files ? Dann schreib ich mir selbst einen.
Back to top
View user's profile Send private message Send e-mail
Atan
Moderator


Joined: 27 Jul 2001
Posts: 876

PostPosted: 05.02.2006, 11:52    Post subject: Reply with quote

Das hab ich irgwann mal abgespeichert, keine Ahnung mehr woher, ich hoffe das es i.O. ist.



OGF-Header:
typedef struct tagOGF_HEADER {
BYTE hdr[3]; //00 00 7A
string filename; //Null-terminated string
BYTE miplevel; //0x01 or 0x05 -- 0x05 indicates 5 mipmaps
BYTE filler[9]; //all 0x00
short width;
short height;
short unknown2; //ALWAYS 20 28
} OGF_HEADER

The rest of the OGF file is RLE-compressed.

After the header you just have a byte giving the length of what's coming, and then the 16-bit color, but max length is 0xFA. 0x00 means the same as 0x01: length=1. After the first mipmap, comes each successive mipmap, but nothing but data.


Mipmaps

Mipmaps are textures stored at a number of different resolutions. In Descent 3, each mipmap level is 1/4 the size of the preceding level. For example, a 128x128 texture with 5 mipmaps will look like this:
Mipmap level 1: 128x128 (the original texture)
Mipmap level 2: 64x64 (lower resolution, used by the game for a somewhat distant object)
Mipmap level 3: 32x32 (smaller still, used for a more distant object)
Mipmap level 4: 16x16 (for an object even further away)
Mipmap level 5: 8x8 (an object on the very edge of vision)

All mipmaps for a given texture are stored in the same .OGF file.
Back to top
View user's profile Send private message
Munk
Forum-Nutzer


Joined: 30 Jun 2001
Posts: 2140
Location: Herzogenrath

PostPosted: 05.02.2006, 20:30    Post subject: Reply with quote

Danke Atan. Weißt Du zufällig, in welchem 16bit-Format die Bilder sind ? 565, 5551 oder 4444 ?
Also ob 5bit Rot, 6bit Grün, 4bit Blau
- oder 5bit Rot, 5bit Grün, 5bit Blau, 1bit Transparenz
- oder 4bit Rot, 4bit Grün, 4bit Blau, 4bit Transparenz ?

Die Bilder bekomm ich damit dekodiert, aber die Farben stimmen noch nicht.
Back to top
View user's profile Send private message Send e-mail
Atan
Moderator


Joined: 27 Jul 2001
Posts: 876

PostPosted: 05.02.2006, 20:53    Post subject: Reply with quote

Kann ich Dir leider im Moment nicht genau sagen.
D3 Image Tool zeigt mir bei allen ogf Texturen 1,5,5,5 an,
ich weiss aber nicht ob es der Wert ist den Du suchst.
Wenn es das nicht sein sollte sage Bescheid, ich forsche dann mal weiter.

Nachtrag, dieses hier habe ich noch gefunden, ansonsten bisher Fehlanzeige.

OUTRAGE_4444_COMPRESSED_MIPPED = 121
OUTRAGE_1555_COMPRESSED_MIPPED = 122
OUTRAGE_NEW_COMPRESSED_MIPPED = 123
OUTRAGE_COMPRESSED_MIPPED = 124
OUTRAGE_COMPRESSED_OGF_8BIT = 125
OUTRAGE_TGA_TYPE = 126
OUTRAGE_COMPRESSED_OGF = 127
BITMAP_NAME_LEN = 35
' Transparent color constant here.
OPAQUE_FLAG16 = &H8000&
Private Const TRANSPARENT_COLOR32 = &HFF00&
Private Const NEW_TRANSPARENT_COLOR = &H0&
Private Const OPAQUE_FLAG = OPAQUE_FLAG16


Last edited by Atan on 05.02.2006, 21:12; edited 1 time in total
Back to top
View user's profile Send private message
Munk
Forum-Nutzer


Joined: 30 Jun 2001
Posts: 2140
Location: Herzogenrath

PostPosted: 05.02.2006, 22:03    Post subject: Reply with quote

Hey Danke, mit 1555 hats wunderbar geklappt.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Descentforum.DE Forum Index -> Level-, Design und Entwicklungs - Forum All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
PayPal


Descent is a trademark of Interplay Productions.
Descent, Descent II are © Parallax Software Corporation.
Descent III is © Outrage Entertainment.
Descentforum.DE and Descentforum.NET is © by Martin "Do_Checkor" Timmermann.
Powered by phpBB © 2001-2008 phpBB Group