|

June 6, 2006 - Worked on loading a 3DS model of a Cessna 140 airplane into the 3D engine. Wrote basic 3D code such as lighting and heightmap terrain using OpenGL. Tried to add vertex buffer object support, but the simulation crashes with it. Added texture mapping using the SDL_image library. This allows my program to load and use textures from a variety of image formats.
June 7, 2006 - Wrote code to allow for an interactive camera (viewpoint) controlled by keyboard input. Quaternions and vectors are used to calculate the position and rotation of the camera without gimbal lock.
June 8, 2006 - Wrote code for 3D real-time rigid body dynamics simulation. Euler numerical integration is used for the time step function to calculate velocity and position based on the forces and moments applied to the rigid body. Quaternions are used to avoid gimbal lock, which would particularly affect an aircraft. The plane now flies across the screen when a thrust force is applied to it. It also realistically responds to gravity.
June 9, 2006 - Improved camera code in order to follow the plane in flight. Added OpenGL extension loading code. Tried to optimize terrain renderer to use Vertex Buffer Objects (VBOs), but OpenGL was crashing. Wrote code to generate console output logs. Wrote code to use SDL_ttf library to render TrueType fonts onto the OpenGL viewport. This is useful for the HUD and for debugging purposes. Wrote debug code to dump areas of memory into the output logs in order to check terrain vertex data.
June 21, 2006 - Found empirical data showing lift and drag coefficients of cambered airfoils for various angles of attack and data with flaps deflected at a +/- 15 degree deflection. Will implement this data in the flight model.
June 22, 2006 - Wrote basic elemental flight model using lift and drag calculations based on empirical data and the physical properties (mass, CG coordinates, incidence angle) of the plane. Wrote input code to control the plane's flaps, rudder, ailerons, thrust, pitch, and roll. Encountering a bug with the flight model. The plane is rotating and out of control. Stalling is detected when lift force is no longer being generated. On screen data is displayed about the state of the plane.
June 23, 2006 - Began to try to fix bug. Wrote code to enable and disable flight elements. Drew a graph of the flight elements in their coordinate systems and wrote down observations when flight elements were disabled. Wrote code to generate HTML-formatted tables of data for each flight element in order to identify the source of the bug. Improved rigid body dynamics code to keep track of angular acceleration for calculating moments. Wrote a rigid body box simulation test case for debugging rotations.
June 24, 2006 - Fixed bug in flight model which would cause plane to stall and nose dive rather than fly. All flight controls were inoperable. The normals were being calculated in the wrong coordinate system, resulting in significantly incorrect angles of attack, which were out of the range that generated any lift.
June 25, 2006 - Added sky box support, tweaked camera to allow for better following distances, fixed negative lift coefficients being generated resulting in unrealistic stalling. Fixed camera following code, which was not rotating along with the plane by rotating the camera's vectors with the same rotation quaternion as the airplane rigid body. Added screenshot taking code. Fixed a bug causing excessively large step sizes in the integration code. Fixed problems with sky box texture coordinates.
June 26, 2006 - Added buildings to the terrain. Added multiple camera views from outside and inside the plane such as ground view, side views, back view, and cockpit view. Began work on instrument panel. Found images of various flight instruments and edited them to create suitable textures for the instruments. Began writing code to render 2D instruments and to properly calibrate and draw instrument needles. Added a turn coordinator, an airspeed indicator, an altimeter, a vertical speed indicator, and a compass. Noticed bugs in compass rotations and with airspeed indicator calibration (the numbers are not evenly spaced apart).
June 27, 2006 - Finished instrument panel. Added an artificial horizon (attitude indicator) and used the stencil buffer to ensure that the artificial horizon texture was only being drawn within the boundaries of the attitude indicator face plate. Used vector dot products to fix compass problem through the use of a North vector and a direction vector. Also, the range of the inverse cosine needed to be adjusted based on the quadrant of the direction vector in order to allow the compass to fully rotate. To fix the air speed indicator calibration, I gathered data points in the form of (airspeed, angle) ordered pairs and discovered that they resembled a cubic function. Using cubic regression, I was able to find a cubic function to calibrate the air speed indicator. Made the airplane propeller transparent via blending.
June 28, 2006 - Added sound to the flight simulation. Found various free samples on the internet and used the SDL_mixer library. Wrote code to blend between engine sounds at various throttle settings. Added ambient sounds such as wind via loops. Also, wrote code that triggers sounds based on the state of the simulation. For example, stalling and raising/lowering the flaps calls code to play the appropriate sound. Tweaked volume and channels used by each sample.
July 4, 2006 - Added collision detection based on the ground plane via bounding boxes. Tested bounding boxes with a visual debugging function that draws the bounding box points onto the screen. Used Newton’s Empirical Impact Law in order to compute the impulses generated by collisions in order to respond appropriately to collisions. Unfortunately, this causes singularities with the numerical integration. Tested the collision response using the box simulation test case developed earlier. Added basic contact forces with the ground by writing a function to detect contact and respond to it by adding a single, opposing force along the collision normal. This is not the best way to handle contact, but will suffice for now. Experiencing problems with generating appropriate moments when responding to collisions and to resting contact. Experimenting with various numerical integration methods such an improved 2nd order Euler method and a 4th order Runge Kutta method because the 1st order Euler method I am currently using is quite inaccurate. Overall, there are still various problems with the stability of the new code that will have to be solved.
July 7, 2006 - Worked on atmospheric code. Added 3D cloud rendering support using a random function and billboards of a cloud texture. Ran into some initial blending problems, but resolved them by masking out the depth buffer during the 3D cloud rendering. The density and height of the clouds are controllable. Added fog rendering using the OpenGL fog functionality.
July 8, 2006 - Began optimization work with terrain engine by subdividing terrain into uniformly sized partitions and by using visibility culling to render only the visible terrain partitions. This made the simulation run approximately 20 FPS faster. Researched quad trees as a method for further optimizing the terrain renderer. Wrote a string parser, a configuration file system, and a command line argument parser in order to allow the simulation parameters to be easily tweaked without editing and recompiling code. Found a real-life terrain elevation data set of the Grand Canyon and converted it to the engine's internal terrain format. I will be using the new data as a basis for further optimization work. The goal is to use the config file system to allow the user to modify as many simulation parameters as possible. Added Vertex Buffer Object (VBO) support to the terrain code in order to further optimize terrain rendering.
July 12, 2006 - Continued optimization by attempting to add quad trees to the simulation. Unfortunately, the simulation crashes with quad trees. Began work on resting contact.
July 13-15, 2006 - Researched resting contact for rigid body dynamics. Various methods include analytical (LCPs, quadratic programming), penalty-force (spring-based), impulses, and microcollisions.
July 17, 2006 - Implemented resting contact using an impulse-based method. By detecting and preventing penetration through adding impulses, a rigid body is able to rest on the ground. The plane can now take off and land. Experiencing a bug with angular velocities and resting contact. Fixed several bugs with the instruments and the terrain coordinate system height code.
July 18, 2006 - Added appropriate landing-related sounds to the simulation such as airplane crashing sounds, runway touchdown sounds for smooth landings, and splashing sounds for landing in the water. Worked on fixing instrument rotation bugs.
July 19, 2006 - Added a runway to the simulation. Hollowed out a flat portion of terrain in order to solve problems with the runway not matching the slope of the terrain. Tested simulation for bugs and made a list of all bugs that need to be fixed. Stored list in databook/ directory. Fixed bug that caused depth buffer z-fighting with the terrain and the water plane by loading in a new projection matrix with an optimal drawing distance when drawing the terrain and the water.
July 20, 2006 - Fixed bug that prevented the partition of terrain directly below the camera from being rendered. Added code to prevent trees and buildings from overflowing past the rendered terrain. Fixed buildings that appeared on top of each other due to the same random coordinates being picked twice. Added mouse look code for free motion mode instead of using a bunch of keys to control the viewpoint. Fixed minor bugs with input handling.
July 23, 2006 - Fixed bug with turn coordinator and attitude indicator in which global rotation was used instead of local rotation. This resulted in the roll and pitch axes switching based on the current rotation along the yaw axis. Added terrain level of detail rendering to the simulation. Terrain partitions that are rendered from a farther distance are rendered using less triangles. There are four levels of detail. Fixed bugs involving stalling while at rest on the ground and landing always resulting in crashing. Stopped clouds from rotating along the z-axis to face the camera.
August 1, 2006 - Worked on more bug fixes and ported the code to the Windows operating system. Further testing will be necessary on this new platform.
|