SlideShare a Scribd company logo
CS 354
Ray Casting & Tracing

Mark Kilgard
University of Texas
April 17, 2012
CS 354                                 2



         Today’s material
        In-class quiz
            On typography lecture
        Lecture topic
          Finish digital typography
          Project 3
          Ray tracing & casting
CS 354                            3



         My Office Hours
        Tuesday, before class
            Painter (PAI) 5.35
            8:45 a.m. to 9:15
        Thursday, after class
            ACE 6.302
            11:00 a.m. to 12


        Randy’s office hours
            Monday & Wednesday
            11 a.m. to 12:00
            Painter (PAI) 5.33
CS 354                                                 4



         Last time, this time
        Last lecture, we discussed
            Digital typography
        This lecture
            Ray casting and tracing
        Projects
            Project 3 due Wednesday, April 18, 2012
                 Tomorrow!
            Project 4 on ray tracing on Piazza
CS 354                                                                               5

                                         On a sheet of paper
         Daily Quiz                      • Write your EID, name, and date
                                         • Write #1, #2, #3, #4 followed by its answer
        Multiple choice: Pica and Em
         are:
                                                   Multiple choice: Unicode
                                                    supports how many character
                                                    points?
         a) Names of two commonly
         used type faces                            a) 256
         b) Units of typographic                    b) 65,536
         measurement
                                                    c) Over ¼ million
         c) Two dominant types of
         Bezier curves                              d) 4,294,967,296

         d) Graphics researchers                   Multiple choice: Kerning
         responsible for font hinting               adjusts what property of text?
                                                    a) Spacing between characters
        True or False: This text is
         written in a serif type face.              b) Whether accent marks are
                                                    included on glyphs
                                                    c) Control of vertical layout
CS 354                                             6



         Project 3
        Accept Biovision Hierarchy (BVH) files
         containing motion capture data
            Hierarchy of affine transformations
        Visualize a stick figure
            Animate the figure
CS 354                                               7



         Rendering Outline Glyphs
        Conventional method
            CPU-based scan-line
             rasterization
            Augmented by hinting
        Adaptively Sampled Distance Fields (ADFs)
            MERL’s Saffron type system
        Glyphs are static so
         pre-computation
         is effective
            Bitmaps often cached
CS 354                                                                                    8

         Massively Parallel GPU-accelerated
         Path Rendering Visualized
                           Anchored triangle   Anchored triangle
                            fans geometry       fans net stencil
                                                                   Stencil =1

      Path commands
     and control points                                               Resulting net
                                                                    coverage in stencil




                          Curved segment       Curved segment
                             geometry            net stencil




                                                                   Stencil -1
                                                                   Stencil +1
Credit: [Kokoji 2006]
CS 354                                                         9



         OpenGL Bitmap Fonts
        GLUT includes implementation
          glutBitmapCharacter
          Calls glBitmap with pre-compiled bitmap data




        Also window system specific routines to get bitmaps
         from system fonts
          wglUseFontBitmaps for Windows
          glXUseXFont for X Window System (Linux)
CS 354                                                        10



         OpenGL Stroke Fonts
        Draw glyph’s stroke as line segments
            Can transform arbitrarily
            Use glEnable(GL_LINE_SMOOTH) for anti-aliasing
            glutStrokeCharacter does this
CS 354                                                    11



         Other Text Approaches
        Pack glyphs in texture atlas
            Then draw textured rectangles with the
             correct texture coordinates for each glyph
CS 354                                                                               12

           First-class Text Support in
           Various Rendering Systems
    Rendering system                 Vendor / Sponsor            First-class text?
    Cairo                            Open source                 Yes
    Direct2D / Direct3D              Microsoft                   Yes
    Flash                            Adobe                       Yes
    GDI                              Microsoft                   Yes
    Java 2D                          Sun                         Yes
    OpenGL                           Khronos                     No
    OpenVG                           Khronos                     Yes
    Office Open XML                  Microsoft / ECMA            Yes
    PDF                              Adobe                       Yes
    PHIGS                            ISO                         Yes
    PostScript                       Adobe                       Yes
    Qt                               Nokia                       Yes
    Quart 2D                         Apple                       Yes
    Scalable Vector Graphics (SVG)   World Wide Web Consortium   Yes
    Silverlight                      Microsoft                   Yes
    Xlib                             X Consortium                Yes
CS 354                                                                         13

         How did OpenGL’s lack of text
         support last for so long?
        OpenGL was designed in 1992
          Pre-Unicode world
          Fonts were bitmaps of ASCII back then
                 Now TrueType and OpenType dominate
            The primitive initial state of OpenGL’s font support has become
             mistaken for a philosophical dictate
        Text-based applications uniformly ignore OpenGL
            Not a good thing
        3D applications have their expectations adjusted to
         expect lousy text
          Not a good thing
          Example: Quake 2 console text is miniscule because textured
           bitmap characters assumed text sized for 800x600 display
