Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 8 Views.

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

Defining the Viewing Coordinate System
Three Dimensional Viewing
Viewing and Projections
CS 352: Computer Graphics Chapter 5: Viewing. Interactive Computer GraphicsChapter Overview Specifying the viewpoint Specifying the projection Types.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 7 Geometric Transformation.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 8 Views F Views in 3D rendering process.
Business and Computing Deanery 3D Modelling Tools Week 10 Cameras.
Essentials of Interactive Computer Graphics: Concepts and Implementation K. Sung, P. Shirley, S. Baer Chapter 14 Chapter 14: The Camera.
CS 4731: Computer Graphics Lecture 11: 3D Viewing Emmanuel Agu.
1 Chapter 5 Viewing. 2 Perspective Projection 3 Parallel Projection.
Informationsteknologi Wednesday, November 14, 2007Computer Graphics - Class 81 Today’s class Orthogonal matrices Quaternions Shears Synthetic camera Viewing.
Scenes, Cameras & Lighting. Outline  Constructing a scene  Using hierarchy  Camera models  Light models.
Projection Projection - the transformation of points from a coordinate system in n dimensions to a coordinate system in m dimensions where m
Introduction to 3D viewing 3D is just like taking a photograph!
Basic 3D Graphics Chapter 5. Bird’s Eye View  Basic 3D Graphics –Basic concepts of 3D graphics, rendering pipeline, Java 3D programming, scene graph,
Lecture 5: 3D Rendering Pipeline (II) Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology.
Viewing and Projections
Computer Graphics (fall 2009)
Advanced Computer Graphics Three Dimensional Viewing
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 12 Additional 3D Topics.
2 COEN Computer Graphics I Evening’s Goals n Discuss the mathematical transformations that are utilized for computer graphics projection viewing.
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
Computer Graphics Bing-Yu Chen National Taiwan University.
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 5.
CS 450: COMPUTER GRAPHICS PROJECTIONS SPRING 2015 DR. MICHAEL J. REALE.
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.
Graphics Graphics Korea University kucg.korea.ac.kr Viewing 고려대학교 컴퓨터 그래픽스 연구실.
Cameras and Light Chapter 4, The Inventor Mentor.
Jinxiang Chai CSCE 441 Computer Graphics 3-D Viewing 0.
The Camera Analogy ► Set up your tripod and point the camera at the scene (viewing transformation) ► Arrange the scene to be photographed into the desired.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
Three-Dimensional Viewing Hearn & Baker Chapter 7
©2005, Lee Iverson Lee Iverson UBC Dept. of ECE EECE 478 Viewing and Projection.
Graphics CSCI 343, Fall 2015 Lecture 16 Viewing I
Viewpoints and Transformations CSIS 5838: Graphics and Animation for Gaming.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 11 Animation.
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Taxonomy of Projections FVFHP Figure Taxonomy of Projections.
Viewing and Projection
Many of the figures from this book may be reproduced free of charge in scholarly articles, proceedings, and presentations, provided only that the following.
A Photograph of two papers
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 5 Basic 3D Graphics.
Coordinate Systems Lecture 1 Fri, Sep 2, The Coordinate Systems The points we create are transformed through a series of coordinate systems before.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Orthonormal Basis Cartesian Coordinate System – Unit vectors: i, j, k – Normalized to each other – Unique representation for each position!! – Convenient!
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Computer Viewing Isaac Gang University of Mary Hardin-Baylor.
OpenGL LAB III.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
CS 490: Computer Graphics Chapter 5: Viewing. Interactive Computer GraphicsChapter Overview Specifying the viewpoint Specifying the projection Types.
Outline 3D Viewing Required readings: HB 10-1 to 10-10
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.
Three Dimensional Viewing
Rendering Pipeline Fall, 2015.
3D Computer Graphics (3080/GV10) Week 5-6 Tutorial 3
CSCE 441 Computer Graphics 3-D Viewing
Normalizing Transformation (I)
CSC461: Lecture 20 Parallel Projections in OpenGL
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.
CSC461: Lecture 19 Computer Viewing
A Photograph of two papers
Three Dimensional Viewing
Computer Graphics Imaging
Last Time Canonical view pipeline Projection Local Coordinate Space
Viewing (Projections)
The View Frustum Lecture 10 Fri, Sep 14, 2007.
Interactive Computer Graphics Viewing
Viewing/Projections I Week 3, Fri Jan 25
THREE-DIMENSIONAL VIEWING II
CS 352: Computer Graphics Chapter 5: Viewing.
Presentation transcript:

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 8 Views

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 2 Objectives F To present the concept of view in 3D rendering process F To identify the parallel and perspective projections F To specify the viewing matrix F To specify the projection matrix F To apply Java 3D standard view model F To apply Java 3D compatibility mode view model F To apply picking in a 3D scene F To understand head-tracking in view models F To apply input devices, sensors, and head-tracking in Java 3D F To use the avatar in SimpleUniverse

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 3 Parallel Projection

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 4 Perspective Projection

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 5 View Parameters F Projection – parallel or perspective projection. F View Plate – the window for the rendered image. It is usually a rectangular region. In a real camera the view plate corresponds to the film frame. F Field of view (fov) – the horizontal angle between the left and right plane of the frustum. The vertical field of view and diagonal field of view can be defined similarly. F Focal length – the distance between the view plate and the view point. F Aspect ratio – the ratio of width over length of the view planes. F Front clip plane – the front or near plane of the frustum. F Back clip plane – the back or far plane of the frustum.

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 6 Projection Matrix Front plane Back plane

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 7 Viewing Matrix F Viewpoint, view-reference point (vrp, eye) – the camera or eye position, the 3D point where the camera is located. F View center (look) – the center of view plate or the point that the eye is looking at. F View up direction (up) – the upward direction from a viewer’s perspective. F View plane – the plane of the projected image. F View plane normal (vpn) – the normal vector of the view plane.

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 8 Java 3D View Model

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 9 Configure a 3D View View class void setFieldOfView(double fov) void setFrontClipDistance(double d) void setBackClipDistance(double d) void setProjectionPolicy(int projection) void lookAt(Point3d eye, Point3d look, Vector3d up) Transform3D class

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 10 The Compatibility Mode F A simple mode compatible with OpenGL F Static camera F Manual settings of fixed view parameters Source Run

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 11 SimpleUniverse F Compatibility mode: false F Left projection: identity F Right projection: identity F vpc to ec transform: identity F Field of view: π/4 F Front clip distance: 0.1 F Back clip distance: 10 SourceRun

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 12 Scene Graph

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 13 Create Your Own Views SourceRun A view branch View view = new View(); view.setProjectionPolicy(View.PARALLEL_PROJECTION); ViewPlatform vp = new ViewPlatform(); view.addCanvas3D(cv); view.attachViewPlatform(vp); view.setPhysicalBody(new PhysicalBody()); view.setPhysicalEnvironment(new PhysicalEnvironment()); Transform3D trans = new Transform3D(); trans.lookAt(eye, center, vup); trans.invert(); TransformGroup tg = new TransformGroup(trans); tg.addChild(vp); BranchGroup bgView = new BranchGroup(); bgView.addChild(tg);

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 14 Picking F Pick objects from the rendered image F Inverse of projection F Pre-images: a cone or a cylinder SceneGraphPath[] pickAll(PickShape pickShape) SceneGraphPath[] pickAllSorted(PickShape pickShape) SceneGraphPath pickAny(PickShape pickShape) SceneGraphPath pickClosest(PickShape pickShape)

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 15 Picking SourceRun Picking example

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 16 Head Tracking F Adjustment of view parameters following dynamic head position changes F Java 3D head tracking support –View –Sensor –PhysicalBody –PhysicalEnvironment SourceRun