SlideShare ist ein Scribd-Unternehmen logo
1 von 51
Downloaden Sie, um offline zu lesen
CS 354
Procedural Methods
Mark Kilgard
University of Texas
April 3, 2012
CS 354                                2



         Today’s material
        In-class quiz
            On interaction lecture
        Lecture topic
          Project 2
          Procedural methods
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
            Project 2 on Programmable Shaders
            Interaction
                 Event models
                 Buffering frames
        This lecture
            Project 2 discussion
            Procedural methods for texturing and modeling
        Intermediate milestone for Project 2 due
            Had to first 2 shader tasks done
            Deadline was yesterday
            All shaders due Friday, April 6th
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: Which one of           True or False: Tearing is a
         these is not an interactive event        display artifact that results
         processing model?                        from unsynchronized buffer
                                                  swap or blit operations.
         a) Batching
         b) Polling
                                                 Multiple choice: Triple
                                                  buffering can improve display
         c) Event-driven                          update latency but suffers
                                                  from:
        True or False: GLUT                      a) Requiring additional buffer
         programs receive events                  memory
         through callback functions.
                                                  b) May render frames that
                                                  are never actually displayed
                                                  c) Both a) and b)
                                                  d) Neither a) nor b)
CS 354                                                                   6



         Project 2
        Project is NOW available
            PDF + code to use
        Requirements
          Mostly writing GLSL shaders
          Small amount of C/C++ code
                 Convert height map to normal map
                 Implement NormalMap::computeNormal method
        Intermediate milestone
            Yesterday: Monday, April 2nd
                 Submit snapshots and GLSL code for first two shaders
        Complete project
            Due Friday, April 6th
                 All 10 shaders
                 Embellish for additional credit
CS 354                                               7



         Your Mission So Far
        You should now have these first two
         shaders tasks implemented

                               Task 1: apply decal




          Task 0: roll torus
CS 354                                                  8

         Procedurally Generating a
         Torus from a 2D Grid




         2D grid over (s,t)∈[0,1]
                                    Tessellated torus
CS 354                                                                               9

         GLSL Standard Library Routines
         You’ll Need for Project 2
        texture2D—accesses a 2D texture through a sampler2D and a 2-component
         texture coordinate set (s,t)
        textureCube—access a cube map with a samplerCube and a 3-component
         texture coordinate set (s,t,r)
        normalize—normalizes a vector
        cross—computes a cross product of 2 vectors
        dot—computes a dot (inner) product of 2 vectors
        max—compute the maximum of two values
        reflect—compute a reflection vector given an incident vector and a normal
         vector
        vec3—constructor for 3-component vector from scalars
        mat3—constructor for 3x3 matrix from column vectors
        *—matrix-by-vector or vector-by-matrix multiplication
        sin—sine trigonometric function
        cos—cosine trigonometric function
        pow—raise a number to a power, exponentiation (hint: specular)
CS 354                                                                     10



         Coordinate Spaces for Project 2
        Parametric space
            2D space [0..1]x[0..1] for 2D patch
        Object space
          Transform the patch’s parametric space into a 3D space
           containing a torus
          Has modeling transformation from object- to world-space
        World space
          Environment map is oriented in this space
          gluLookAt’s coordinates are in this space
        Surface space
          (0,0,1) is always surface normal direction
          Mapping from object space to surface space varies along torus
          Perturbed normal from normal map overrides (0,0,1) geometric
           normal
        Eye space
            gluLookAt transforms world space to eye space
CS 354                                       11

         Artist-driven
         Content Generation
        Advantages
            Human artistic expression!
            Human-to-human user interface
            Polish
        Disadvantages
            Human-intensive
            Takes time to make lots of it
            Involved to change
            Data intensive
CS 354                                                     12

         Image-driven
         Content Generation
        Advantages
            As easy as taking pictures
        Disadvantages
          Very data-intensive
          Calibrating cameras & correlating images
                 Quite involved
                                          image panorama
            Involved to edit
CS 354                                        13

         Procedural
         Texturing and Modeling
      Let programs generate content!
      Advantages
          Small programs → lots of content
          Compact storage requirements
          Easy to generate more content
        Disadvantages
            Hard to control exactly
