3D computer graphics

cosmos 28th January 2017 at 4:26pm
Computer graphics

Components

(which of course generalize to computer graphics in other dimensions, like 2D)

  • Scene: sets coordinates, like a 3D canvas.
  • Camera
  • Meshes (define objects), made out of triangles mostly.
  • Renderer, takes the above three, and gives image seen on screen.
  • Lights. Spotlights

Rendering Optimisations - Frustum Culling

Lights and shadows

in three.js, we need to tell it to add spotlights, and enable them and the meshes to cast shadows, and other objects to receive shadows, as well as the renderer to render them! (vid)

More on spotlights. Target of spotlight needs to be an object

call updateProjectionMatrix() when upadating spotlight

Animations

https://www.youtube.com/watch?v=GlLPYIDrxbM&index=4&list=PLOGomoq5sDLutXOHLlESKG2j9CCnCwVqg

mesh geometry

Interactions

Use DAT.GUI (vid), code,