top of page

3D rendered Scene

I used Hierglyph 3 to create a racetrack with dynamic lighting

sud car cw.mp4

For This Project, we had to learn Hieroglyph 3. It taught us how basic game renderers function as we learnt how to make basic planes, shapes, textures, lights and 3D models. I then had to combine all of these into a racing scene. 

 

I used a path and checkpoint system to have the 2 cars going around the track.  

I then added a sky box which used a transparent changing texture that goes from night to day using a cycle.

I then added in a directional light linked to this as the general skylight for the scene. 

I added 2 spotlights to the front of the cars and used their rotation and position to constantly update it. 

 

This project helped me to learn about rendering and also the differences in lighting. It also made me have to consider the best camera angle and I had to choose between a static camera, an orbiting camera and also using a dynamically changing camera that swaps between the cars point of views

Inside of the Car class, the plane is initialised using the same variables as the 2 cars as the update car function is used to update both types of vehicle. The differences between the 2 being the speed of movement, speed of rotation and the checkpoints. For the plane, the checkpoints are created using a simple circle generator and sets one of the points y value higher up. 

The tpf (time per frame) if statement limits the frames per second to 60 to keep the vehicle movement stable. If the computer running it hit a memory spike or the fps tries to jump, this hard sets it.

 

the vehicle checks its distance to the next target to determine when the next checkpoint is reached. the rotation is a slow and gradual change instead of setting the rotation instantly as that would cause snapping and make the overall movement look worse.

 

Its actual movement is a constant velocity forwards using the cars linear speed. because of the gradual rotation, this causes the overall path that the car follows to be smooth and curved.

bottom of page