Visualization and Simulation Caio Brito
Summary • Local Illumination Graphical pipeline – Illumination model – Shader – • Global Illumination Ray Tracing – Path tracing – • Physics based simulation Fluids – Rigid Body – Position-Based –
Local Illumination
Local Illumination :: Graphical Pipeline
Local Illumination :: Graphical Pipeline
Local Illumination :: Illumination Model
Local Illumination :: Illumination Model • Ambient Simple way of modeling indirect reflection. – Ia: Ambient light intensity Ka: Ambient constant
Local Illumination :: Illumination Model • Diffuse 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.
Local Illumination :: Illumination Model • Diffuse Smaller angle > Bigger cosine > More intensity. –
Local Illumination :: Illumination Model • Specular Simulates a highlight. – Reflection angle = incident angle. –
Local Illumination :: Illumination Model
Local Illumination :: Illumination Model • Flat Shading – Shades each polygon of an object based on the angle between the polygon's surface normal and the direction of the light source.
Local Illumination :: Illumination Model • Gouraud Shading – 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.
Local Illumination :: Illumination Model • Phong Shading – 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.
Local Illumination :: Illumination Model Position-Normal Distributions for Efficient Rendering of Specular Microstructure
Local Illumination :: Illumination Model Physically-Accurate Fur Reflectance: Modeling, Measurement and Rendering
Local Illumination :: Illumination Model Discrete Stochastic Microfacet Models
Local Illumination :: Shader • A Shader is a user-defined program designed to run on 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/
Local Illumination :: Shader • Vertex Shader
Local Illumination :: Shader • Fragment Shader
Local Illumination :: Shader • Fragment Shader
Local Illumination
Global Illumination
Global Illumination • Local Illumination • Global Illumination
Global Illumination :: Ray Tracing
Global Illumination :: Ray Tracing
Global Illumination :: Ray Tracing
Global Illumination :: Ray Tracing
Global Illumination :: Ray Tracing
Global Illumination :: Ray Tracing
Global Illumination :: Ray Tracing
Global Illumination :: Ray Tracing
Global Illumination :: Ray Tracing
Global Illumination :: Ray Tracing
Global Illumination :: Ray Tracing
Global Illumination :: Ray Tracing • Primary Rays Primary rays are rays from the viewpoint to the nearest – intersection point. Local illumination is computed: –
Global Illumination :: Ray Tracing • Secondary Rays Reflection Ray –
Global Illumination :: Ray Tracing • Secondary Rays Refraction Ray –
Global Illumination :: Ray Tracing
Global Illumination :: Ray Tracing • Limitation
Global Illumination :: Ray Tracing • Limitation
Global Illumination :: Path Tracing • Trace multiple rays from a single pixel
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 •
Global Illumination :: Path Tracing
Global Illumination :: Path Tracing
Global Illumination :: Path Tracing
Which Realism? • Photorealism image produces the same visual response as the scene – • Functional realism Image provides the same visual information as the scene –
Which Realism? • Photorealism
Which Realism? • Functional realism
Physics Based Simulation
Physics Based Simulation :: Fluid Simulation • Smoothed Particle Hydrodynamics Solve Navier-Stokes equation – Finite number of particles – Position, velocity, mass, density, viscosity and influence radius •
Physics Based Simulation :: Fluid Simulation • Smoothed Particle Hydrodynamics
Physics Based Simulation :: Fluid Simulation • Smoothed Particle Hydrodynamics
Physics Based Simulation :: Fluid Simulation • Smoothed Particle Hydrodynamics
Physics Based Simulation :: Fluid Simulation • Smoothed Particle Hydrodynamics
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
Physics Based Simulation :: Rigid Body Dynamics
Physics Based Simulation :: Position-Based Dynamics • Particles everywhere 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) –
Physics Based Simulation :: Position-Based Dynamics
Physics Based Simulation
Visualization and Simulation Caio Brito
Recommend
More recommend