Skip to content
Jonathan Link edited this page May 28, 2015 · 18 revisions

Todo before rendu:

  • Adan
    • Fix texture transition problem
    • Improve water dynamics
  • Jonathan
    • write README about keyboard usage
    • fix Bezier usage
    • Set Bezier curve positions for demo
    • Add gamma-correction, shadow mapping, raytracing or something else
  • Pierre
    • reduce inertia for fly-through camera
    • improve light source
    • do bezier path speed feature, remplacer le sinus + touches pour accélérer/ralentir
    • obj loader

Our extensions

  • General
    • We have our own code base (we did a little OpenGL library ;-))
  • Part 1
    • multiple terrains (island, moutains, live editor from the program(!))
  • Part 2
    • water reflection
    • water dynamics
    • water depth (camera under water)
    • underwater camera
    • fog
    • the sun turns automatically
  • Part 3
    • Mouse for view direction
    • jumping
    • bezier curve (with speed control)
    • advanced edit bezier mode
    • rain

Others:

  • wireframe mode

  • switch between 3 bezier cameras

  • Non-proposed extensions

    • switch worlds (and skybox texture)
    • shadow maps
    • water dynamics
    • better perlin noise
    • sound
    • animals
    • control light with keys
    • atmospheric scattering
    • particle systems
    • night mode
    • small objects on landspace

Project part 1

Mandatory

Part 1.1 TODO
1. Create an FBO with a texture attached to it with 1 component
The attached texture stores the height map
2. Create and bind a shader program for rendering to that FBO
3. Create a Perlin noise function in the fragment shader
The fragment shader writes the height values into the texture
4. Render a full screen quad
The quad reaches from [-1, -1, 0] to [1, 1, 0]. Don’t forget to resize the viewport
to the texture size for this to work correctly (and to reset it after height map
generation.
5. Render before glfwMainLoop()
Unbind the FBO after terrain generation, otherwise you
keep renderingto it instead of the screen
6. Implement fractal Brownian motion (fBm)

Part 1.2 TODO
1. Create triangle grid to represent the terrain (at least 512x512).
(reuse from HW3)
2. Create a shader program for terrain rendering.
The vertex shader samples the height map texture an displaces the
vertices according to the height. (reuse/adapt from HW3)
3. Diffuse shading of the terrain in the fragment shader.
You have calculate the normal at every position in the fragment shader.
One way to do this is by using finite differences: you can find the gradient at the current pixel position by
comparing the elevation with the elevation of the neighboring pixels in the height map.
4. Use simple schema to color the terrain according to height.

Extensions

Some ideas to improve the project (and your grade)

  • easy – other combinations of noise functions for more interesting terrains, e.g., hybrid or ridged multifractals
  • easy – use 3D noise to create materials for meshes, e.g., wood or marble
  • medium – tessellation shaders for level of detail (LOD) terrain rendering. Dynamically refine/coarsen the grid depending on the camera position. This needs a GPU that supports OpenGL 4
  • medium – instead of using a flat triangle grid, use 3D noise and map it to a sphere in order to render a procedural planet
  • hard – make an infinite terrain that you can navigate through.
  • very hard – L-systems to populate your terrain with trees

Project part 2

Mandatory

  • Improving Texturing
  • Texturing: weighted blend
  • Sky Modeling

Extensions

  • Advanced topics
  • Reflection / Refraction
  • Participating Media
  • Water Dynamics
  • Atmospheric Scattering
  • “God” Rays
  • Shadow Maps

Project part 3

Mandatory

Task 1: Fly-through mode: Change position, aim and up direction by key strokes
- Use W and S to move the camera along the view direction
- A and D to rotate the aim about the up direction
- Q and E to roll the camera up and down
- Add inertia to your camera controls
e.g. after pressing W, the camera velocity increases by a certain amount then decreases over time to 0
Example: http://lgg.epfl.ch/teaching/icg/fly_over.mp4
Hint: See HW4 for an example of keystroke handling

Task 2: First-person shooting (FPS) exploration mode:
Control the x and y components of the camera while snapping the camera to the corresponding
height of the terrain.
Use the same keys as the previous section to control the camera
Hint: You will need to query the terrain height at a position (x, y).
Use glGetTexImage(...) or glReadPixels(...) to access the generated height map from FBO.

Task 3: Use Bezier curves to control the camera path
In HW5 (bezier): you have implemented the basics
- edit the control points of a bezier curve
- animate the camera by sampling two curves for the camera position and aim

Task 3.1 Design a nice camera path to explore your terrain.
You will be graded based on the visual quality
Example: http://lgg.epfl.ch/teaching/icg/camerapath.mp4

Task 3.2 Control the camera velocity along the path.
The camera velocity in HW5 is constant. Change the velocity by keystrokes: W to increase
and S to reduce the velocity.

Extensions

Advanced topics:

Idea 1: Physically realistic movements of the camera
- Objects don’t accelerate instantaneously as they have mass
- Build a simple physical system to emulate a physically plausible motion (possibly integrating jumping)

Idea 2: Bezier curve
- Instead of using a fixed recursion depth for “de Casteljau”, implement adaptive recursion depth
- For more details: http://algorithmist.net/docs/subdivision.pdf

Idea 3: Ease-in/out camera movement
- Use another bezier curve to control the camera velocity along the camera path.

Idea 4: Particle System
- Example: http://lgg.epfl.ch/teaching/icg/Snowing.mov
- Refer to the accompanied pdf for technical details.

Clone this wiki locally