CS 354                                                                                 14

         The World Has Changed
         Since 1992
        Unicode universally accepted now
          Systems ship with near-complete, resolution-independent Unicode
           fonts now
          Good fonts come with your operating system license
          International character of web makes UTF-8 text common today
          Windows adoption of UTF-16 makes that common within Windows
        Web has expanded font repertoire of systems
          Content providers and users expect wide range of available fonts
          Fonts have standard names embedded in web content
          These font names span operating systems
        Screen resolution has increased
          1992: 640x480 aliased
          2009: 1920x1200+ multisampled
          Needing all text to be in small point sizes to fit screen isn’t a mandate
           anymore
        3D support and acceleration is pervasive now
            Text makes sense mixed with 3D content today
CS 354                                                        15

         Direct Path Rendering of
         Text in OpenGL
        Recent work
            NV_path_rendering provides GPU-acceleration of
             paths, including glyphs
            Glyph support is first-class
CS 354                                                  16



         Digital Typography Trends
        Hinting & ClearType likely going away
          Mainly due to denser screens
          Expectation of antialiased font appearance
          Text not always presented axis-aligned or
           black-on-white
        More font variety in web content
          Improving standards
          More available fonts
          Even font variety for East Asian writing
           systems
CS 354                                                                 17



         OpenGL’s Realism Limitations
        OpenGL is based on a pipeline model in which
         primitives are rendered one at time
            No automatic shadows (except by tricks or multiple
             renderings)
            No automatic multiple reflections
            Multi-pass algorithms for shadows and reflections
        Physically plausible & global approaches
            Rendering equation
            Ray tracing
            Radiosity

                                                                  17
CS 354                                                 18



         Ray Casting
        Arthur Appel (1968)
            Cast rays from eye… what object is hit?
CS 354                                19



         Ray Tracing
        “An Improved Illumination
         Model for Shaded
         Display”
          Turner Whitted (1980)
          Communications of the
           ACM

        Performance
          512x512 pixels
          74 Minutes on VAX (1979)
          6 seconds on PC (2006)
          60+ frames/second on
           GPU (2012)
CS 354                                                   20



         Ray Tracing
        Follow rays of light from a point source
        Can account for reflection and
         transmission




                                                    20
CS 354                        21

         Example of Complex
         Ray Traced Scene
CS 354                                                22

         Computational Limits of
         Ray Tracing
      Should be able to handle all physical
       interactions
      Ray tracing paradigm is physically
       plausible
      But most rays do not affect what we see
      Scattering produces many (infinite)
       additional rays
      Alternative: ray casting

                                                 22
CS 354                                              23



         Ray Casting
        Only rays that reach the eye matter
        Reverse direction and cast rays
        Need at least one ray per pixel




                                               23
CS 354                                                  24



         Ray Casting Quadrics
      Ray casting has become a standard way
       to visualize quadrics which are implicit
       surfaces in CSG systems
      Constructive Solid Geometry
            Primitives are solids
            Build objects with set operations
            Union, intersection, set difference



                                                   24
CS 354                                               25



         Ray Casting a Sphere
      Ray is parametric
      Sphere is quadric
      Resulting equation is a scalar quadratic
       equation which gives entry and exit points
       of ray (or no solution if ray misses)




                                                25
CS 354                                                   26



         Shadow Rays
      Even if a point is visible, it will not be lit
       unless we can see a light source from that
       point
      Cast shadow or feeler rays




                                                    26
CS 354                                                  27



         Reflection
      Must follow shadow rays off reflecting or
       transmitting surfaces
      Process is recursive




                                                   27
CS 354                         28

         Reflection and
         Transmission




                          28
CS 354                    29



         Ray Trees




                     29
CS 354                   30



         Ray Tree




                    30
CS 354                                                   31



         Diffuse Surfaces
      Theoretically the scattering at each point
       of intersection generates an infinite
       number of new rays that should be traced
      In practice, we only trace the transmitted
       and reflected rays but use the Phong
       model to compute shade at point of
       intersection
      Radiosity works best for perfectly diffuse
       (Lambertian) surfaces
                                                    31
CS 354                                                          32



         Building a Ray Tracer
      Best expressed recursively
      Can remove recursion later
      Image based approach
            For each ray …….
        Find intersection with closest surface
          Need whole object database available
          Complexity of calculation limits object types
      Compute lighting at surface
      Trace reflected and transmitted rays
                                                           32
CS 354                                                  33

                                    More bounces
         When to stop
        Some light will be
         absorbed at each
         intersection
            Track amount left
        Ignore rays that go off
         to infinity
            Put large sphere
             around problem
        Count steps

                                   Fewer bounces   33