CS 354                                                       14



         Iterated Functions
        Provides infinite detail



                                    Example:
                                    Fractal Mandelbrot set
CS 354                                15

         Generating Lots of Content
         Procedurally
CS 354                                                    16



         L-Systems
        Developed by Aristid Lindenmayer
            Theoretical biologist
            Hence the L in L-System
        Concept
            Use a rewriting system to model growth and
             morphology of biological organisms
            Components
                 Axiom – initial state
                 Generator – applied recursively
        Useful in non-biology contexts too
            Geology, man-made objects, etc.
CS 354                               17



         Sierpinski Gasket
     Rule based:




     Repeat n times. As n →∞
      Area→0
      Perimeter →∞
     Not a normal geometric object
CS 354                                   18

         Apply Sierpinski Gasket Rules
         Recursively
CS 354                      19



         Snow Flake Curve
CS 354                               20



         Other Axioms & Generators
CS 354                                                 21



         Tree Generation




          An axial tree   Sample tree generated from
                             branching patterns
CS 354                            22



         Plant Generation Rules
CS 354                                                 23



         Stochastic L-systems
        Probabilistic




                         Stochastic L-systems can
                         generate natural variations
CS 354                                 24



         More Plant Generation Rules
CS 354                                                           25



         Fractal Mountains




                [Przemyslaw Prusinkiewicz & Mark Hammel, 1993]
CS 354                                 26



         Different Fractal Mountains
CS 354                                27

         Domain-specific Procedural
         Artistry Tools
CS 354                                                 28



         Trees Really Matter
        Commercial product SpeedTree specializes at
         drawing realistic trees fast
CS 354                                          29



         Biological Inspiration
        Pseudo-Darwinian animation evolution
CS 354                               30

         Procedural Generation of
         Buildings
        Buildings have rules too
          Doors, windows, facades
          Consistency of style
        Instant Architecture
         façade derivation…
CS 354                                                              31



         Procedural Generation of Cities!
        Cities are very detailed and complex
            CityGen
            But follow regular rules – roads, blocks, respecting
             topography, etc.
CS 354                      32



         Particle Systems
CS 354                                                       33

         Particle Systems and
         Their Equations
     pi = (xi, yi zi)
     vi = dpi /dt = pi‘ = (dxi /dt, dyi /dt , zi /dt)


     m vi‘= fi
     Hard part is defining force vector




                                                        33
CS 354                                               34



         Force Vector
        Independent Particles
             Gravity
             Wind forces
             O(n) calulation
        Coupled Particles O(n)
             Meshes
             Spring-Mass Systems
        Coupled Particles O(n2)
             Attractive and repulsive forces
                                                34
CS 354                                                     35



         Solution of Particle Systems
     float time, delta state[6n], force[3n];
     state = initial_state();
     for(time = t0; time<final_time, time+=delta) {
       force = force_function(state, time);
       state = ode(force, state, time, delta);
       render(state, time)
     }




                                                      35
CS 354                                             36



         Simple Forces
        Consider force on particle i
           fi = fi(pi, vi)
        Gravity fi = g
           gi = (0, -g, 0)
        Wind forces
        Drag
                             pi(t0), vi(t0)

                                              36
CS 354                                                                                       37



         Attraction and Repulsion
         Inverse square law
               f = -krd/|d|3
         General case requires O(n2) calculation
         In most problems, the drop off is such that
          not many particles contribute to the forces
          on any given particle
         Sorting problem: is it O(n log n)?


     E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012   37
CS 354                                                                 38



         Noise Textures
        Invented by Ken Perlin
            Academy Award winning idea
        A texturing primitive
          Basis for “natural” looking textures and
           phenomenon
          No memory/bandwidth requirements
                Computed on the fly; no “source image”
            No mapping problem
                Naturally 3D so not prone to “gift wrapping” issues
        Useful for range of applications and
         effects
