Procedural Generation of Randomized Terrain

and Summoning Particle Fires in a Forest Environment


=====================================


Megan Washburn  |  CPE 471 Final Project  |  Fall 2017  |  Zoë Wood


----------------------




----------------------


Controls:


- Press `1` to switch to filled in triangles, and `2` to switch to a wireframe fill view.

- Move mouse across screen to pan and turn virtual camera.

- Click to attract the fire to your position!

- Press the `W` key to move forward, `A` key to move left, `S` key to move backwards, `D` key to move right, `X` key to slow down, and `spacebar` to increase speed.

- Press the `Q` and `E` keys to pan the four included lights along the x-axis.

- The `M` key toggles between 7 different materials.

- The  `N` key toggles between phong shading and silhouette shading.


----------------------

Introduction:


      - The aim of this project was to explore the interactivity possibilites of a particle system, and to develop methods of procedural generation of terrain and related objects in a CG environment.



----------------------

Technologies and Features:


- Procedurally Generated Randomized Terrain, Using Perlin Noise

      - Generated Perlin Noise, and calculated interpolated heights to achieve smooth effect.

      - Can change amplitude, octave, and roughness values to attain variable randomly generated terrain.

      - Random seed was assigned for calculation purposes, such as accessing normal values for one given triangle (top left or bottom right in a respective grid square). This seed would be necessary for low-poly normal calculations...

      - Attempted low-poly style by assigning the same normal (based on one chosen provoking vertex) throughout a triangle, but still in progress.

- Note the trees and fire render to the respective heights of the terrain, no matter what the random generation is.






- Particle System to Render Fire

      - The fires appear to flicker, as there is a subtle oscillation of half of the particle's sizes per render call. Alternating glPointSize on consistent particles (based on their index parity in the array, even or odd) implies a "flicker" effect.

      - Click the screen to affect the particle system! Corresponding forces are mapped to the virtual camera location when the mouse is clicked, attracting the already in-air particles of the three fire beams towards the view coordinates.

      - The color of the fires are gradated: red in the center, and fades from light orange to yellow-white as the particles rise on the outer radius of the source.





- Skybox and Texture / Environment Mapping

      - Cubemap of inner cube mesh.

      - Follows pan movement of virtual camera, but does not translate to simulate a "far-away" effect (model matrix was omitted from gl_Position calculation).

      - Implemented to further contribute to the atmosphere.

      - Stylized .objs of pine trees included to enhance environment






- Geometric Calculation / Sudo Physically Based Rendering

      - See wireframe view to see the program's bones.

      - To get as close to rendering the "data structure of the world," some data structuring inspiration was drawn from physics mathematics.


----------------------



Future Plans:


- Will definitely expand into a procedurally generated low-poly water system. Frameworks are in place, time is the only lacking element at the moment.

- Bloom of "lit" particles to be implemented as well... Using a Frame Buffer Object to blur the current image and overlay in the next few frames, to give illusion of brighter, volumetric glow.

- Expansion of the particle system to include a library of other textures, as well as use in modeling other phenomena such as smoke, other water systems, clouds, cool effects, etcetera….





----------------------


References and Useful Links:


- ThinMatrix: https://www.youtube.com/user/ThinMatrix

- Skybox tutorial: http://antongerdelan.net/opengl/cubemaps.html

- Skybox library: http://www.custommapmakers.org/skyboxes.php

- Particle Simulation: https://www.3dgep.com/simulating-particle-effects-using-opengl/

- Perlin Noise:       https://en.wikipedia.org/wiki/Perlin_noise

- Ken Perlin:       http://mrl.nyu.edu/~perlin/doc/oscar.html

- 7 Layer Example: https://www.researchgate.net/figure/274384740_fig2_Fig-2-Seven-layers-of-stacked-Perlin-noise-patterns-left-and-the-resulting-terrain

- Bloom tutorial: https://learnopengl.com/#!Advanced-Lighting/Bloom

- Interesting Papers: http://www.dgp.utoronto.ca/people/stam/reality/Research/pub.html

- Cool thing: http://d.hatena.ne.jp/hanecci/20160625/p5



Previously: Disintegrating Martial Arts Model