Jim Fawcett Brown-Bag Seminar, December 2007

Slides:



Advertisements
Similar presentations
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Advertisements

David Teitlebaum - Program Manager Jordan Parker - Developer Kurt Berglund - DeveloperKurt Berglund - Developer Microsoft CorporationMicrosoft Corporation.
Three Dimensional Viewing
Lighting and Illumination Lighting is the major problem in computer graphics, for either realism or real-time compositions- harder than modeling Consider.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Adv. Computer Graphics CS6500, Spring 2003.
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Scenes, Cameras & Lighting. Outline  Constructing a scene  Using hierarchy  Camera models  Light models.
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
Lecture 5: 3D Rendering Pipeline (II) Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
3D Objects Subject:T0934 / Multimedia Programming Foundation Session:12 Tahun:2009 Versi:1/0.
Textures and Maps MCC Computer Modelling Trimester 1 – 2015/2016.
Introduction to Textures and Skins Chapter 8 & 9 3D Game Programming All-in-One By Ken Finney.
Rujchai Ung-arunyawee Department of Computer Engineering Khon Kaen University.
Week 2 - Wednesday CS361.
1 Virtual Reality Modeling Language (VRML97) ©Anthony Steed
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
Programming 3D Applications CE Displaying Computer Graphics Week 3 Lecture 5 Bob Hobbs Faculty of Computing, Engineering and Technology Staffordshire.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
VRML Anthony Steed Department of Computer Science University College London ©Anthony Steed
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
OpenGL The Viewing Pipeline: Definition: a series of operations that are applied to the OpenGL matrices, in order to create a 2D representation from 3D.
Illumination and Shading
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Basic 3D Concepts. Overview 1.Coordinate systems 2.Transformations 3.Projection 4.Rasterization.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
 2009 Pearson Education, Inc. All rights reserved WPF Graphics and Multimedia.
1 9 Lighting a Scene v There are four types of lighting: –ambient light –directional light –point light –spotlight v Any number of these can be added to.
Viewpoints and Transformations CSIS 5838: Graphics and Animation for Gaming.
Digital Media Dr. Jim Rowan ITEC Vector Graphics Elegant way to construct digital images that –have a compact representation –are scalable –are.
A Photograph of two papers
Computer Graphics Matrices
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
A Photograph of two papers The Model: 2 papers – 8cm x 8cm and 5cm x 5cm The Camera – Simple pinhole – No focusing capability The Scene – Arrangements.
Illumination Models and Surface-Rendering Methods CEng 477 Introduction to Computer Graphics.
Rendering Pipeline Fall, 2015.
- Introduction - Graphics Pipeline
© University of Wisconsin, CS559 Spring 2004
Photorealistic Rendering vs. Interactive 3D Graphics
PERSPECTIVE PROJECTION…...
Jim Fawcett Brown-Bag Seminar, December 2007
Brown Bag Seminar Summer 2007 WPF-Visuals
CSCE 441 Computer Graphics 3-D Viewing
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
3D Graphics Rendering PPT By Ricardo Veguilla.
CENG 477 Introduction to Computer Graphics
CS451Real-time Rendering Pipeline
Transformations.
A Photograph of two papers
Dev311 未来应用的3D体验.
Three Dimensional Viewing
Digital Media Dr. Jim Rowan ITEC 2110.
Effects in the Visual Layer Windows Composition: The Windows 10 EffectBrush Chris Raubacher Senior Dev Lead Kelly Renner Senior Program Manager.
Isaac Gang University of Mary Hardin-Baylor
Dr. Jim Rowan ITEC 2110 Vector Graphics II
Lecture 28: Photometric Stereo
Geometrical Transformations
14th Lecture – Final Lecture
Computer Graphics Material Colours and Lighting
CS 480/680 Computer Graphics Shading.
Dr. Jim Rowan ITEC 2110 Vector Graphics II
Physical Problem of Simultaneous Linear Equations in Image Processing
Presentation transcript:

Jim Fawcett Brown-Bag Seminar, December 2007 Chapter 12 – 3D Graphics

