Basic 3D Graphics Chapter 5. Bird’s Eye View  Basic 3D Graphics –Basic concepts of 3D graphics, rendering pipeline, Java 3D programming, scene graph,

Slides:



Advertisements
Similar presentations
Chapter 6 Objects and Classes F OO Programming Concepts F Creating Objects and Object Reference Variables –Differences between primitive data type and.
Advertisements

Graphics Pipeline.
Java3D Presented By Chris Gundlach
Chapter 4 Enterprise Modeling.
Chapter 4.
Systems Analysis and Design 9th Edition
Advanced Graphics, Overview Advanced Computer Graphics Overview.
Lecture21 Other Java Gamming technologies – Java3D (This lecture will not be assessed)
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 11 Animation F To understand the.
A Framework for Dynamic Volume Rendering Ptolemy II EECS 290N – Final Project T. Crawford 12/04.
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.
Evan Korth New York University Computer Science I Classes and Objects Professor: Evan Korth New York University.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 8 Views.
Further Programming for 3D applications CE Introduction to Further Programming for 3D application Bob Hobbs Faculty of Computing, Engineering and.
Java 3D Pablo Figueroa University of Alberta April 2000.
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
Graphical Objects and Scene Graphs CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
Ch 1 Intro to Graphics page 1CS 367 First Day Agenda Best course you have ever had (survey) Info Cards Name, , Nickname C / C++ experience, EOS experience.
Chapter 4.
Shading Languages By Markus Kummerer. Markus Kummerer 2 / 19 State of the Art Shading.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Java ME & Blackberry APIs for Game Dev Week III. Overview Java 2D API Java 3D API SVG Blackberry APIs
COMP 175: Computer Graphics March 10, 2015
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
Java3D Overview Scene graph Java 3D classes Describing objects Groups, transforms Behaviors, interpolators Lighting.
1 Animation & Java3D ©Anthony Steed Overview n Introduction to Animation Kinematics Dynamics Boids n Java3D Scene graph Animation Vehicles.
3D Objects Subject:T0934 / Multimedia Programming Foundation Session:12 Tahun:2009 Versi:1/0.
Week 2 - Wednesday CS361.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 12 Additional 3D Topics.
A Simple Talk on Java 3D Presented by C.H. Chen on Jul. 6, 2004.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
Open Inventor A short introduction. Capabilities of Open Inventor Easy construction of 3D scenes User interaction Animation.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
A model is… a representation of a planned or existing object.
CS324e - Elements of Graphics and Visualization Java 3D Intro.
Interface Opportunities for 3D Data and Media User Interface Software TechNote Panel Virginia Tech CS Fall 2002 Nicholas F. Polys Umur Yilmaz Will Lee.
© TMC Computer School HC20203 VRML HIGHER DIPLOMA IN COMPUTING Chapter 2 – Basic VRML.
INTRODUCTION GORT is a virtual 3D modeling environment for computer programmers. Its main area of focus is to aid in the education of programmers learning.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Java 3D Web Apps and Services. Presentation Overview l Java3D Overview l Software l Java3D API l Scene Graph Programming Model l Java3D Terminology l.
Subject Name: Computer Graphics Subject Code: Textbook: “Computer Graphics”, C Version By Hearn and Baker Credits: 6 1.
Swing - 2 Session 13. Swing - 2 / 2 of 38 Objectives (1) Discuss trees and tables Discuss progress bars Discuss MVC architecture Describe menus.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 11 Animation.
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 9.
1 Angel: Interactive Computer Graphics5E © Addison- Wesley 2009 Image Formation Fundamental imaging notions Fundamental imaging notions Physical basis.
Systems Analysis and Design 8th Edition
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 5 Basic 3D Graphics.
1 Chapter 6 Programming with Objects and Classes F OO Programming Concepts F Creating Objects and Object Reference Variables –Differences between primitive.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
HFE 760 Virtual Environments Winter 2000 Jennie J. Gallimore
Chapter 1 Graphics Systems and Models Models and Architectures.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
MPEG-4 Binary Information for Scenes (BIFS)
Object-Oriented Analysis and Design
About the Presentations
Introduction to Graphics Modeling
The Graphics Rendering Pipeline
Models and Architectures
Models and Architectures
3D-Online Product Configuration by Java3D
Models and Architectures
Introduction to Computer Graphics with WebGL
Hierarchical and Object-Oriented Graphics
Hierarchical and Object-Oriented Graphics
Models and Architectures
Models and Architectures
Presentation transcript:

Basic 3D Graphics Chapter 5

Bird’s Eye View  Basic 3D Graphics –Basic concepts of 3D graphics, rendering pipeline, Java 3D programming, scene graph, background, bounds, and making changes in a live scene graph  Graphics Contents  Geometric Transformation  Views 2

Objectives  To describe the 3D rendering process  To present an overview of Java 3D programs  To define Java 3D scene graph  To classify components of a scene graph  To apply background nodes  To understand and apply bounds objects  To make changes in live scene graphs 3

