SLIDE 1
Visualization and Simulation
Caio Brito
SLIDE 2 Summary
– Graphical pipeline – Illumination model – Shader
– Ray Tracing – Path tracing
– Fluids – Rigid Body – Position-Based
SLIDE 3
Local Illumination
SLIDE 4
Local Illumination :: Graphical Pipeline
SLIDE 5
Local Illumination :: Graphical Pipeline
SLIDE 6
Local Illumination :: Illumination Model
SLIDE 7 Local Illumination :: Illumination Model
– Simple way of modeling indirect reflection. Ia: Ambient light intensity Ka: Ambient constant
SLIDE 8 Local Illumination :: Illumination Model
– Ideal diffuse surface reflects light equally in all directions, according to Lambert's cosine law. – Lambert’s Cosine Law: amount of light energy that falls on surface and gets reflected is proportional to incidence angle.
SLIDE 9 Local Illumination :: Illumination Model
– Smaller angle > Bigger cosine > More intensity.
SLIDE 10 Local Illumination :: Illumination Model
– Simulates a highlight. – Reflection angle = incident angle.
SLIDE 11
Local Illumination :: Illumination Model
SLIDE 12 Local Illumination :: Illumination Model
– Shades each polygon of an object based on the angle between the polygon's surface normal and the direction of the light source.
SLIDE 13 Local Illumination :: Illumination Model
– Calculates the surface normals for the polygons. – Lighting computations are then performed to produce intensities at vertices. – These intensities are interpolated along the edges of the polygons.
SLIDE 14 Local Illumination :: Illumination Model
– Calculate the surface normals at the vertices of polygons in a 3D computer model. – These normals are interpolated along the edges of the polygons. – Lighting computations are then performed.
SLIDE 15
Local Illumination :: Illumination Model
Position-Normal Distributions for Efficient Rendering of Specular Microstructure
SLIDE 16
Local Illumination :: Illumination Model
Physically-Accurate Fur Reflectance: Modeling, Measurement and Rendering
SLIDE 17
Local Illumination :: Illumination Model
Discrete Stochastic Microfacet Models
SLIDE 18 Local Illumination :: Shader
- A Shader is a user-defined program designed to run
- n some stage of a graphics processor.
- Its purpose is to execute one of the programmable
stages of the rendering pipeline.
- GLSL, HLSL, Cg, DirectX
- Basic structure: Vertex Shader and Fragment Shader
- http://antongerdelan.net/opengl/
- https://learnopengl.com/
- https://www.shadertoy.com/
SLIDE 19 Local Illumination :: Shader
SLIDE 20 Local Illumination :: Shader
SLIDE 21 Local Illumination :: Shader
SLIDE 22
Local Illumination
SLIDE 23
Global Illumination
SLIDE 24 Global Illumination
- Local Illumination
- Global Illumination
SLIDE 25
Global Illumination :: Ray Tracing
SLIDE 26
Global Illumination :: Ray Tracing
SLIDE 27
Global Illumination :: Ray Tracing
SLIDE 28
Global Illumination :: Ray Tracing
SLIDE 29
Global Illumination :: Ray Tracing
SLIDE 30
Global Illumination :: Ray Tracing
SLIDE 31
Global Illumination :: Ray Tracing
SLIDE 32
Global Illumination :: Ray Tracing
SLIDE 33
Global Illumination :: Ray Tracing
SLIDE 34
Global Illumination :: Ray Tracing
SLIDE 35
Global Illumination :: Ray Tracing
SLIDE 36 Global Illumination :: Ray Tracing
– Primary rays are rays from the viewpoint to the nearest intersection point. – Local illumination is computed:
SLIDE 37 Global Illumination :: Ray Tracing
– Reflection Ray
SLIDE 38 Global Illumination :: Ray Tracing
– Refraction Ray
SLIDE 39
Global Illumination :: Ray Tracing
SLIDE 40 Global Illumination :: Ray Tracing
SLIDE 41 Global Illumination :: Ray Tracing
SLIDE 42 Global Illumination :: Path Tracing
- Trace multiple rays from a single pixel
SLIDE 43 Global Illumination :: Path Tracing
- How to choose a secondary ray?
- Each material have a Kd, Ks and Kt
– Let Ktot = Kd + Ks + Kt – Choose a random number R in the interval (0,Ktot)
- If (R < Ks), trace a diffuse ray
- else if (R < Kd + Ks), trace a specular ray
- else, trace a refraction ray
SLIDE 44
Global Illumination :: Path Tracing
SLIDE 45
Global Illumination :: Path Tracing
SLIDE 46
Global Illumination :: Path Tracing
SLIDE 47 Which Realism?
– image produces the same visual response as the scene
– Image provides the same visual information as the scene
SLIDE 50
Physics Based Simulation
SLIDE 51 Physics Based Simulation :: Fluid Simulation
- Smoothed Particle Hydrodynamics
– Solve Navier-Stokes equation – Finite number of particles
- Position, velocity, mass, density, viscosity and influence radius
SLIDE 52 Physics Based Simulation :: Fluid Simulation
- Smoothed Particle Hydrodynamics
SLIDE 53 Physics Based Simulation :: Fluid Simulation
- Smoothed Particle Hydrodynamics
SLIDE 54 Physics Based Simulation :: Fluid Simulation
- Smoothed Particle Hydrodynamics
SLIDE 55 Physics Based Simulation :: Fluid Simulation
- Smoothed Particle Hydrodynamics
SLIDE 56 Physics Based Simulation :: Rigid Body Dynamics
- Rigid bodies have a position and orientation
- No deformation
- The motion be represented by 2 parameters
– Center of mass – Orientation
- Force and Torque are computed
SLIDE 57
Physics Based Simulation :: Rigid Body Dynamics
SLIDE 58 Physics Based Simulation :: Position-Based Dynamics
– Position, velocity, mass, phase
- Uses different constraints for each kind of
simulation
– Distance (clothing) – Shape (rigids, plastics) – Density (fluids) – Volume (inflatables) – Contact (non-penetration, friction)
SLIDE 59
Physics Based Simulation :: Position-Based Dynamics
SLIDE 60
Physics Based Simulation
SLIDE 61
Visualization and Simulation
Caio Brito