Also Known As: None
|Maximum Image Size||NA|
|Multiple Images Per File||Yes|
|Supporting Applications||MTV, various conversion utilities|
|See Also||NFF, PBM|
Used by the MTV ray tracer, although numerous conversion utilities, usually associated with other ray tracers, exist.
One of the early ray tracers, still in use because of its easy availability, wide distribution, and simplicity.
Vendor specifications are available for this format.
Code fragments are available for this format.
The MTV formats were created to support Mark VandeWettering's MTV ray tracer and are named for the author. The MTV application has been ported to many platforms and has enjoyed wide distribution, through the comp.graphics newsgroup on the Internet and through the network of private (primarily PC-based) BBSs. Although the author considers both the program and the format to be dead, the format still enjoys a certain degree of currency, mainly due to its understandable design and simplicity. MTV is still being downloaded with some regularity from a number of bulletin boards and information services.
Both the MTV input format and the output format are based on other formats that are described . The following sections provide summary information only.
The MTV input format is identical to the Neutral File Format (NFF) developed by Eric Haines and described in detail in the NFF article.
NFF files consist of lines of ASCII text. Each line describes an object called an entity. The first field of each line describes the entity's type, and subsequent fields on the same line, and possibly subsequent lines, contain further information about the entity. The following entities are currently supported:
Entities are coded as follows:
|``v''||Viewpoint location (viewing vectors and angles)|
|``l''||Positional light location|
|``f''||Object material properties|
|``c''||Cone or cylinder primitive|
|``pp''||Polygonal patch primitive|
See the NFF article for a discussion of each entity.
The MTV output format is based on the PPM format, a part of the pbmplus package of utilities developed by Jef Poskanzer. PPM is described in the PBM article in this book, and the utilities are included on the CD-ROM. The MTV output format differs only trivially from the PPM format. The author of the MTV format describes the output format as follows:
An MTV format image consists of an ASCII header followed directly by the image data bytes. The ASCII header is merely a string containing the width and height followed by a newline character. The following C statement will print out the ASCII header:fprintf(fp, "%d %d\n", width, height) ;
This is followed directly by the image data, which is written out as three unsigned bytes per pixel, originating at the upper left of the image. This is identical to how the bytes are written out in the PPM image format.
If you desire to write PPM format files, you merely need to change the line which outputs the ASCII header to the following:fprintf(fp, "P6\n%d %d\n255\n", width, height) ;
Here is an example of a small pixmap in this format:P3 # feep.ppm 4 4 15 0 0 0 0 0 0 0 0 0 15 0 15 0 0 0 0 15 7 0 0 0 0 0 0 0 0 0 0 0 0 0 15 7 0 0 0 15 0 15 0 0 0 0 0 0 0 0 0
Programs that read this format should be as lenient as possible, accepting anything that looks remotely like a pixmap.
The PBM article provides additional information about the PPM output format.
The MTV ray tracer is no longer being maintained by Mr. VandeWettering, who considers it dead. However, ample documentation is provided with the format package, should the need ever arise. You may also be able to get additional information from:
1001 West Cutting
Richmond, CA 94804
Email: [email protected]
You can also contact:
Email: [email protected]