Git Product home page Git Product logo

prototype-rollercoaster's Introduction

Maintenance Maintenance

Prototype-RollerCoaster

Disclaimer!

The Program was written in C++ utilizing:

  • OpenGL
  • Microsoft Visual Studios C++.

Video

YouTubeThumbNail

Features:

SkyBox

The roller-coaster is contained in a skybox: a cube with textures of ground,horizon, and sky that fit together to appear as a seamless large environment. To give my skybox a more realistic effect of being infinitely far away, I had it unaffected by the translation of the camera. Thus, no matter how far I moved, the skybox will never get closer.

Track

Catmull-Rom splines have C^1 continuity, local control, and interpolation. They are fantastic in ensuring C^1 continuity and having smooth curves. The Catmull-Rom spline essentially functions by taking 4 points and giving back positions from the interpolation between the 2nd and 3rd points where the starting position would be the integer 0 at the 2nd point and ending position would be the integer 1 at the 3rd point. With this, I stored these positions to shape the curve and track itself.

To create the track itself, I modified a track file containing a collection of control points that the track will go through.

Camera Control

Utilzing catmull-spline and conservation of energy, the camera follows the interpolated control points between 2 points (from 0 to 1 as indicated from the picture). We use these control points to help direct the camera's motion and its orientation by using it to calculate the overall velocity in the system depending on the level of height.

Basic Shading: Lighting of Normals

When light hits an object, an important fraction of it is reflected in all directions. When a certain flux of light arrives at the surface, this surface is illuminated differently according to the angle at which the light arrives. If the light is perpendicular to the surface, it is concentrated on a small surface. If it arrives at a gazing angle, the same quantity of light spreads on a greater surface. This means that when we compute the colour of a pixel, the angle between the incoming light and the surface normal matters.

By accurately computing the normals of my track, the lighting on my track produced a very high degree of visual realism.

Source for Images and more info:

https://www.mvps.org/directx/articles/catmull/

catmullRom.pdf

Preamble

Press T to get on the track and press again to get off track

Press the U,I,O to increase transformations

Press the J,K,L to decrease transformations

Shift+Key will alter scale

Control+Key will alter translation

Key along will alter rotation rate

Pressing Comma will increase transformation Step

Pressing Period will decrease transformation Step

Pressing G will reset transformations

Pressing Q will toggle Quaternion Rotation

Pressing B will toggle reflections for the box textures

Pressing H will toggle heightmap

Pressing N will toggle Normals

Pressing P will print information

prototype-rollercoaster's People

Contributors

hidannyz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.