CS 354                                                         39



         What is Noise?
        Band-limited repeatable
         pseudo-random function
          Domain: Rn
          Approximate to Gaussian filtered
           random noise
          Implemented as a pseudo-
           random spline
                On regular grid
                                               Marble vase
                                              generated with
                                               Perlin noise
CS 354                                                   40



         Variations on Noise
        Use noise within other functions




                                            turbulence
CS 354                                                41



         Combining Noise Patterns
        Sum noise patterns
            As frequency doubles, amplitude halves
CS 354                                                42



         Turbulence
        Simulate turbulence by generating noise at
         different octaves (scales)




        Average those octaves:
CS 354                                              43



         Generating Marble Pattern
        Start with sine pattern in solid texture




        Then add turbulence
            Looks like veins in marble
CS 354                                           44



         Variations on Marble
        Scale the magnitude of the turbulence
         displacing the sine pattern
CS 354                                                          45



         Wood Pattern
        Start with cylindrical pattern
            Compute sine of distance from center of cylinder
            Interpolate between dark and light brown color
CS 354                                                    46



         Irregular Wood Rings
        Now use small amount of turbulence to displace
         the tree rings in the wood




        Much less turbulence than marble case
            To preserve the rings
CS 354                                                      47



         Irregular Wood Grain
        Also want turbulence in Z direction but scale it
         back to preserve the grain




                                  less turbulence in z
CS 354                     48

         Shading with
         Marble and Wood
CS 354                                               49

         Other Procedurally Modeled
         Phenomenon
        Smoke
          Difficult for an artist to model
          Needs to billow and flow around objects
CS 354                                        50

         Entire Book on
         Procedural Techniques

                            David Ebert,
                            Ken Musgrave,
                            Darwyn Peachey,
                            Ken Perlin,
                            Steve Worley
CS 354                                                          51



         Next Class
        Next lecture
            Bezier curves
            How do we move smoothly and simply with control?
        Project 2
            Shading and lighting with GLSL
            Due Friday, April 6th

Weitere ähnliche Inhalte

Was ist angesagt?

CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 IntroductionMark Kilgard
 
CS 354 Final Exam Review
CS 354 Final Exam ReviewCS 354 Final Exam Review
CS 354 Final Exam ReviewMark Kilgard
 
CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing StuffMark Kilgard
 
CS 354 More Graphics Pipeline
CS 354 More Graphics PipelineCS 354 More Graphics Pipeline
CS 354 More Graphics PipelineMark Kilgard
 
An Introduction to NV_path_rendering
An Introduction to NV_path_renderingAn Introduction to NV_path_rendering
An Introduction to NV_path_renderingMark 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 GraphicsMark Kilgard
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture MappingMark Kilgard
 
CS 354 Understanding Color
CS 354 Understanding ColorCS 354 Understanding Color
CS 354 Understanding ColorMark Kilgard
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration StructuresMark Kilgard
 
CS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasingCS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasingMark Kilgard
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and MoreMark Kilgard
 
CS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingCS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingMark Kilgard
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityMark Kilgard
 
CS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationCS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationMark 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
 
GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012Mark Kilgard
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel UpdatingMark Kilgard
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012Mark Kilgard
 

Was ist angesagt? (20)

CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 Introduction
 
CS 354 Final Exam Review
CS 354 Final Exam ReviewCS 354 Final Exam Review
CS 354 Final Exam Review
 
CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing Stuff
 
CS 354 Shadows
CS 354 ShadowsCS 354 Shadows
CS 354 Shadows
 
CS 354 More Graphics Pipeline
CS 354 More Graphics PipelineCS 354 More Graphics Pipeline
CS 354 More Graphics Pipeline
 
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 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
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture Mapping
 
CS 354 Understanding Color
CS 354 Understanding ColorCS 354 Understanding Color
CS 354 Understanding Color
 
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 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasingCS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasing
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and More
 
CS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingCS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and Culling
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL Functionality
 
CS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationCS 354 Object Viewing and Representation
CS 354 Object Viewing and Representation
 
GTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path RenderingGTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path 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 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel Updating
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012
 

Ähnlich wie Procedural Methods Lecture Notes

