GAMES101 Lecture 10
GAMES101 Lecture 10
Lecture 10:
Geometry 1 (Introduction)
http://www.cs.ucsb.edu/~lingqi/teaching/games101.html
Announcements
• Homework 3
- The framework has been updated
• New TAs
- Peng Yu ( ) BUAA y2505418927@gmail.com
- Graphics Pipeline
- Texture mapping
• Shading 3
- Barycentric coordinates
- Applications of textures
today
Today
• Applications of textures
Hand with Reflecting Sphere. M. C. Escher, 1935. lithograph Light Probes, Paul Debevec
(u, v) = (1, 1)
x=y=z
(u, v) = (0, 0)
x = –y = –z
FigureFigure 8 Drawn
A- Hand Bump Funtions
Hand Drawn Functio
Bump texture p
b(u,v)
Autodesk
Simple Ambient occlusion With ambient
shading texture map occlusion
Marc Levoy
GAMES101 21 Lingqi Yan, UC Santa Barbara
Today
• Shading 3
- Applications of textures
• Introduction to geometry
- Examples of geometry
NetCarShow.com
I will call it
“Trump Virus”
COVID-19 forever.
GAMES101 30 Lingqi Yan, UC Santa Barbara
Examples of Geometry
-1
GAMES101 33 Lingqi Yan, UC Santa Barbara
Implicit Surface – Sampling Can Be Hard
p
2 2
f (x, y, z) = (2 x2 + 2
y ) +z 1
z x
2 2 2
f (x, y, z) = x + y + z 1
y
Is (3/4, 1/2, 1/4) inside?
Yes, inside.
z x
Generally:
Explicit Surface – Sampling Is Easy
z x
z x
“I hate meshes.
I cannot believe how hard this is.
Geometry is hard.”
— David Baraff
Senior Research Scientist
Pixar Animation Studios
Algebraic surfaces
Constructive solid geometry
Level set methods
Fractals
...
Boolean expressions:
See https://iquilezles.org/www/articles/raymarchingdf/raymarchingdf.htm
Level Set Methods (Also implicit)
See http://physbam.stanford.edu
Fractals (Implicit)
Pros:
• compact description (e.g., a function)
• certain queries easy (inside object, distance to surface)
• good for ray-to-surface intersection (more later)
• for simple shapes, exact description / no sampling error
• easy to handle changes in topology (e.g., fluid)
Cons:
• difficult to model complex shapes