Key Classes and Methods (1/2)  com.sun.j3d.util.applet.Mainframe – A utility class to display an applet in a frame.  javax.media.j3d.VirtualUniverse – A class encapsulating a coordinate space of the entire virtual universe.  javax.media.j3d.Locale – A class defining a coordinate space with float data type anchored in the virtual universe.  javax.media.j3d.HiResCoord – A fixed-point data type to represent high- resolution coordinates of the virtual universe.  com.sun.j3d.util.universe.SimipleUniverse – A convenience class with a default implementation of the virtual universe, a locale, and a view branch of the scene graph.  javax.media.j3d.SceneGraphObject – An abstract class served as the root class for all scene-graph elements.  javax.media.j3d.Node – A class for nodes in a scene graph.  javax.media.j3d.NodeComponent – A class for node components in a scene graph.  javax.media.j3d.Group – A class for group nodes in a scene graph.  javax.media.j3d.Leaf – A class for leaf nodes in a scene graph. 4

Key Classes and Methods (2/2)  javax.media.j3d.SceneGraphObject.setCapability(int) – A method to allow certain manipulations of the object in a live scene graph.  javax.media.j3d.Group.addChild(Node) – A method to add child nodes in a scene graph.  javax.media.j3d.branchGroup – A special type of group nodes that can be attached to locale.  javax.media.j3d.branchGroup.compile() – A method to compile the scene graph to improve the performance.  javax.media.j3d.background – A leaf node defining the background color, image, and geometry of a scene.  javax.media.j3d.Bounds – A node-component class encapsulating a spatial volume that is used by environmental nodes to limit their scope of activation.  javax.media.j3d.boundingLeaf – A leaf class encapsulating a spatial volume that is used by environmental nodes to limit their scope of activation.  javaxmedia.j3d.BoundingBox – A class encapsulating box-shaped bounds.  javax.media.j3d.BoundingSphere – A class encapsulating spherical bounds.  javax.media.j3d.BoundingPolytope – A class encapsulating polytope bounds. 5

Key Terms  Geometry – A structural definition of a visual object.  Appearance – A collection of rendering attributes of a visual object.  DAG (directed acyclic graph) – A directed graph with no directed cycles.  Scene graph – A DAG specifying the graph scene to be rendered.  Tree – A graph formed by recursively adding distinct child nodes.  Leaf node – A node in a tree that has children.  Internal node – A node in a tree that has children.  Primitive – A basic visual object that may be used to build a model.  Capability bit – A flag in SceneGraphObject that gives permission to performing a specific operation in a live scene graph. 6

3D Model and View 7

Rendering Considerations  Geometry of the graphics objects  Location and position of the objects  Geometric transformations applied to objects and views  Material properties and texture of the objects  Lights and their characteristics  Type of projections in a view  View position, field of view, and other properties  Illumination and shading models  Dynamic behaviors of various components  Reactions to the user inputs 8

Java 3D Overview  Automatic rendering  Modeling with a scene graph  Object oriented 9 Source A Java 3D Hello program

Scene Graph: DAG 10 A digraph A DAG A tree

Scene Graph: Legend 11

Scene Graph 12

Scene Graph: Classes 13

Superstructure 14 F VirtualUniverse – the universe F HiResCoord – 256bit fixed point numbers F Locale – a “smaller” space

Group Nodes  BranchGroup  OrderedGroup  Primitive  SharedGroup  Swith  TransformGroup 15

Leaf Nodes 16

Node Components 17

Scene Graph 18 The Java 3D “Hello” program

Use SimpleUniverse  Create a Canvas3D object  Create a SimpleUniverse object  Add content branch 19

Do It Yourself  Create superstructure –VirtualUniverse –Locale  Create the view branch –BranchGroup –TransformGroup –ViewPlatform –View –PhysicalBody –PhysicalEnvironment 20 Source

Background  Default background: black  Change background with the Background node 21 Source Background() Background(Color3f color) Background(float r, float g, float b) Background(ImageComponent2D image) Background(BranchGroup geometry)

Bounds  Environmental nodes need to be limited by bounds  Two ways: –Bounds, node component –BoundingLeaf, node 22 Source

Live Scene Graph  A branch is live when attached to Locale  Compile may improve performance  Set capability bits explicitly to change attributes in a live scene graph 23 Source public final void setCapability(int bit)

Summary  We discuss the fundamental concepts of 3D computer graphics and the basic architecture of the Java 3D system.  In a 3D graphics system, a virtual world is built to model a 3D graphics scene. The model is viewed from a particular perspective to produce a rendering of the scene.  The Java 3D API is built on the key concept of scene graphs. A scene graph incorporates all the graphics descriptions and attributes of a scene to be rendered into a single data structure.  The rules for constructing the scene graphs and their building blocks are introduced. A scene graph is a DAG, with nodes being objects from classes of superstructures, nodes, and node components.  The overall structure of a Java 3D program is presented. By using a scene graph and its related objects, we can build a 3D graphics model and let Java 3D render the scene automatically.  The background of a scene can be change using the Background leaf node. Environmental nodes such as Light and Background need to set bounds to limit their influence in rendering. Bounds and BoundingLeaf objects are two ways of setting bounds.  A branch graph can be compiled to improve rendering efficiency. A component of a live scene graph can be modified only if appropriate capability bits are set. 24