CS 354                                                  34



         Recursive Ray Tracer
     color c = trace(point p, vector d, int
       step)
     {
        color local, reflected, transmitted;
        point q;
        normal n;
        if(step > max) return(background_color);




                                                   34
CS 354                                   35



         Recursive Ray Tracer
     q = intersect(p, d, status);
     if(status==light_source)
      return(light_source_color);
     if(status==no_intersection)
      return(background_color);

     n = normal(q);
     r = reflect(q, n);
     t = transmit(q,n);




                                    35
CS 354                                               36



         Recursive Ray Tracer
         local = phong(q, n, r);
         reflected = trace(q, r, step+1);
         transmitted = trace(q,t, step+1);

         return(local+reflected+transmitted);




                                                36
CS 354                                  37



         Computing Intersections
        Implicit Objects
            Quadrics
      Planes
      Polyhedra
      Parametric Surfaces




                                   37
CS 354                                              38



            Implicit Surfaces
     Ray from p0 in direction d
                p(t) = p0 +t d
     General implicit surface
               f(p) = 0
     Solve scalar equation
                f(p(t)) = 0
     General case requires numerical methods

                                               38
CS 354                                        39



         Quadrics
     General quadric can be written as
          pTAp + bTp +c = 0
         Substitute equation of ray
         p(t) = p0 +t d
     to get quadratic equation



                                         39
CS 354                                                                   40



         Sphere
     (p – pc) • (p – pc) – r2 = 0


     p(t) = p0 +t d

     p0 • p0 t2+ 2 p0 • (d – p0) t + (d – p0) • (d – p0) – r2 = 0




                                                                    40
CS 354                               41



         Planes
     p•n+c=0

     p(t) = p0 +t d


     t = -(p0 • n + c)/ d • n




                                41
CS 354                         42

         Implicit Surface
         Ray Tracing Example
        Paul Heckbert 1983
CS 354                                         43



         Polyhedra
        Generally we want to intersect
         with closed objects such as
         polygons and polyhedra
         rather than planes
        Hence we have to worry
         about inside/outside testing
        For convex objects such as
         polyhedra there are some fast
         tests
                                          43
CS 354                                                            44



         Ray Tracing Polyhedra
        If ray enters an object, it must enter a front
         facing polygon and leave a back facing polygon
        Polyhedron is formed by intersection of planes
        Ray enters at furthest intersection with front
         facing planes
        Ray leaves at closest intersection with back
         facing planes
        If entry is further away than exit, ray must miss
         the polyhedron

                                                             44
CS 354                                45



         Ray Tracing Polyhedra




                                 45
CS 354                                46



         Ray Tracing a Polygon




                                 46
CS 354                                47



         Ray Tracing a Polygon




                                 47
CS 354                                                 48

         Algorithmic Complexity of
         Ray Tracing
        Time complexity
            Rasterization:             O(b • m)
                 coherent!
          Naïve ray tracing:           O(b • p)
          Accelerated ray tracing:     O(log b • p)
                 incoherent
        Key
          b = # of objects in the scene
          p = # of pixels in the scene
          m = average # of pixels per object
CS 354                                                          49



         Real-time Ray Tracing
        GPUs doing ray tracing
            General purpose compute on GPUs




                               [Optix, NVIDIA, SIGGRAPH 2009]
CS 354                                                     50



         Ray Tracing Quality
        Aliasing is a problem in ray tracing
            Spatial and temporal

        Spatial anti-aliasing
            Average over several samples per pixel




             1 sample      5x5 grid    5x5 jittered grid
CS 354                                                        51



         Distribution Ray Tracing
        Spatial anti-aliasing




           1 sample per pixel    multiple samples per pixel
CS 354                                                                   52



          Distribution Ray Tracing
         Soft shadows
              Distribute shadow rays over light source region




         All shadow rays        No shadow rays      Some shadow rays
         hit light source,      hit light source,    hit light source,
         fully illuminated      fully shadowed      partially shadowed
CS 354                                  53



         Soft Shadows Example
        Multiple ray tracing effects
            Including soft shadows
CS 354                                                54



         Distribution Ray Tracing
        Motion blur
            Distribute rays over time




                                         Pool Balls
                                         Tom Porter
                                         RenderMan
CS 354                                                                      55



         Distribution Ray Tracing
         Depth of field
               Distribute rays across a discrete camera aperture




               No depth-of-field                              More rays




                                            Jittered
                                          depth-of-field



         More images for depth-of-field                    Even more rays
CS 354                                                                56



         Next Class
        Next lecture
            Global illumination
            How is the complex interaction of light within a scene
             realistically modeled?

        Reading: Chapter 11, 559-568
        Project 3
            Due tomorrow—Wednesday, April 18, 2012


        Next up: Project 4 is a simple ray tracer
            Due May 2, 2012
CS 354                                           57



         Credits
     • Ed Angel and Dave Shreiner: Interactive
       Computer Graphics 6E © Addison-Wesley
       (2012)
     • Pat Hanrahan
     • Paul Heckbert

More Related Content

What's hot

CS 354 Programmable Shading
CS 354 Programmable ShadingCS 354 Programmable Shading
CS 354 Programmable Shading
Mark Kilgard
 
CS 354 GPU Architecture
CS 354 GPU ArchitectureCS 354 GPU Architecture
CS 354 GPU Architecture
Mark Kilgard
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration Structures
Mark Kilgard
 
CS 354 Typography
CS 354 TypographyCS 354 Typography
CS 354 Typography
Mark Kilgard
 
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR GraphicsCS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
Mark Kilgard
 
An Introduction to NV_path_rendering
An Introduction to NV_path_renderingAn Introduction to NV_path_rendering
An Introduction to NV_path_rendering
Mark Kilgard
 
CS 354 More Graphics Pipeline
CS 354 More Graphics PipelineCS 354 More Graphics Pipeline
CS 354 More Graphics Pipeline
Mark Kilgard
 
CS 354 Global Illumination
CS 354 Global IlluminationCS 354 Global Illumination
CS 354 Global Illumination
Mark Kilgard
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture Mapping
Mark Kilgard
 
CS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasingCS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasing
Mark Kilgard
 
CS 354 Understanding Color
CS 354 Understanding ColorCS 354 Understanding Color
CS 354 Understanding Color
Mark Kilgard
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel Updating
Mark Kilgard
 
Real-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow VolumesReal-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow Volumes
Mark Kilgard
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 Introduction
Mark Kilgard
 
CS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationCS 354 Object Viewing and Representation
CS 354 Object Viewing and Representation
Mark Kilgard
 
CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing Stuff
Mark Kilgard
 
CS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingCS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and Culling
Mark Kilgard
 
Robust Stenciled Shadow Volumes
Robust Stenciled Shadow VolumesRobust Stenciled Shadow Volumes
Robust Stenciled Shadow Volumes
Mark Kilgard
 
Shadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics HardwareShadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics Hardware
stefan_b
 
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated RenderingPractical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Mark Kilgard
 

What's hot (20)

CS 354 Programmable Shading
CS 354 Programmable ShadingCS 354 Programmable Shading
CS 354 Programmable Shading
 
CS 354 GPU Architecture
CS 354 GPU ArchitectureCS 354 GPU Architecture
CS 354 GPU Architecture
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration Structures
 
CS 354 Typography
CS 354 TypographyCS 354 Typography
CS 354 Typography
 
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR GraphicsCS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
 
An Introduction to NV_path_rendering
An Introduction to NV_path_renderingAn Introduction to NV_path_rendering
An Introduction to NV_path_rendering
 
CS 354 More Graphics Pipeline
CS 354 More Graphics PipelineCS 354 More Graphics Pipeline
CS 354 More Graphics Pipeline
 
CS 354 Global Illumination
CS 354 Global IlluminationCS 354 Global Illumination
CS 354 Global Illumination
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture Mapping
 
CS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasingCS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasing
 
CS 354 Understanding Color
CS 354 Understanding ColorCS 354 Understanding Color
CS 354 Understanding Color
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel Updating
 
Real-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow VolumesReal-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow Volumes
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 Introduction
 
CS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationCS 354 Object Viewing and Representation
CS 354 Object Viewing and Representation
 
CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing Stuff
 
CS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingCS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and Culling
 
Robust Stenciled Shadow Volumes
Robust Stenciled Shadow VolumesRobust Stenciled Shadow Volumes
Robust Stenciled Shadow Volumes
 
Shadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics HardwareShadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics Hardware
 
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated RenderingPractical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
 

Viewers also liked

Ray tracing
Ray tracingRay tracing
Ray tracing
Muhammad Azam
 
Ray tracing
Ray tracingRay tracing
Ray tracing
Yogesh jatin Gupta
 
GRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and RadiosityGRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and Radiosity
Michael Heron
 
Computer Graphics Notes
Computer Graphics NotesComputer Graphics Notes
Computer Graphics Notes
Gurpreet singh
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016
Mark Kilgard
 
Illumination model
Illumination modelIllumination model
Illumination model
Ankur Kumar
 
Ray tracing
Ray tracingRay tracing
Ray tracing
Farah Shaikh
 
Open GL T0074 56 sm4
Open GL T0074 56 sm4Open GL T0074 56 sm4
Open GL T0074 56 sm4Roziq Bahtiar
 
Google Dorks: Analysis, Creation, and new Defenses
Google Dorks: Analysis, Creation, and new DefensesGoogle Dorks: Analysis, Creation, and new Defenses
Google Dorks: Analysis, Creation, and new Defenses
Flavio Toffalini
 
Forensic Science - 07 Casts and impressions
Forensic Science - 07 Casts and impressionsForensic Science - 07 Casts and impressions
Forensic Science - 07 Casts and impressions
Ian Anderson
 
CS 354 Project 1 Discussion
CS 354 Project 1 DiscussionCS 354 Project 1 Discussion
CS 354 Project 1 Discussion
Mark Kilgard
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-buffer
Raj Sikarwar
 
Fingerprints and ridge characteristics
Fingerprints and ridge characteristicsFingerprints and ridge characteristics
Fingerprints and ridge characteristics
BlancoScience
 

Viewers also liked (17)

Ray tracing
 Ray tracing Ray tracing
Ray tracing
 
Ray tracing
Ray tracingRay tracing
Ray tracing
 
Ray tracing
Ray tracingRay tracing
Ray tracing
 
Ray tracing
Ray tracingRay tracing
Ray tracing
 
GRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and RadiosityGRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and Radiosity
 
Computer Graphics Notes
Computer Graphics NotesComputer Graphics Notes
Computer Graphics Notes
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016
 
Illumination model
Illumination modelIllumination model
Illumination model
 
Ray tracing
Ray tracingRay tracing
Ray tracing
 
Open GL T0074 56 sm4
Open GL T0074 56 sm4Open GL T0074 56 sm4
Open GL T0074 56 sm4
 
Propagation urban
Propagation urbanPropagation urban
Propagation urban
 
Google Dorks: Analysis, Creation, and new Defenses
Google Dorks: Analysis, Creation, and new DefensesGoogle Dorks: Analysis, Creation, and new Defenses
Google Dorks: Analysis, Creation, and new Defenses
 
Forensic Science - 07 Casts and impressions
Forensic Science - 07 Casts and impressionsForensic Science - 07 Casts and impressions
Forensic Science - 07 Casts and impressions
 
Wave propagationmodels
Wave propagationmodelsWave propagationmodels
Wave propagationmodels
 
CS 354 Project 1 Discussion
CS 354 Project 1 DiscussionCS 354 Project 1 Discussion
CS 354 Project 1 Discussion
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-buffer
 
Fingerprints and ridge characteristics
Fingerprints and ridge characteristicsFingerprints and ridge characteristics
Fingerprints and ridge characteristics
 

Similar to CS 354 Ray Casting & Tracing

OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and More
Mark Kilgard
 
GTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path RenderingGTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path Rendering
Mark Kilgard
 
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondSIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
Mark Kilgard
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012
Mark Kilgard
 
GTC 2009 OpenGL Barthold
GTC 2009 OpenGL BartholdGTC 2009 OpenGL Barthold
GTC 2009 OpenGL Barthold
Mark Kilgard
 
Designing an Objective-C Framework about 3D
Designing an Objective-C Framework about 3DDesigning an Objective-C Framework about 3D
Designing an Objective-C Framework about 3D
rsebbe
 
NVIDIA Graphics, Cg, and Transparency
NVIDIA Graphics, Cg, and TransparencyNVIDIA Graphics, Cg, and Transparency
NVIDIA Graphics, Cg, and Transparency
Mark Kilgard
 
Actors, a Unifying Pattern for Scalable Concurrency | C4 2006
Actors, a Unifying Pattern for Scalable Concurrency | C4 2006 Actors, a Unifying Pattern for Scalable Concurrency | C4 2006
Actors, a Unifying Pattern for Scalable Concurrency | C4 2006
Real Nobile
 
Improving Shadows and Reflections via the Stencil Buffer
Improving Shadows and Reflections via the Stencil BufferImproving Shadows and Reflections via the Stencil Buffer
Improving Shadows and Reflections via the Stencil Buffer
Mark Kilgard
 
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft..."Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
Dataconomy Media
 
OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading Language
Jungsoo Nam
 
lecture_16_jiajun.pdf
lecture_16_jiajun.pdflecture_16_jiajun.pdf
lecture_16_jiajun.pdf
Kuan-Tsae Huang
 
OpenGL 4 for 2010
OpenGL 4 for 2010OpenGL 4 for 2010
OpenGL 4 for 2010
Mark Kilgard
 
OpenGL basics
OpenGL basicsOpenGL basics
OpenGL basics
Mohammad Hosein Nemati
 
Scaling Out With Hadoop And HBase
Scaling Out With Hadoop And HBaseScaling Out With Hadoop And HBase
Scaling Out With Hadoop And HBase
Age Mooij
 
Workshop Mock-Ups
Workshop Mock-UpsWorkshop Mock-Ups
Workshop Mock-Ups
fabricastartups
 
BUILDING WHILE FLYING
BUILDING WHILE FLYINGBUILDING WHILE FLYING
BUILDING WHILE FLYING
Kamal Shannak
 
What is OpenGL ?
What is OpenGL ?What is OpenGL ?
What is OpenGL ?
Mohammad Hosein Nemati
 
GPU-accelerated Path Rendering
GPU-accelerated Path RenderingGPU-accelerated Path Rendering
GPU-accelerated Path Rendering
Mark Kilgard
 
Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...
Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...
Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...
DevGAMM Conference
 

Similar to CS 354 Ray Casting & Tracing (20)

OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and More
 
GTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path RenderingGTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path Rendering
 
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondSIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012
 
GTC 2009 OpenGL Barthold
GTC 2009 OpenGL BartholdGTC 2009 OpenGL Barthold
GTC 2009 OpenGL Barthold
 
Designing an Objective-C Framework about 3D
Designing an Objective-C Framework about 3DDesigning an Objective-C Framework about 3D
Designing an Objective-C Framework about 3D
 
NVIDIA Graphics, Cg, and Transparency
NVIDIA Graphics, Cg, and TransparencyNVIDIA Graphics, Cg, and Transparency
NVIDIA Graphics, Cg, and Transparency
 
Actors, a Unifying Pattern for Scalable Concurrency | C4 2006
Actors, a Unifying Pattern for Scalable Concurrency | C4 2006 Actors, a Unifying Pattern for Scalable Concurrency | C4 2006
Actors, a Unifying Pattern for Scalable Concurrency | C4 2006
 
Improving Shadows and Reflections via the Stencil Buffer
Improving Shadows and Reflections via the Stencil BufferImproving Shadows and Reflections via the Stencil Buffer
Improving Shadows and Reflections via the Stencil Buffer
 
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft..."Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
 
OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading Language
 
lecture_16_jiajun.pdf
lecture_16_jiajun.pdflecture_16_jiajun.pdf
lecture_16_jiajun.pdf
 
OpenGL 4 for 2010
OpenGL 4 for 2010OpenGL 4 for 2010
OpenGL 4 for 2010
 
OpenGL basics
OpenGL basicsOpenGL basics
OpenGL basics
 
Scaling Out With Hadoop And HBase
Scaling Out With Hadoop And HBaseScaling Out With Hadoop And HBase
Scaling Out With Hadoop And HBase
 
Workshop Mock-Ups
Workshop Mock-UpsWorkshop Mock-Ups
Workshop Mock-Ups
 
BUILDING WHILE FLYING
BUILDING WHILE FLYINGBUILDING WHILE FLYING
BUILDING WHILE FLYING
 
What is OpenGL ?
What is OpenGL ?What is OpenGL ?
What is OpenGL ?
 
GPU-accelerated Path Rendering
GPU-accelerated Path RenderingGPU-accelerated Path Rendering
GPU-accelerated Path Rendering
 
Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...
Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...
Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...
 

More from Mark Kilgard

D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...
Mark Kilgard
 
Computers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsComputers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School Students
Mark Kilgard
 
NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017
Mark Kilgard
 
NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017
Mark Kilgard
 
Virtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsVirtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUs
Mark Kilgard
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to Vulkan
Mark Kilgard
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectangles
Mark Kilgard
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
Mark Kilgard
 
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Mark Kilgard
 
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineAccelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Mark Kilgard
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional Improvements
Mark Kilgard
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUs
Mark Kilgard
 
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingSIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
Mark Kilgard
 
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
Mark Kilgard
 
GPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardGPU accelerated path rendering fastforward
GPU accelerated path rendering fastforward
Mark Kilgard
 
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingSIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
Mark Kilgard
 
GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012
Mark Kilgard
 
CS 354 Bezier Curves
CS 354 Bezier Curves CS 354 Bezier Curves
CS 354 Bezier Curves
Mark Kilgard
 

More from Mark Kilgard (18)

D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...
 
Computers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsComputers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School Students
 
NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017
 
NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017
 
Virtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsVirtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUs
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to Vulkan
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectangles
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
 
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
 
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineAccelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional Improvements
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUs
 
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingSIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
 
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
 
GPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardGPU accelerated path rendering fastforward
GPU accelerated path rendering fastforward
 
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingSIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
 
GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012
 
CS 354 Bezier Curves
CS 354 Bezier Curves CS 354 Bezier Curves
CS 354 Bezier Curves
 

Recently uploaded

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 

Recently uploaded (20)

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 

CS 354 Ray Casting & Tracing

  • 1. CS 354 Ray Casting & Tracing Mark Kilgard University of Texas April 17, 2012
  • 2. CS 354 2 Today’s material  In-class quiz  On typography lecture  Lecture topic  Finish digital typography  Project 3  Ray tracing & casting
  • 3. CS 354 3 My Office Hours  Tuesday, before class  Painter (PAI) 5.35  8:45 a.m. to 9:15  Thursday, after class  ACE 6.302  11:00 a.m. to 12  Randy’s office hours  Monday & Wednesday  11 a.m. to 12:00  Painter (PAI) 5.33
  • 4. CS 354 4 Last time, this time  Last lecture, we discussed  Digital typography  This lecture  Ray casting and tracing  Projects  Project 3 due Wednesday, April 18, 2012  Tomorrow!  Project 4 on ray tracing on Piazza
  • 5. CS 354 5 On a sheet of paper Daily Quiz • Write your EID, name, and date • Write #1, #2, #3, #4 followed by its answer  Multiple choice: Pica and Em are:  Multiple choice: Unicode supports how many character points? a) Names of two commonly used type faces a) 256 b) Units of typographic b) 65,536 measurement c) Over ¼ million c) Two dominant types of Bezier curves d) 4,294,967,296 d) Graphics researchers  Multiple choice: Kerning responsible for font hinting adjusts what property of text? a) Spacing between characters  True or False: This text is written in a serif type face. b) Whether accent marks are included on glyphs c) Control of vertical layout
  • 6. CS 354 6 Project 3  Accept Biovision Hierarchy (BVH) files containing motion capture data  Hierarchy of affine transformations  Visualize a stick figure  Animate the figure
  • 7. CS 354 7 Rendering Outline Glyphs  Conventional method  CPU-based scan-line rasterization  Augmented by hinting  Adaptively Sampled Distance Fields (ADFs)  MERL’s Saffron type system  Glyphs are static so pre-computation is effective  Bitmaps often cached
  • 8. CS 354 8 Massively Parallel GPU-accelerated Path Rendering Visualized Anchored triangle Anchored triangle fans geometry fans net stencil Stencil =1 Path commands and control points Resulting net coverage in stencil Curved segment Curved segment geometry net stencil Stencil -1 Stencil +1 Credit: [Kokoji 2006]
  • 9. CS 354 9 OpenGL Bitmap Fonts  GLUT includes implementation  glutBitmapCharacter  Calls glBitmap with pre-compiled bitmap data  Also window system specific routines to get bitmaps from system fonts  wglUseFontBitmaps for Windows  glXUseXFont for X Window System (Linux)
  • 10. CS 354 10 OpenGL Stroke Fonts  Draw glyph’s stroke as line segments  Can transform arbitrarily  Use glEnable(GL_LINE_SMOOTH) for anti-aliasing  glutStrokeCharacter does this
  • 11. CS 354 11 Other Text Approaches  Pack glyphs in texture atlas  Then draw textured rectangles with the correct texture coordinates for each glyph
  • 12. CS 354 12 First-class Text Support in Various Rendering Systems Rendering system Vendor / Sponsor First-class text? Cairo Open source Yes Direct2D / Direct3D Microsoft Yes Flash Adobe Yes GDI Microsoft Yes Java 2D Sun Yes OpenGL Khronos No OpenVG Khronos Yes Office Open XML Microsoft / ECMA Yes PDF Adobe Yes PHIGS ISO Yes PostScript Adobe Yes Qt Nokia Yes Quart 2D Apple Yes Scalable Vector Graphics (SVG) World Wide Web Consortium Yes Silverlight Microsoft Yes Xlib X Consortium Yes
  • 13. CS 354 13 How did OpenGL’s lack of text support last for so long?  OpenGL was designed in 1992  Pre-Unicode world  Fonts were bitmaps of ASCII back then  Now TrueType and OpenType dominate  The primitive initial state of OpenGL’s font support has become mistaken for a philosophical dictate  Text-based applications uniformly ignore OpenGL  Not a good thing  3D applications have their expectations adjusted to expect lousy text  Not a good thing  Example: Quake 2 console text is miniscule because textured bitmap characters assumed text sized for 800x600 display
  • 14. CS 354 14 The World Has Changed Since 1992  Unicode universally accepted now  Systems ship with near-complete, resolution-independent Unicode fonts now  Good fonts come with your operating system license  International character of web makes UTF-8 text common today  Windows adoption of UTF-16 makes that common within Windows  Web has expanded font repertoire of systems  Content providers and users expect wide range of available fonts  Fonts have standard names embedded in web content  These font names span operating systems  Screen resolution has increased  1992: 640x480 aliased  2009: 1920x1200+ multisampled  Needing all text to be in small point sizes to fit screen isn’t a mandate anymore  3D support and acceleration is pervasive now  Text makes sense mixed with 3D content today
  • 15. CS 354 15 Direct Path Rendering of Text in OpenGL  Recent work  NV_path_rendering provides GPU-acceleration of paths, including glyphs  Glyph support is first-class
  • 16. CS 354 16 Digital Typography Trends  Hinting & ClearType likely going away  Mainly due to denser screens  Expectation of antialiased font appearance  Text not always presented axis-aligned or black-on-white  More font variety in web content  Improving standards  More available fonts  Even font variety for East Asian writing systems
  • 17. CS 354 17 OpenGL’s Realism Limitations  OpenGL is based on a pipeline model in which primitives are rendered one at time  No automatic shadows (except by tricks or multiple renderings)  No automatic multiple reflections  Multi-pass algorithms for shadows and reflections  Physically plausible & global approaches  Rendering equation  Ray tracing  Radiosity 17
  • 18. CS 354 18 Ray Casting  Arthur Appel (1968)  Cast rays from eye… what object is hit?
  • 19. CS 354 19 Ray Tracing  “An Improved Illumination Model for Shaded Display”  Turner Whitted (1980)  Communications of the ACM  Performance  512x512 pixels  74 Minutes on VAX (1979)  6 seconds on PC (2006)  60+ frames/second on GPU (2012)
  • 20. CS 354 20 Ray Tracing  Follow rays of light from a point source  Can account for reflection and transmission 20
  • 21. CS 354 21 Example of Complex Ray Traced Scene
  • 22. CS 354 22 Computational Limits of Ray Tracing  Should be able to handle all physical interactions  Ray tracing paradigm is physically plausible  But most rays do not affect what we see  Scattering produces many (infinite) additional rays  Alternative: ray casting 22
  • 23. CS 354 23 Ray Casting  Only rays that reach the eye matter  Reverse direction and cast rays  Need at least one ray per pixel 23
  • 24. CS 354 24 Ray Casting Quadrics  Ray casting has become a standard way to visualize quadrics which are implicit surfaces in CSG systems  Constructive Solid Geometry  Primitives are solids  Build objects with set operations  Union, intersection, set difference 24
  • 25. CS 354 25 Ray Casting a Sphere  Ray is parametric  Sphere is quadric  Resulting equation is a scalar quadratic equation which gives entry and exit points of ray (or no solution if ray misses) 25
  • 26. CS 354 26 Shadow Rays  Even if a point is visible, it will not be lit unless we can see a light source from that point  Cast shadow or feeler rays 26
  • 27. CS 354 27 Reflection  Must follow shadow rays off reflecting or transmitting surfaces  Process is recursive 27
  • 28. CS 354 28 Reflection and Transmission 28
  • 29. CS 354 29 Ray Trees 29
  • 30. CS 354 30 Ray Tree 30
  • 31. CS 354 31 Diffuse Surfaces  Theoretically the scattering at each point of intersection generates an infinite number of new rays that should be traced  In practice, we only trace the transmitted and reflected rays but use the Phong model to compute shade at point of intersection  Radiosity works best for perfectly diffuse (Lambertian) surfaces 31
  • 32. CS 354 32 Building a Ray Tracer  Best expressed recursively  Can remove recursion later  Image based approach  For each ray …….  Find intersection with closest surface  Need whole object database available  Complexity of calculation limits object types  Compute lighting at surface  Trace reflected and transmitted rays 32
  • 33. CS 354 33 More bounces When to stop  Some light will be absorbed at each intersection  Track amount left  Ignore rays that go off to infinity  Put large sphere around problem  Count steps Fewer bounces 33
  • 34. CS 354 34 Recursive Ray Tracer color c = trace(point p, vector d, int step) { color local, reflected, transmitted; point q; normal n; if(step > max) return(background_color); 34
  • 35. CS 354 35 Recursive Ray Tracer q = intersect(p, d, status); if(status==light_source) return(light_source_color); if(status==no_intersection) return(background_color); n = normal(q); r = reflect(q, n); t = transmit(q,n); 35
  • 36. CS 354 36 Recursive Ray Tracer local = phong(q, n, r); reflected = trace(q, r, step+1); transmitted = trace(q,t, step+1); return(local+reflected+transmitted); 36
  • 37. CS 354 37 Computing Intersections  Implicit Objects  Quadrics  Planes  Polyhedra  Parametric Surfaces 37
  • 38. CS 354 38 Implicit Surfaces Ray from p0 in direction d p(t) = p0 +t d General implicit surface f(p) = 0 Solve scalar equation f(p(t)) = 0 General case requires numerical methods 38
  • 39. CS 354 39 Quadrics General quadric can be written as pTAp + bTp +c = 0 Substitute equation of ray p(t) = p0 +t d to get quadratic equation 39
  • 40. CS 354 40 Sphere (p – pc) • (p – pc) – r2 = 0 p(t) = p0 +t d p0 • p0 t2+ 2 p0 • (d – p0) t + (d – p0) • (d – p0) – r2 = 0 40
  • 41. CS 354 41 Planes p•n+c=0 p(t) = p0 +t d t = -(p0 • n + c)/ d • n 41
  • 42. CS 354 42 Implicit Surface Ray Tracing Example  Paul Heckbert 1983
  • 43. CS 354 43 Polyhedra  Generally we want to intersect with closed objects such as polygons and polyhedra rather than planes  Hence we have to worry about inside/outside testing  For convex objects such as polyhedra there are some fast tests 43
  • 44. CS 354 44 Ray Tracing Polyhedra  If ray enters an object, it must enter a front facing polygon and leave a back facing polygon  Polyhedron is formed by intersection of planes  Ray enters at furthest intersection with front facing planes  Ray leaves at closest intersection with back facing planes  If entry is further away than exit, ray must miss the polyhedron 44
  • 45. CS 354 45 Ray Tracing Polyhedra 45
  • 46. CS 354 46 Ray Tracing a Polygon 46
  • 47. CS 354 47 Ray Tracing a Polygon 47
  • 48. CS 354 48 Algorithmic Complexity of Ray Tracing  Time complexity  Rasterization: O(b • m)  coherent!  Naïve ray tracing: O(b • p)  Accelerated ray tracing: O(log b • p)  incoherent  Key  b = # of objects in the scene  p = # of pixels in the scene  m = average # of pixels per object
  • 49. CS 354 49 Real-time Ray Tracing  GPUs doing ray tracing  General purpose compute on GPUs [Optix, NVIDIA, SIGGRAPH 2009]
  • 50. CS 354 50 Ray Tracing Quality  Aliasing is a problem in ray tracing  Spatial and temporal  Spatial anti-aliasing  Average over several samples per pixel 1 sample 5x5 grid 5x5 jittered grid
  • 51. CS 354 51 Distribution Ray Tracing  Spatial anti-aliasing 1 sample per pixel multiple samples per pixel
  • 52. CS 354 52 Distribution Ray Tracing  Soft shadows  Distribute shadow rays over light source region All shadow rays No shadow rays Some shadow rays hit light source, hit light source, hit light source, fully illuminated fully shadowed partially shadowed
  • 53. CS 354 53 Soft Shadows Example  Multiple ray tracing effects  Including soft shadows
  • 54. CS 354 54 Distribution Ray Tracing  Motion blur  Distribute rays over time Pool Balls Tom Porter RenderMan
  • 55. CS 354 55 Distribution Ray Tracing  Depth of field  Distribute rays across a discrete camera aperture No depth-of-field More rays Jittered depth-of-field More images for depth-of-field Even more rays
  • 56. CS 354 56 Next Class  Next lecture  Global illumination  How is the complex interaction of light within a scene realistically modeled?  Reading: Chapter 11, 559-568  Project 3  Due tomorrow—Wednesday, April 18, 2012  Next up: Project 4 is a simple ray tracer  Due May 2, 2012
  • 57. CS 354 57 Credits • Ed Angel and Dave Shreiner: Interactive Computer Graphics 6E © Addison-Wesley (2012) • Pat Hanrahan • Paul Heckbert