3

Hi! This is our last post with an update on our final project. We have been able to complete the technical features and have successfully created a scene that evokes some kind of rainy mood, at least in our opinion.

For sound effects, we used, as previously mentioned, the irrKlang library. It provided the right amount of audio support that we needed which was simply: audio loop playback and audio sample launching depending on events. In our final product, we simply looped a 2 minute wav file of rain in the background in addition to a random thunder sample being triggered every 7 or so seconds. We attempted to use OpenAL, but it was too much of a hassle attempting to link up the correct library and source/header files on Xcode. irrKlang proved to be the perfect alternative.

The visual aspect of getting good procedurally generated terrain was one of the challenging parts of this project. This included our attempts to texturize the terrain as well as trying to get it to generate more realistic mountainous landscape. At first, our generated terrain looked too soft and was missing those rough edges that real mountains had, but we found a way to fix this by simply modifying a parameter in our noise generator. Also we forgot to mention this in our last blog, but we used the  FastNoise library for noise generation. This was a helpful tool that allowed us to generate heights for our procedural terrain height map. After playing around with the octave parameter for the noise generator, we were able to get realistic ‘mountainous’ looking terrain. As for coloring the terrain, we failed to implement texturing in time, so we settled for a height based shading and used mesh wireframe to distinguish the bumpy features of our terrain. The mesh wireframe made it very easy to visualize the shape of the terrain because if we rendered it as a solid colored triangles, then it would look flat from the viewing angle in the screenshot.

Also should have mentioned in the previous post, but this was a good resource we used for implementing this feature.

I think something that we could have tried with this coloring technique, particularly to make the different types of terrain blend more realistically, was using a sinusoidal function with noise as the height limits for the colors instead of a flat height value (line), but due to time constraints we were not able to experiment.

As you can also see in the screenshot below, we’ve created a particle effects system that on  average shows up to 12,000 particles with very little slowdown.

And, after a bunch of tinkering, water with reflections and refractions also work. You can’t see in the screenshot but the water uses a normal map and a dudv map to create distortions and ripple effects in the water. It also has specular lighting as well, but that’s not as impressive. Also, because working with the water forced us to figure out how to use FBO’s, I used them to create some nifty post-processing effects in the shaders.

We initially wanted to setup the scene to have the camera POV sit behind a window inside a room, but we decided we wanted to spend our efforts on the more technical side of things.

Lastly, here is the video url… https://youtu.be/MCIh54PJFY8

Leave a comment