Thread: Lanthanide and Actinide

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Banned
    Join Date
    Jan 2003
    Posts
    1,708

    Lanthanide and Actinide

    This project:

    -Reads and quickly renders Quake3 .BSPs compiled with GTKRadiant 1.2. This is an extremely fast process utilizing Potential Visibility sets and Frustum Culling. What this means is only the potentially visible leaves that have a part of their bounding box in the viewing volume are draw to the screen. On my Geforce2mx 400 64MB card I was hitting 100 fps in 1024 * 768 (with vsync disabled). With my Radeon 9600 PRO it's always above 200FPS on 1280 * 1024.

    -Fast but accurate method of extracting view frustum (this was a PAIN to get working because usually I could rotate vectors in relation to the View vector to receive the six plane normals, but the inaccuracies multiplied out, eventually I just extracted the right and bottom plane normals from the OpenGL matrices, then mirrored those over the view vector to receive the other plane normals).

    -Collision detection using a 'semi spheroid' algorithm (as opposed to using a bounding box algorithm, which isn't that difficult to be honest. My method basically just means you can perform ray tracing using a sphere for collision detection but also have a HEIGHT which is bigger than RADIUS units...this was a pain in the arse to get working to be honest)

    -Sliding across faces: I didn't think this would be as difficult as it was, but when you slide across a face you have to recursively trace along the faces until the direction you want to move in receives an invalid length (meaning you run out of steam).

    -stepping up stairs: I didn't know how to go about this so I just detected a collision, and then I pushed the camera up STEP_UP units (STEP_UP was defined as HEIGHT>>2 because I approximated the most you can reasonably step up is 1/4th of your total height) then traces from the newly elevated position forward, and if the fraction of the move that could be travelled was greater than .5 (magic number for now) then it counted as a step. This was also difficult to get working because you could sometimes go and hit a wall and 'jump' up.

    -Realistic gravity: This part took me a while to get working properly. As you know gravity is not a velocity, it is an accelerator. I tried using the derivative 32*timeinair to calculate the instantaneous velocity of gravity, but it didn't seem right, so I instead am using 16 * timeinair^2 to calculate that velocity. I'm not entirely sure what I'm doing on this part, but it works.

    - capability to shoot the world. Also calculates the angle of reflection off of that surface and draws the normal at the point of collision

    - utilizes pre compiled quake3 lightmaps, meaning fast static shadows can be drawn without having to rely on hardware (that would slow things down if the lighting was calculated for every pixel in the scene).

    - uses time based movement, so no matter how fast the scene is being rendered you will always move SPEED units per second

    -fully functional 3d vector class with a vector operations library. Utilizes DotProducts and Crossproducts, Projects vectors onto planes, finds parallel and perpendiular components between two vectors, and rotates vectors.



    All questions, comments, and constructive criticisms welcome.
    EDIT: This site is currently working and has no bandwidth limit (as in it wont shut down on me, but it might run slow if you all download at once).
    Also, perspective may come through and loan me a site as well (*crosses fingers*), I would like to have two. Anyway this first link is the directory with all of the files necessary to test the engine. You technically don't need textures.zip, but I encourage you to download it if you can (~5MB) because it looks much much nicer with the textures. Everything must be extracted to the same directory, I wrote a detailed explanation of how everything should be laid out if you aren't sure what to do.

    http://www.thedevelopersalliance.com/~shadow12345/
    Last edited by Silvercord; 07-22-2003 at 07:52 PM.

Popular pages Recent additions subscribe to a feed