Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

3df file format

111 views
Skip to first unread message

Marcin Romaszewicz

unread,
Mar 12, 1999, 3:00:00 AM3/12/99
to
I realize this isn't the place to ask, but I was wondering if anyone
knows where I could find information on 3dfx's 3df image file format. I
need to be able to read these files in a bit of OpenGL code I'm writing.

-- Marcin

A

unread,
Mar 13, 1999, 3:00:00 AM3/13/99
to

From what I gather from my search I did for that, autodesk has not
released official specifications for the image format.
But, this hasn't stopped some hackers to try and figure that out. But, a
lot of the data are not known and are labelled as chunks.

This might be what you were looking for at
http://www.dcs.ed.ac.uk/~mxr/gfx/3d/3DS.spec

Marcin Romaszewicz <marcin@asmodean> wrote in article
<7cbvrv$cs...@fido.engr.sgi.com>...

Daniel Ludwig

unread,
Mar 13, 1999, 3:00:00 AM3/13/99
to

A schrieb in Nachricht <01be6d3e$271d8ac0$30bc6ec6@mylocalserver>...

>
> From what I gather from my search I did for that, autodesk has not
>released official specifications for the image format.

He asked for 3DF, not 3DS! ;-)

>Marcin Romaszewicz <marcin@asmodean> wrote in article
><7cbvrv$cs...@fido.engr.sgi.com>...
>> I realize this isn't the place to ask, but I was wondering if anyone
>> knows where I could find information on 3dfx's 3df image file format. I
>> need to be able to read these files in a bit of OpenGL code I'm writing.


It's fairly simpel. Every 3DF consists of a small header (text mode)
followed by the raw binary data. Example:

3df v1.1 // ID & version info
argb4444 // that's the texture format
lod range: 32 256 // mipmap ranging from LOD_256 to LOD_32 (4 levels)
// can be up to 9 levels (LOD_256 downto LOD_1)
aspect ratio: 1 2 // aspect ratio 1:2, this means LOD_256 is 128x256,
// LOD_32 is 16x32 etc.

now following the binary data:
(in this example: argb4444 format = 16bit each pixel)

size info
==== ====
128x256 x 2 Bytes LOD_256 data
64x128 x 2 Bytes LOD_128 data
32x64 x 2 Bytes LOD_64 data
16x32 x 2 Bytes LOD_32 data


Hope I got this right...

Another possible method: convert the 3DF back to TGA format using
the TexUS utility (included in the Glide2.x SDK), then read this
TGA image.


-- Daniel

Marco Koegler

unread,
Mar 13, 1999, 3:00:00 AM3/13/99
to

Marcin Romaszewicz schrieb in Nachricht <7cbvrv$cs...@fido.engr.sgi.com>...

>I realize this isn't the place to ask, but I was wondering if anyone
>knows where I could find information on 3dfx's 3df image file format. I
>need to be able to read these files in a bit of OpenGL code I'm writing.
>
>-- Marcin

Hi!

Do a search for AsinDesigner. It is a tool for exporting 3DF files to other
file formats. Also, the format seems pretty easy to read. Just have a look
at the header (it's in ASCII):

First line: 3DF <version>
Second line: (format in ascii) (ex: yiq, p8, rgb565, etc...)
Third line: lod range: <lowest> <highest> (ex: 1 256 for all LODs)
Fourth line: aspect ratio: <n> <m> (ex: n=1 m=1 for 1x1 aspect ratio)
Now follows the data associated with the chosen format (line 2). If you have
YIQ or P8 textures, then the tables seem to come first. For the format of
the tables see the description in the 3Dfx Programmers Guide.

I just gathered all this from looking at the file with a HEX Viewer, so
don't blame me if this doesn't work. It should give you something to work
with, though. I think in P8 files the palette is in a four byte per entry
mode (not three), where one byte is always 0.

Marco Koegler

0 new messages