DOC PREVIEW
UW-Madison CS 559 - CS 559 Lecture Notes

This preview shows page 1-2-15-16-17-32-33 out of 33 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Last TimeTodayMore Object RepresentationsParametric InstancingRendering InstancesOpenGL SupportDisplay Lists (2)Display Lists (3)Hierarchical ModelingHierarchical Model ExampleSlide 11Regularized Set OperationsConstructive Solid Geometry (CSG)CSG ExampleRendering CSGCSG SummarySweep ObjectsGeneral SweepsRendering SweepsSpatial EnumerationOctrees (and Quadtrees)Quadtree ExampleRendering OctreesSpatial Data StructuresImplicit FunctionsBlobs and MetaballsExample with BlobsRendering Implicit SurfacesProduction RulesL-Systems GeneratorL-SystemsMore L-SystemsYet More L-systems04/11/02 (C) 2002 University of WisconsinLast Time•Intro to modeling•Issues in evaluating modeling techniques:–How well does it represent objects?–What types of objects can it represent?–How easy is it to render?–How compact is it?–How easy is it to create/modify?–How easy is it to perform geometric computations?•Polygonal modeling–A multitude of ways to represent polygonal models and associated data04/11/02 (C) 2002 University of WisconsinToday•A menagerie of other modeling techniques•Homework 504/11/02 (C) 2002 University of WisconsinMore Object Representations•Parametric instancing•Hierarchical modeling•Constructive Solid Geometry•Sweep Objects•Octrees•Blobs and Metaballs and other such things•Production rules04/11/02 (C) 2002 University of WisconsinParametric Instancing•Many things, called primitives, are conveniently described by a label and a few parameters–Cylinder: Radius, length, does it have end-caps, …–Bolts: length, diameter, thread pitch, …–Other examples?•This is a modeling format:–Provide software that knows how to draw the object given the parameters, or knows how to produce a polygonal mesh–How you manage the model depends on the rendering style–Can be an exact representation04/11/02 (C) 2002 University of WisconsinRendering Instances•Generally, provide a routine that takes the parameters and produces a polygonal representation–Conveniently brings parametric instancing into the rendering pipeline–May include texture maps, normal vectors, colors, etc–OpenGL utility library (GLu) defines routines for cubes, cylinders, disks, and other common shapes–Renderman does similar things, so does POVray, …•The procedure may be dynamic–For example, adjust the polygon resolution according to distance from the viewer04/11/02 (C) 2002 University of WisconsinOpenGL Support•OpenGL defines display lists for encapsulating commands that are executed frequently–Not exactly parametric instancing, because you are very limited in the parameterslist_id = glGenLists(1);glNewList(list_id, GL_COMPILE);glBegin(GL_TRIANGLES);draw some stuffglEnd();glEndList();And laterglCallList(list_id);04/11/02 (C) 2002 University of WisconsinDisplay Lists (2)•The list can be:–GL_COMPILE: things don’t get drawn, just stored–GL_COMPILE_AND_EXECUTE: things are drawn, and also stored•The list can contain almost anything:–Useful for encapsulating lighting set-up commands–Cann ot contain vertex arrays and other client state•The list cannot be modified after it is compiled–The whole point is that the list may be internally optimized, which precludes modification–For example, sequences of transformations may be composed into one transformation04/11/02 (C) 2002 University of WisconsinDisplay Lists (3)•When should you use display lists:–When you do the same thing over and over again•Advantages:–Can’t be much slower than the original way–Can be much much faster•Disadvantages:–Doesn’t support real parameterized instancing, because you can’t have any parameters (except transformations)!–Can’t use various commands that would offer other speedups•For example, can’t use glVertexPointer()04/11/02 (C) 2002 University of WisconsinHierarchical Modeling•A hierarchical model unites several parametric instances into one object–For example: a desk is made up of many cubes–Other examples?•Generally represented as a tree, with transformations and instances at any node•Rendered by traversing the tree, applying the transformations, and rendering the instances•Particularly useful for animation–Human is a hierarchy of body, head, upper arm, lower arm, etc…–Animate by changing the transformations at the nodes04/11/02 (C) 2002 University of WisconsinHierarchical Model ExampleDraw bodyleft armxarmlRotate about shoulderDraw upper armTranslate (l,0,0)Rotate about origin oflower armDraw lower armVitally Important Point:•Every node has its own local coordinate system.•This makes specifying transformations much much easier.04/11/02 (C) 2002 University of WisconsinOpenGL Support•OpenGL defines glPushMatrix() and glPopMatrix()–Takes the current matrix and pushes it onto a stack, or pops the matrix off the top of the stack and makes it the current matrix–Note: Pushing does not change the current matrix•Rendering a hierarchy (recursive):RenderNode(tree)glPushMatrix()Apply node transformationDraw node contentsRenderNode(children)glPopMatrix()04/11/02 (C) 2002 University of WisconsinRegularized Set Operations•Hierarchical modeling is not good enough if objects in the hierarchy intersect each other–Transparency will reveal internal surfaces that should not exist–Computing properties like mass may count the same volume twice•Solution is to define regularized set operations:–Just a fancy name–Every object must be a closed volume (mathematically closed)–Define mathematical set operations (union, intersection, difference, complement) to the sets of points within the volume04/11/02 (C) 2002 University of WisconsinConstructive Solid Geometry (CSG)•Based on a tree structure, like hierarchical modeling, but now:–The internal nodes are set operations: union, intersection or difference (sometimes complement)–The edges of the tree have transformations associated with them–The leaves contain only geometry•Allows complex shapes with only a few primitives–Common primitives are cylinders, cubes, etc, or quadric surfaces•Motivated by computer aided design and manufacture–Difference is like drilling or milling–A common format in CAD products04/11/02 (C) 2002 University of WisconsinCSG Example--cubescaletranslatecylinder cylinderscaletranslatescaletranslateFill it in!04/11/02 (C) 2002 University of WisconsinRendering CSG•Normals and texture coordinates typically come from underlying primitives (not a big


View Full Document

UW-Madison CS 559 - CS 559 Lecture Notes

Documents in this Course
Filters

Filters

14 pages

Lecture 2

Lecture 2

24 pages

Clipping

Clipping

22 pages

Modeling

Modeling

33 pages

Filters

Filters

26 pages

Dithering

Dithering

33 pages

Lecture 4

Lecture 4

20 pages

Load more
Download CS 559 Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view CS 559 Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CS 559 Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?