A demo visualizing Einsteins special relativity theory using a simple ROAM terrain engine and some particles.
A lot of stuff is taken from “3D Terrain Programming” by Trent Polack. Some Vertex-Shading-dependant Code is taken from a relativistic Model Viewer made by some Students of the Uni Stuttgart, mainly with reference to Martin Schrodt. The Implementation of the 3ds-Loader is taken from gametutorials.com, check their website for some good quality openGL-Tutorials. But the Loader and Renderer for 3ds is very slow and does some bad performance-flaw to the whole Demo. You might wish to switch it off for a remarkable Speedup.
You can create your own raw-heightmaps by using the terrain-gen tool. Just keep in mind that a map of a dimension of 8192×8192 needs about 256MB RAM at Runtime! Plus extra Ram needed by Textures, models, vertexbuffers and so on you need at least 768 MB Ram to see it running good without swapping. The Skytexture and the Tree-Positions and -Scalings are computed randomly with every start of the Demo. The Sky-Texture uses fractal Brownian Motion for computing (fBM). For seeing the Demo at at least 20 fps, you need at least a P4 2Ghz or Athlon XP 2100+, 512 MB Ram and a GF3 Ti200.
The RelaVis-Demo was written as a study-project to present it at the Open-Doors-Day of the University of Applied Sciences Erfurt in Germany. It was showed there in the public area using a beamer and motion-sensing gamepad or keyboard and mouse.
If you encouter problems with building the project, like errors about glMultiTexCoord2fARB, glMultiTexCoord2fvARB or glClientActiveTextureARB, try to uncomment the lines in sdl-glapp.h and sdl-glapp.cpp containing these. Seems like a strange Linux-distribution-dependancy. If you own an ATI-Graphics Adapter and the programm Crashes when trying to render, try to set the g_bUseVA-Variable in sdl-main.cpp to false. On some Cards, the VertexArray-Rendering seems broken. No idea if this is a popular problem or not, never saw it anywhere on the Internet. If you switch between Realtime and Slopelighting, you have to move the terrain-mesh out of side and return, to make sure all buffers are refreshed. If you have Frustum Culling disabled, you have to enable it first to refresh the Buffers. If you compile the project yourself, check for Optimization-Flags in the Makefile. For my system, -O2 -march=athlon-xp and no -g gives me a remarkable speedup of 3-10 fps. Look in log.html if you want some Information of runtime-messages
For all functions, you need a four button joystick
Joystick Movement: Move up/down/left/right
Button A: move faster/forward (depends on flight-mode)
Button B: Increase Beta
Button C: move slower/backward (depends on flight-mode)
Button D: Decrease Beta
Hat: Look left, right or back
Cursor-Keys: Move in/out, Strafe left/right
w: Wireframe Rendering
s: Solid Rendering
f: Toggle Fogging (Useless, gives bad results because renderer doesn’t support it (Vertex Shader)
v: Toggle alternate Array-less Rendering Mode (broken)
b: Increase Beta
c: Decrease Beta
l: Toggle Lighting Realtime/Slope (default Slope, gives better Results until now)
x: Toggle Frustum Culling (Needed for Lorentz-Effect, but EXTREME Performance-Loss, since Rendered Vertices is up to 10 times higher than with Culling enabled!)
m: Toggle Flight-Mode (moving constantly)
Download the tarball here (11711272 bytes). You need Linux and capabilities to compile with SDL and X11-Support based on a Makefile. So you need a recent Compiler, SDL-devel and X11-devel-packages. Everything else is some strict C/C+++ and should not cause any problems. Make sure to check the README in the tarball and flaws section on this site if you encounter any problems. You most likely have to tinker on the source if you want to see it completely on an ATI card.