280 likes | 289 Vues
Dive into the world of game terrains by exploring the methods of height maps, procedurally generated terrains via geometry shaders, Perlin noise, and the implementation of Marching Cubes algorithm. Overcome drawbacks, learn about complex terrains, and understand the key parameters of Perlin noise for creating immersive game environments. Discover how to construct meshes, implement OpenGL for custom shading, and export terrain surfaces for seamless integration with games.
E N D
Generating Terrains via Marching Cube Algorithm for Games KethanTellisAdam SmithChris BarakianRavi Vaishnav
Game Terrains How can we create more interesting game terrains?
Game Terrains Methods Height maps
Game Terrains Methods Height maps Procedurally Generated
Game Terrains Methods Height maps Procedurally Generated Via Geometry Shaders
Game Terrains Methods Height maps Procedurally Generated Via Geometry Shaders Scanning Models
Game Terrains Methods Drawbacks • Heightmaps • Lack of complexity in environment (No caves / tunnels) • Procedurally Generated • Can’t be saved and reused. Gameplay is inconsistent • Geometry Shaders • Difficulty in collision detection • High computational costs • Scanning Models • Difficult to create • Costly in time and resources
Complex, Reusable, Cheap Terrains Perlin Noise Marching Cubes Algorithm
PerlinNoise Implementation • Octaves • Number of octaves increases the amount of the jitter around the lowest frequency • Alpha • Increases / Decreases amplitude of certain frequencies, bigger changes in terrains • Beta • Changes how much weight is granted to higher frequencies, more sharp deviations in terrain • Frequency • Amplifies the fluctuations in the amount of jitter
PerlinNoise Implementation • Octaves • Number of octaves increases the amount of the jitter around the lowest frequency • Alpha • Increases / Decreases amplitude of certain frequencies, bigger changes in terrains • Beta • Changes how much weight is granted to higher frequencies, more sharp deviations in terrain • Frequency • Amplifies the fluctuations in the amount of jitter
PerlinNoise Implementation • Octaves • Number of octaves increases the amount of the jitter around the lowest frequency • Alpha • Increases / Decreases amplitude of certain frequencies, bigger changes in terrains • Beta • Changes how much weight is granted to higher frequencies, more sharp deviations in terrain • Frequency • Amplifies the fluctuations in the amount of jitter
Marching Cubes Implementation • Algorithm / Look-Up Table • Actually algorithmically described all 256 cases • Face Normals / Winding Order • Correctly had face normals face away from bounded density areas • Vertex Normals • Achieved weight averaged normalsfor verticiesby comparing to neighbors • OBJ Export • Allowed surface to be exported as OBJ file for loading into Maya and eventually games
Marching Cubes Implementation • Mesh Construction • Built lookup table of each case • Built final mesh by adding position • OpenGL Implementation • Used Vertex Arrays for speed increase • GLSL for custom shading
Q & A Demo
Q & A Questions?