Rendering a 3D terrain

This is a sample screen of the common technique in 3D graphics - use the grey scale intensity of a bmp file to make a virtual terrain; uses bmp for heightmap, virtual terrain renderer, great for 3D effects, shows the possiblities of D3D in Rapidq.

The idea comes from an OpenGL tutorial by DigiBen at www.GameTutorials.com, which is a great site for programming infomation, not just games.. Some of the textures are his. Other textures were generated by Terragen, an awesome raytracing program for realistic landscapes.

There are a few 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.  This code is a good resource of learning DirectX retained mode graphics programming.

RapidQ Source  code:
RapidQ 3D include file:
Download sample app:

Vista /Win 7/Win 8 users: you will need to download this DLL file. Unpack it and put it in the same folder as the program.
Details:
Direct3D  retained mode is no longer in further development by Microsoft, but was still be supported by newer DirectX/3D releases. The reason why it is called retained mode is that all the 3D information ( vertices, texture coordinates, normals) are stored in fixed memory and cannot be changed rapidly. This type of rendering is good for objects with fixed geometry. The fokker model comes from the OpenFx Project. An excellent 3D modeling program.

3D retro game

What programming language doesn't have a PONG spinoff? This program is a 3-D version of the old PONG game - - except it has a rotating court inside a huge sphere! The  code demonstrates simple ways to put together a full screen game, using Direct3D. The include file has several custom components inside it, for instance the QD3DPrimative, which makes simple 3D structures as boxes, spheres, cones, planes, and cylinders. They are made up of 3D faces. You will notice that they have dull surface material properties,  rather than shiny with light hot spots. This is because of a limitation in RapidQ Direct3D that does not let you specify the surface normals (perpendicular direction to the face for calculating light reflectance).  Another thing you will notice is the use of QD3DCloneMesh a way to make multiple copies of a 3D object (the 'semi-transparent particles.')

RapidQ Source  code:
RapidQ 3D include file:
Sample app

Vista /Win 7/Win 8 users: you will need to download this DLL file. Unpack it and put it in the same folder as the program.

Details:  The original code for this came from a 2D PONG game written in Basic4GL.
Boris' DEA engine with new modifications

All work and no play means breaking out and playing with some 3D code in RapidQ!

For a demo program with code, click here: This program requires at least a P4 processor with a 32MB 3d video card, DirectX 6 or higher. You will need about 50Mb of free RAM.

Vista /Win 7/Win 8 users: you will need to download this DLL file. Unpack it and put it in the same folder as the program.


Details:
All code is native RapidQ. this shows how to use the D3DCloneMesh to render lots of the same model. The models were supplied by Boris Holyguard and made with the Dele 3D engine (http://delgine.com).

Notice the code uses a QTimer to do some background calculations. I get frame rates up to 30 - 50 / second on a Celeron 1.2 Ghz.