CS 354 Bezier Curves
CS 354 Bezier Curves CS 354 Bezier Curves
CS 354 Bezier Curves 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 3Drsebbe
 
A Unified Framework for Computer Vision Tasks: (Conditional) Generative Model...
A Unified Framework for Computer Vision Tasks: (Conditional) Generative Model...A Unified Framework for Computer Vision Tasks: (Conditional) Generative Model...
A Unified Framework for Computer Vision Tasks: (Conditional) Generative Model...Sangwoo Mo
 
Modern OpenGL scientific visualization
Modern OpenGL scientific visualizationModern OpenGL scientific visualization
Modern OpenGL scientific visualizationNicolas Rougier
 
Computer Vision Landscape : Present and Future
Computer Vision Landscape : Present and FutureComputer Vision Landscape : Present and Future
Computer Vision Landscape : Present and FutureSanghamitra Deb
 
[AI07] Revolutionizing Image Processing with Cognitive Toolkit
[AI07] Revolutionizing Image Processing with Cognitive Toolkit[AI07] Revolutionizing Image Processing with Cognitive Toolkit
[AI07] Revolutionizing Image Processing with Cognitive Toolkitde:code 2017
 
Android Malware 2020 (CCCS-CIC-AndMal-2020)
Android Malware 2020 (CCCS-CIC-AndMal-2020)Android Malware 2020 (CCCS-CIC-AndMal-2020)
Android Malware 2020 (CCCS-CIC-AndMal-2020)Indraneel Dabhade
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big DataAlbert Bifet
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Daosheng Mu
 
20190927 generative models_aia
20190927 generative models_aia20190927 generative models_aia
20190927 generative models_aiaYi-Fan Liou
 
Ivan Sahumbaiev "Deep Learning approaches meet 3D data"
Ivan Sahumbaiev "Deep Learning approaches meet 3D data"Ivan Sahumbaiev "Deep Learning approaches meet 3D data"
Ivan Sahumbaiev "Deep Learning approaches meet 3D data"Fwdays
 
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakLearn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakPyData
 
Analysis of KinectFusion
Analysis of KinectFusionAnalysis of KinectFusion
Analysis of KinectFusionDong-Won Shin
 
February 2017 HUG: Data Sketches: A required toolkit for Big Data Analytics
February 2017 HUG: Data Sketches: A required toolkit for Big Data AnalyticsFebruary 2017 HUG: Data Sketches: A required toolkit for Big Data Analytics
February 2017 HUG: Data Sketches: A required toolkit for Big Data AnalyticsYahoo Developer Network
 
Web-Scale Graph Analytics with Apache® Spark™
Web-Scale Graph Analytics with Apache® Spark™Web-Scale Graph Analytics with Apache® Spark™
Web-Scale Graph Analytics with Apache® Spark™Databricks
 
Building your own NSQL store
Building your own NSQL storeBuilding your own NSQL store
Building your own NSQL storeEdward Capriolo
 
Nibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL storeNibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL storeEdward Capriolo
 
Nibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL storeNibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL storeEdward Capriolo
 

Ähnlich wie Procedural Methods Lecture Notes (20)

CS 354 Bezier Curves
CS 354 Bezier Curves CS 354 Bezier Curves
CS 354 Bezier Curves
 
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
 
A Unified Framework for Computer Vision Tasks: (Conditional) Generative Model...
A Unified Framework for Computer Vision Tasks: (Conditional) Generative Model...A Unified Framework for Computer Vision Tasks: (Conditional) Generative Model...
A Unified Framework for Computer Vision Tasks: (Conditional) Generative Model...
 
Modern OpenGL scientific visualization
Modern OpenGL scientific visualizationModern OpenGL scientific visualization
Modern OpenGL scientific visualization
 
Computer Vision Landscape : Present and Future
Computer Vision Landscape : Present and FutureComputer Vision Landscape : Present and Future
Computer Vision Landscape : Present and Future
 
[AI07] Revolutionizing Image Processing with Cognitive Toolkit
[AI07] Revolutionizing Image Processing with Cognitive Toolkit[AI07] Revolutionizing Image Processing with Cognitive Toolkit
[AI07] Revolutionizing Image Processing with Cognitive Toolkit
 
