Computer Graphics

Assignment 4

Martin Heistermann and Valentin Wyss
Computer Graphics Group

Assignment 4

  • Extend your raytracer to generate a nice output
  • Get the OpenGL assignment framework code compiling
  • Not graded, nicest results will be shown in class
  • Bonus points possible

Project Idea: Make a Scene

  • Create an interesting scene
    • Create your own 3D models/download free ones online
    • Insert them into a scene file (convert to OFF)
    • Recommended 3D suite: Blender
  • If you have something pretty, maybe allow us to add it to scenes/ next year?
images/exercise/raytracer/toon_faces.png
Like this, but nicer.

Project Idea: Glass

  • Render glass objects
    • Recursively trace reflected AND refracted rays
    • Use Snell’s law to compute refraction angles
    • Use the Fresnel equations to mix reflected/refracted colors.

images/practical_05/refraction.jpgAuthor: JrPol images/practical_05/refraction_sphere.jpgAuthor: Mathness

Project Idea: New Primitives

  • Implement ray-torus intersections
    • Good practice for deriving ray-object intersections
    • Solve a quartic equation!
images/practical_05/tori.png
Previously you rendered tori using triangle meshes. A torus primitive would render much faster.

Project Idea: Animation

  • Create a movie
    • Animate something by generating a different scene for each frame
    • Move camera, lights, objects…
    • Example in scenes/movie:

Project Ideas: Performance

images/exercise/raytracer/perf/inverted_call_tree.png
Profile

Project Ideas: Performance

images/kd_tree_3D_dragon_even.jpg

Project Ideas: Live Preview

  • Display pixels on screen as soon as their color is available

Examples from last year’s class: Glass / Refraction

images/exercise/raytracer/ex4/2024/glass/combo.jpg
Refractive Sphere

Examples from last year’s class: Oren-Nayar shading

images/exercise/raytracer/ex4/2024/OrenNayar/phong.jpg
Phong
images/exercise/raytracer/ex4/2024/OrenNayar/nayar.jpg
Oren-Nayar

Examples from last year’s class: Caustics / Photon mapping

images/exercise/raytracer/ex4/2024/Caustics/out01.jpg
Photon Mapping

Examples from last year’s class: Ray-Marching Fractals

images/exercise/raytracer/ex4/2024/fractals/sierpinski_pyramid.tga.jpg
Sierpinski Pyramid
images/exercise/raytracer/ex4/2024/fractals/mandelbulb_high_res.jpg
Mandelbulb

OpenGL Framework Code

  • Download assignment_04.zip from ILIAS and build it
  • All necessary libraries except OpenGL should be included
  • Please contact us early if you run into issues!
  • Try to already get familiar with the code :-)

images/practical_05/solar_system_screenshot.pngExpected output images/solar-system.pngIn a few weeks…

Questions?