Relaxing Flight Simulator

Sal Gutierrez

Relaxing Flight Simulation

Finding ways to relax during finals week is no easy task. That is why I embarked myself in creating a relaxing flying experience for any Cal Poly students OR staff member that might need an escape from the busy hallways, classrooms and campus of our University. In this project I will demonstrate what I was able to come up with while being burried alive with work and school assignments. This is an OpenGL based project where I show the basic graphics that are involved in making a game like this.

This is an image showing the object file used for the main player plane. The plane is a multi-mesh object and, during runtime, appears in front of the camera.

Plane with Metal texture on

Picture showing the behaviour of how Shading works in the program. Notice how the flat area has a brighter spot in the middle and the edges are darker.

Blinn-Phong Shading
Terrain Texture

The terrain, although being large and having thousands of trianlges, it is textured with smooth transitions along the triangles.

Textured Terrain

Features

  • Blinn-Phong Shading
  • Texturing of Skybox
  • Texturing of Terrain
  • Materialed Plane
  • Third-Person Follow Camera
  • TinyObj used to read obj files
  • Multi-Mesh objects
  • Moving Lighting

Controls

  • Mouse Movement: Free camera movement
  • W: Increse Speed
  • A: Strafe Left
  • D: Strage Right
  • M: Start/Stop forward movement
  • Q or E: move the lighting source around
  • Z: Wireframe Mode

Other Intended Features

Boids

I tried implementing Boids in my project to make the world seem more lively. The planned behaviour for these Boids was to simulate combat airplane formations. Each boid would roam aimlessly around the world using Bezier curves to draw a path. Along their path, they would be checking for Boid objects called "Leaders".

These "Leader" planes are the head of each formation. In later versions of my implementation, all Boid planes would calculate the distance between them and the Leader using the dot prouct of their position and the Leader's position vectors. If the distance is within a threshold, then boid planes would recalculate their path and join the flock.

Once in a formation, planes would detach after a couple seconds of flying around; completely avoiding falling into a formation for a couple of seconds.

Unfortunately, planes would not correctly calculate the correct bezier curve to join the formation. Another issue I ran into pretty early on was making the correct translations and rotations on the planes to make their flying look seemless.

Rotating Player Plane

As of right now, the player plane stays static in the front of the camera. I wanted the plane to rotate as you move the camera left or right, up or down.

Multi Texturing on Terrain

My terrain object came with multiple PNG files: diffuse.png, flows.png, and height.png. By aggregating all these textures together, you could get a really cool looking texture on the terrain with even more detail.

At the moment, I am only using diffuse.png as the texture of the Terrain. It is really detailed but it could be even more detailed if this was implemented.