Android Malware 2020 (CCCS-CIC-AndMal-2020)
Android Malware 2020 (CCCS-CIC-AndMal-2020)Android Malware 2020 (CCCS-CIC-AndMal-2020)
Android Malware 2020 (CCCS-CIC-AndMal-2020)
 
Oops 2018
Oops 2018Oops 2018
Oops 2018
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big Data
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
 
20190927 generative models_aia
20190927 generative models_aia20190927 generative models_aia
20190927 generative models_aia
 
pydataPointCloud.pptx
pydataPointCloud.pptxpydataPointCloud.pptx
pydataPointCloud.pptx
 
Ivan Sahumbaiev "Deep Learning approaches meet 3D data"
Ivan Sahumbaiev "Deep Learning approaches meet 3D data"Ivan Sahumbaiev "Deep Learning approaches meet 3D data"
Ivan Sahumbaiev "Deep Learning approaches meet 3D data"
 
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakLearn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
 
Analysis of KinectFusion
Analysis of KinectFusionAnalysis of KinectFusion
Analysis of KinectFusion
 
February 2017 HUG: Data Sketches: A required toolkit for Big Data Analytics
February 2017 HUG: Data Sketches: A required toolkit for Big Data AnalyticsFebruary 2017 HUG: Data Sketches: A required toolkit for Big Data Analytics
February 2017 HUG: Data Sketches: A required toolkit for Big Data Analytics
 
Web-Scale Graph Analytics with Apache® Spark™
Web-Scale Graph Analytics with Apache® Spark™Web-Scale Graph Analytics with Apache® Spark™
Web-Scale Graph Analytics with Apache® Spark™
 
Building your own NSQL store
Building your own NSQL storeBuilding your own NSQL store
Building your own NSQL store
 
Nibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL storeNibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL store
 
Nibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL storeNibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL store
 

Mehr von 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 StudentsMark 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 2017Mark Kilgard
 
NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017Mark Kilgard
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016Mark Kilgard
 
Virtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsVirtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsMark Kilgard
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMark Kilgard
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectanglesMark 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 PipelineMark Kilgard
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsMark 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 GPUsMark 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 RenderingMark 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 BeyondMark 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 fastforwardMark Kilgard
 
GPU-accelerated Path Rendering
GPU-accelerated Path RenderingGPU-accelerated Path Rendering
GPU-accelerated Path RenderingMark 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 RenderingMark Kilgard
 
CS 354 Global Illumination
CS 354 Global IlluminationCS 354 Global Illumination
CS 354 Global IlluminationMark Kilgard
 

Mehr von Mark Kilgard (20)

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
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016
 
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
 
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
 
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
 
GPU-accelerated Path Rendering
GPU-accelerated Path RenderingGPU-accelerated Path Rendering
GPU-accelerated Path Rendering
 
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
 
CS 354 Global Illumination
CS 354 Global IlluminationCS 354 Global Illumination
CS 354 Global Illumination
 

Kürzlich hochgeladen

