RQ_3DTerrain by JohnK

** legal stuff *** You cannot use all files in this program for your own development as some are for non-commerical use. I post it here for educational purposes. You can't use it for commercial purposes. 

This is the best 3D program in RapidQ so far. It uses almost all of the methods and properties in RapidQ for Direct3D. Program runs best with a 3D card (I get almost fullframe rate on an ATI Radeon 9800). Actually the hardware is getting faster so the slowness of RapidQ is not a problem!! In fact, since RapidQ uses the MS API calls (the COM interface) you are not slowed down by the floating point math. What really slows down the program is TEXTURES.

Running:
Be sure to have the Include files in the right directory.

When you run it the program asks for a Height map
load any bmp file with the word "Map" in it.

The other BMP files ("water", "ground", "pebbles") are TEXTURES. 

There are 5 Heightmap files that can be ADDED to make a large and detailed scene. This is
much faster than loading one big BMP file because QD3DmeshBuilder is very slow.

You can even make a complex room like DOOM (load walls_map.bmp)

You can load an X file (fokker airplane is included)
-LOTS and LOTS of goodies in here.

Support:
Faster access is through  http://groups.yahoo.com/group/rapidq/files/RQ_3D_Terrain.zip
The program uses an old technique of coding a 3-D terrain by the intensity of a bitmap file (also called a heightmap). It loads a bitmap (uses only the red pixel information) and then creates square faces and then adds them to a mesh by MESHBUILDER. 

The idea for RQ translation comes from an OpenGL tutorial by DigiBen at GameTutorials.com, which is a great site for programming infomation, NOT JUST GAMES. Some of the textures are his. Other textures come from links via the 3Dstate.com (previously Morfit, also a possible 3D engine for RapidQ)

The X model is from OPENFX (www.openfx.org)  - a great 3D modeler program for free (non-commerical use). It optimizes the model for face culling.
 

Heart of the terrain maker
DXScreen.CreateFace(Face)
Face.AddVertex (xxxxx)
QD3DmeshBuilder.AddFace(QD3Dface)


For more information on D3D in Rapidq, check out the guidance web site for more info...
http://g.slyip.com/
look in the documentation folder for my tutorial on Direct3D and the other updated windows API help file.

-John K