Drawing a House Purpose of 3D graphics is to produce 2D image from 3D model <Page Background="Black" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Viewport3D> <Viewport3D.Camera> <OrthographicCamera Position="5,5,5" LookDirection="-1,-1,-1" Width="5"/> </Viewport3D.Camera> <Viewport3D.Children> <ModelVisual3D x:Name="Light"> <ModelVisual3D.Content> <AmbientLight/> </ModelVisual3D.Content> </ModelVisual3D> <ModelVisual3D> <Model3DGroup x:Name="House"> More Stuff Here – See House3DTransforms

Mapping 2D types to 3D types Drawing Pieces of 2D content Geometry 2D shape Visual Base for 2D rendering Transform Position, rotate, size 2D drawings Model3D Pieces of 3D models Geometry3D 3D surface Visual3D Base for 3D rendering Transform3D Position, rotate, size 3D drawings

Cameras Camera provides a view of a 3D model Position, orientation, and other properties determine view of 3D model. <Viewport3D.Camera> <OrthographicCamera Position="5,5,5" LookDirection="-1,-1,-1" Width="5"/> </Viewport3D.Camera>

Orthographic and Perspective Cameras Orthographic projection Distance from viewer does not affect size <Viewport3D.Camera> <OrthographicCamera Position="5,5,5" LookDirection="-1,-1,-1" Width="5"/> </Viewport3D.Camera> Perspective projection Distant objects appear smaller <Viewport3D.Camera> <PerspectiveCamera Position="6,6,6" LookDirection="-1,-1,-1" FieldOfView="45"/> </Viewport3D.Camera>

Orthographic and Perspective Cameras

Materials and Lights As in 2D, you use brushes to specify appearance of filled geometry. Lights influence gradients of hue and saturation. <ModelVisual3D x:Name="Light"> <ModelVisual3D.Content> <AmbientLight/> </ModelVisual3D.Content> </ModelVisual3D>

Transform3Ds TranslateTransform3D ScaleTransform3D RotateTransform3D Offset 3D object relative to its container ScaleTransform3D Scales object relative to its container RotateTransform3D You guessed it! Rotates relative to its container MatrixTransform3D Can combine all of the above as a matrix operation Transform3DGroup Contains a collection of transforms

Model3Ds Model3Ds are building blocks for 3D models Light Place sources of light in scene GeometryModel3D Renders a surface with a given material Model3DGroup A collection of Model3Ds which is itself a Model3D

Light DirectionalLight PointLight SpotLight Parallel rays from source at infinity PointLight Radiates light uniformly from point in scene Appears unfocused SpotLight Emits cone of light from point in scene Appears focused

Materials DiffuseMaterial SpecularMaterial EmissiveMaterial Scatters light striking surface in all directions, producing a flat affect SpecularMaterial Reflects light at same angle as incident ray. Creates glossy highlights on smooth surfaces EmissiveMaterial A surface that is emitting light MaterialGroup Applies multiple materials to a model

Geometry3Ds Positions TriangleIndices Normals TextureCoordinates Defines vertices of triangles in a mesh TriangleIndices Describes connections between vertices to form triangles Normals Vector in direction normal to a surface, used for shading TextureCoordinates Provides 3D-to-2D mapping of positions used by materials

ModelVisual3Ds Node in visual tree that can render 3D content <ModelVisual3D x:Name="Light"> <ModelVisual3D.Content> <AmbientLight/> </ModelVisual3D.Content> </ModelVisual3D> <ModelVisual3D> <Model3DGroup x:Name="House"> <GeometryModel3D x:Name="Roof"> <GeometryModel3D.Material> <DiffuseMaterial Brush="Blue"/> </GeometryModel3D.Material> <GeometryModel3D.Geometry> <MeshGeometry3D Positions="-1,1,1 0,2,1 0,2,-1 -1,1,-1 0,2,1 1,1,1,1,1,-1 0,2,-1" TriangleIndices="0 1 2 0 2 3 4 5 6 4 6 7"/> </GeometryModel3D.Geometry> </GeometryModel3D> Node in visual tree that can render 3D content To set content use the Content property:

Viewport3D A 2D FrameworkElement that bridges 2D and 3D Parent is always a 2D element like a Window or Grid Children are Visual3D elements 3D scene described by the child elements is rendered inside the rectangular bounds of the Viewport The Camera property of the Viewport controls the view of the scene

Nathan’s Examples Seventeen XAML files you can open in notepad, copy to XamlPad to view, and manipulate Two WPF projects 3D House with hit testing on its elements Rather sophisticated photo gallery