[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 

Kürzlich hochgeladen (20)

[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 

Procedural Methods Lecture Notes

  • 1. CS 354 Procedural Methods Mark Kilgard University of Texas April 3, 2012
  • 2. CS 354 2 Today’s material  In-class quiz  On interaction lecture  Lecture topic  Project 2  Procedural methods
  • 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  Project 2 on Programmable Shaders  Interaction  Event models  Buffering frames  This lecture  Project 2 discussion  Procedural methods for texturing and modeling  Intermediate milestone for Project 2 due  Had to first 2 shader tasks done  Deadline was yesterday  All shaders due Friday, April 6th
  • 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: Which one of  True or False: Tearing is a these is not an interactive event display artifact that results processing model? from unsynchronized buffer swap or blit operations. a) Batching b) Polling  Multiple choice: Triple buffering can improve display c) Event-driven update latency but suffers from:  True or False: GLUT a) Requiring additional buffer programs receive events memory through callback functions. b) May render frames that are never actually displayed c) Both a) and b) d) Neither a) nor b)
  • 6. CS 354 6 Project 2  Project is NOW available  PDF + code to use  Requirements  Mostly writing GLSL shaders  Small amount of C/C++ code  Convert height map to normal map  Implement NormalMap::computeNormal method  Intermediate milestone  Yesterday: Monday, April 2nd  Submit snapshots and GLSL code for first two shaders  Complete project  Due Friday, April 6th  All 10 shaders  Embellish for additional credit
  • 7. CS 354 7 Your Mission So Far  You should now have these first two shaders tasks implemented Task 1: apply decal Task 0: roll torus
  • 8. CS 354 8 Procedurally Generating a Torus from a 2D Grid 2D grid over (s,t)∈[0,1] Tessellated torus
  • 9. CS 354 9 GLSL Standard Library Routines You’ll Need for Project 2  texture2D—accesses a 2D texture through a sampler2D and a 2-component texture coordinate set (s,t)  textureCube—access a cube map with a samplerCube and a 3-component texture coordinate set (s,t,r)  normalize—normalizes a vector  cross—computes a cross product of 2 vectors  dot—computes a dot (inner) product of 2 vectors  max—compute the maximum of two values  reflect—compute a reflection vector given an incident vector and a normal vector  vec3—constructor for 3-component vector from scalars  mat3—constructor for 3x3 matrix from column vectors  *—matrix-by-vector or vector-by-matrix multiplication  sin—sine trigonometric function  cos—cosine trigonometric function  pow—raise a number to a power, exponentiation (hint: specular)
  • 10. CS 354 10 Coordinate Spaces for Project 2  Parametric space  2D space [0..1]x[0..1] for 2D patch  Object space  Transform the patch’s parametric space into a 3D space containing a torus  Has modeling transformation from object- to world-space  World space  Environment map is oriented in this space  gluLookAt’s coordinates are in this space  Surface space  (0,0,1) is always surface normal direction  Mapping from object space to surface space varies along torus  Perturbed normal from normal map overrides (0,0,1) geometric normal  Eye space  gluLookAt transforms world space to eye space
  • 11. CS 354 11 Artist-driven Content Generation  Advantages  Human artistic expression!  Human-to-human user interface  Polish  Disadvantages  Human-intensive  Takes time to make lots of it  Involved to change  Data intensive
  • 12. CS 354 12 Image-driven Content Generation  Advantages  As easy as taking pictures  Disadvantages  Very data-intensive  Calibrating cameras & correlating images  Quite involved image panorama  Involved to edit
  • 13. CS 354 13 Procedural Texturing and Modeling  Let programs generate content!  Advantages  Small programs → lots of content  Compact storage requirements  Easy to generate more content  Disadvantages  Hard to control exactly
  • 14. CS 354 14 Iterated Functions  Provides infinite detail Example: Fractal Mandelbrot set
  • 15. CS 354 15 Generating Lots of Content Procedurally
  • 16. CS 354 16 L-Systems  Developed by Aristid Lindenmayer  Theoretical biologist  Hence the L in L-System  Concept  Use a rewriting system to model growth and morphology of biological organisms  Components  Axiom – initial state  Generator – applied recursively  Useful in non-biology contexts too  Geology, man-made objects, etc.
  • 17. CS 354 17 Sierpinski Gasket Rule based: Repeat n times. As n →∞ Area→0 Perimeter →∞ Not a normal geometric object
  • 18. CS 354 18 Apply Sierpinski Gasket Rules Recursively
  • 19. CS 354 19 Snow Flake Curve
  • 20. CS 354 20 Other Axioms & Generators
  • 21. CS 354 21 Tree Generation An axial tree Sample tree generated from branching patterns
  • 22. CS 354 22 Plant Generation Rules
  • 23. CS 354 23 Stochastic L-systems  Probabilistic Stochastic L-systems can generate natural variations
  • 24. CS 354 24 More Plant Generation Rules
  • 25. CS 354 25 Fractal Mountains [Przemyslaw Prusinkiewicz & Mark Hammel, 1993]
  • 26. CS 354 26 Different Fractal Mountains
  • 27. CS 354 27 Domain-specific Procedural Artistry Tools
  • 28. CS 354 28 Trees Really Matter  Commercial product SpeedTree specializes at drawing realistic trees fast
  • 29. CS 354 29 Biological Inspiration  Pseudo-Darwinian animation evolution
  • 30. CS 354 30 Procedural Generation of Buildings  Buildings have rules too  Doors, windows, facades  Consistency of style  Instant Architecture façade derivation…
  • 31. CS 354 31 Procedural Generation of Cities!  Cities are very detailed and complex  CityGen  But follow regular rules – roads, blocks, respecting topography, etc.
  • 32. CS 354 32 Particle Systems
  • 33. CS 354 33 Particle Systems and Their Equations pi = (xi, yi zi) vi = dpi /dt = pi‘ = (dxi /dt, dyi /dt , zi /dt) m vi‘= fi Hard part is defining force vector 33
  • 34. CS 354 34 Force Vector  Independent Particles  Gravity  Wind forces  O(n) calulation  Coupled Particles O(n)  Meshes  Spring-Mass Systems  Coupled Particles O(n2)  Attractive and repulsive forces 34
  • 35. CS 354 35 Solution of Particle Systems float time, delta state[6n], force[3n]; state = initial_state(); for(time = t0; time<final_time, time+=delta) { force = force_function(state, time); state = ode(force, state, time, delta); render(state, time) } 35
  • 36. CS 354 36 Simple Forces  Consider force on particle i fi = fi(pi, vi)  Gravity fi = g gi = (0, -g, 0)  Wind forces  Drag pi(t0), vi(t0) 36
  • 37. CS 354 37 Attraction and Repulsion  Inverse square law f = -krd/|d|3  General case requires O(n2) calculation  In most problems, the drop off is such that not many particles contribute to the forces on any given particle  Sorting problem: is it O(n log n)? E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 37
  • 38. CS 354 38 Noise Textures  Invented by Ken Perlin  Academy Award winning idea  A texturing primitive  Basis for “natural” looking textures and phenomenon  No memory/bandwidth requirements  Computed on the fly; no “source image”  No mapping problem  Naturally 3D so not prone to “gift wrapping” issues  Useful for range of applications and effects
  • 39. CS 354 39 What is Noise?  Band-limited repeatable pseudo-random function  Domain: Rn  Approximate to Gaussian filtered random noise  Implemented as a pseudo- random spline  On regular grid Marble vase generated with Perlin noise
  • 40. CS 354 40 Variations on Noise  Use noise within other functions turbulence
  • 41. CS 354 41 Combining Noise Patterns  Sum noise patterns  As frequency doubles, amplitude halves
  • 42. CS 354 42 Turbulence  Simulate turbulence by generating noise at different octaves (scales)  Average those octaves:
  • 43. CS 354 43 Generating Marble Pattern  Start with sine pattern in solid texture  Then add turbulence  Looks like veins in marble
  • 44. CS 354 44 Variations on Marble  Scale the magnitude of the turbulence displacing the sine pattern
  • 45. CS 354 45 Wood Pattern  Start with cylindrical pattern  Compute sine of distance from center of cylinder  Interpolate between dark and light brown color
  • 46. CS 354 46 Irregular Wood Rings  Now use small amount of turbulence to displace the tree rings in the wood  Much less turbulence than marble case  To preserve the rings
  • 47. CS 354 47 Irregular Wood Grain  Also want turbulence in Z direction but scale it back to preserve the grain less turbulence in z
  • 48. CS 354 48 Shading with Marble and Wood
  • 49. CS 354 49 Other Procedurally Modeled Phenomenon  Smoke  Difficult for an artist to model  Needs to billow and flow around objects
  • 50. CS 354 50 Entire Book on Procedural Techniques David Ebert, Ken Musgrave, Darwyn Peachey, Ken Perlin, Steve Worley
  • 51. CS 354 51 Next Class  Next lecture  Bezier curves  How do we move smoothly and simply with control?  Project 2  Shading and lighting with GLSL  Due Friday, April 6th