The text areas can be left blank in which case a 3d model or skybox will not be loaded and a vxl will not be output. Without all these things the program will still run but all you will see is a tri-ellipsoid shape and a polar-mapped sky which renders slower than skyboxes (environment maps) by the way. So far only 3ds models work. Only 24bit TGA skybox files work, Just pick one of the set of six TGAs to make the skybox work. A vxl will automatically be created before the viewer starts if you don't leave the destination text option empty and a 3ds model is loaded. The size option is really the resolution of the voxel. At the moment you can't change the size of the vxl independantly of the resolution with this program. You have to use a separate editor to do that. You can probably find one on Olaf's site mentioned in the credits.
By the way, the tri-ellipsoid shape is there for reference and is supposed to be 20x20x20 metres in dimensions and centered at the current origin of the model. It can be switched off as mentioned below by pressing the "-" key while the viewer is running.
Viewer keyboard controls:
The vehicle controls are similar to descent. You can rotate or slide on any axis using thrusters. I've also added fin control though. I'd prefer to not go into detail labeling each key one by one and just generalize because I think this is more convenient for everyone actually.
All the numpad keys from 0-9 are used for the thrusters plus the keys a and z are also used for forward backward thrust respectively.
The clump of keys UIOJKL are used for the control fins.
The punctation keys next to the enter key are used to guide the camera. You've got zoom, closer/farther, circle horizontally and circle vertically controls.
The nearby +- keys are used to switch the reference ellipsoids on and off.
The F# keys are for the switch view keys. So far there is only 2 views. F1 and F2. Inside and outside aircraft.
The spacebar is to render a full screen image.
Esc to quit.
Known Bugs or Shortcomings:
The normals encoding of the .vxl files has yet to be unscrambled. I don't have the patience to unscramble it. If you are the sort of person who enjoys creating approximate palettes for emulated arcade games where the palette PROM is missing, then you may enjoy reordering the normals indexes here. If you want to try then I will send you a test vxl to help you.
The viewer's movement may appear to hitch because the timer gives erratic numbers occasionally. I don't understand this myself but rebooting helps. Running certain programs before my program causes the problem but running other programs fixes it again.
Some triangles appear black and render very slowly or don't appear at all or look weird and staticy. I found 2 of the causes for this phenomenon. I fixed one but I'm still considering how to deal with another cause. However there's yet a 3rd cause, which I still haven't found. The second cause that I'm pondering about is related to texture mapping coordinates. A temporary solution is not to use the coordinates at all because if they cut out a point or a line instead of a triangle for each face from the bitmap then the problem happens. Another way of saying this is that you cannot have textures that stretch to infinity on any faces in my 3d engine. This is the downside to an optimization I developed that reduces the memory and processor usage. I've added code to test when texture map coordinates will cause an error in my program. It works sometimes. When it works the offending face should look fine except for the texture which will be aligned wrong.
Some models will have some parts where the normals are all facing the opposite of the correct way while some all face the correct way. If they are all incorrect then this can be remedied by changing the flip and swap checkboxes in the front-end, but if some normals are correct while some are incorrect then there's nothing you can do. I'm not sure what causes this but I suspect it's not a fault with my program but a fault with the program that output the 3ds file itself. I suspect that these messed up models were originally lightwave or other model formats which were then converted to 3ds with buggy converters.
Colors and texture mapping on 3ds models is incorrect. This is because the file format has many bizarre options and is not fully documented. It would help me if I had a copy of 3d studio myself. You can help me if you have it, by telling me how things look in my program compared to 3d studio. The bump maps may be either too flat or too rough. There seems to be contradictions about what variable controls this in the 3ds file. If the bump map is too rough it looks very fake and ugly.
All bitmaps must be either 24bit BMP or TGA format for now. If they are not, you must convert them to one of these 2, your choice.
If your frame rate drops too low the physics calculations may go haywire with extreme numbers and crash the program. I've put a makeshift fix for this which will force the sim to go into slow motion at low frame rates and this should reduce program crashing. As usual the faster your computer, the less you have to worry.
There is no collision detection in the flight sim yet.
Lights cannot be seen directly, only via reflections and illumination on other surfaces. This is because I'm waiting till I learn how to do hardware page flipping, because I want to draw the light halos on top of the finished image and not let you see the image before the halo is applied otherwise the halos will appear to flicker.
The vxl output is rather fast even though the conversion from truecolor to 8bit fixed palette is slow but that shouldn't bother you. However the viewer is extremely slow and that's why the viewsize has to be tiny.
A lot of ram is required. If you have only 64MB of ram you will notice that you have problems loading models with more than 50,000 faces. I've already reduced the memory usage of the faces significantly however there may be few other things I can do but I'm waiting till I figure out what the best approach is. Please note that this 3d engine is the first I've ever done, all written by me without any help and it attempts to do more than any other software 3d game engine or even hardware so far.
Ellipsoids will not render correctly if they go partially behind the camera to the right side.
Apparently my program will crash if run in any Windows edition after Windows 98 because they don't allow DOS programs to run anymore.
My program will crash if it runs in windowed mode instead of fullscreen. I believe you can fix this by changing the properties of my exe by right-clicking on it.
Internet sites:
A good place to get skyboxes (environment maps) is:
http://wadfather.game-edit.com/
and to get 3ds models:
http://www.3dcafe.com/asp/default.asp
http://www.swma.net/
http://www.theforce.net/scifi3d/
Hardware usage:
This program requires that you have capability for truecolor display in 640*480 resolution in either 32bit or 24bit color.
I would say you need at least 128MB in order not to see loading problems.
The keyboard is implemented but there is no joystick or mouse code.
Time calibration is there so, on different computers, animations should occur at the same time although the faster the computer the smoother the animation.
There's no sound.
Only generic instructions are used. No MMX or SSE1 or SSE2 or 3D NOW etc. is used.
No 3d acceleration is used.
No communication between computers is used.
Software used to make program:
This program was compiled with DJGPP (a free c/c++ compiler) as a DOS 32bit executable. Only C was used; no C++ or assembly. Allegro was not used.
Credits:
Don Nasri Karam
Virtual Prophet or ViPr
vi_pr@hotmail.com
http://www.geocities.com/vi_pr/test.htm
I made 3ds2vxl.exe
DMZ
Figured out everything about the vxl format that we know today.
Sigbjørn Lund Olsen
The Profound Eol
Eol@mojosys.com
http://www.mojosys.org/
Helped the guy above.
Haydn
Figured out what colors not to use from the vxl's palette.
Will Sutton
Made an editor for me to test voxels with.
Olaf van der Spek
XCC@XCC.TMFWeb.NL
http://xcc.tiberian.com/
Also made a viewer for me to test voxels with, and taught me the vxl
format, and made the front end for my program.