Title: PowerPointPrsentation
1Proseminar Web3D Sommersemester
2002 Introduction to Java3D 13.06.2002 Anni
e Michele Nguedia
2Overview(1)
- I - General 3D Modelling concepts
-
- II - Definition of a SceneGraph
- - SceneGraph superstructure
- - SceneGraph nodes
- - Node Component
- - Scenegraph references
- III - Important classes to develop a Java3D
- - Java3D API
- - SceneGraph Classes
3Overview(2)
- IV - Recipe for writing a Java 3D program
-
- V - Tranformations in Java3D
- - Rotation, translation, scaling
-
- VI - Key Java 3D features
- VII - Summary
- VIII - References
4Java 3D an approach
- Java 3D is a set of classes for writing
three-dimensional graphics applications and 3D
applets. - It is primarily for application
developer(programmer). - It enables authors to build shapes and control
animation and interaction. - It also enables detailed control over rendering,
input devices, the viewing model, and lots more. - API implementation was recently released by Sun
Microsystems.
5General 3D Modelling Concepts
- A Java 3D virtual universe is created from a
SceneGraph. - The most common relationship in a SceneGraph is a
parent child relation - (as in VRML)
6- General 3D Modelling concepts
-
- II - Definition of a SceneGraph
- - SceneGraph superstructure
- - SceneGraph nodes
- - Node Component
- - Scenegraph references
- III - Important classes to develop a Java3D
- - Java3D API
- - SceneGraph Classes
7Definition of a SceneGraph (1)
- SceneGraphs are treelike data structures that
are used to store, organize , and render scene
information (objects,materials,
appearances,lights....Etc). - The data structures of a scene graph consist of
Nodes. -
8Definition of a SceneGraph (2)
- The most important Nodes that are composed a
scene graph are a Virtual Universe,a Locale(or
more) ,Groups, Leaf,NodeComponents and others
objects .
9Scene Graph Symbols
10 Together a Locale and a Virtual Universe
compose a SceneGraph superstructure.
- A reference associates a Node
- Component object with a Scene
- Graph Node .
11Scenegraph nodes
- There are two types of nodes
-
- - Group the primary role of a Group is to
act as the parent of the other nodes, specially
other Group nodes and Leaf nodes. - - Leaf leaf nodes specify the shape, sound,
and behavior of a scene graph object.
12Group nodes subclasses
BranchGroup
OrderedGroup
SharedGroup
Group
Switch
TransformGroup
Primitive
13Leaf nodes Subclasses
Background
Behavior
Bounding Leaf
Clip
Fog
Leaf
Light
Link
Morph
Shape3D
Sound
Soundscape
Viewplatfom
14The Node Component
- The Java3D Node Component class is used to
specify a variety of node properties such as
geometry,appeareance ,texture, transparency,and
coloring. - The classes of Node Component are
Appeareance,AuralAttributes,Coloring Attributes
,DepthComponent Geometry,ImageComponent,....
15- General 3D Modelling concepts
-
- Definition of a SceneGraph
- - SceneGraph superstructure
- - SceneGraph nodes
- - Node Component
- - Scenegraph references
- III - Important classes to develop a Java3D
- - Java3D API
- - SceneGraph Classes
16 Java3D API
The API has core classes and utility classes
- Core Classes
- javax.media.j3d package
- lowest level classes required for Java3D
programming
- Utility Classes
- com.sun.j3d.utils package
- convenient and powerful additions to the core
17Important Classes
- Virtual Universe und Locale Class
- are derived respectively from Universe and
Locale Object in a scene Graph. - SceneGraph Object Class
- is the base class for nearly every object
that appears in a Java3D scene Graph.This
abstract class contains node and node component
objects. - Scene Graph Viewing Object Classes
- included five classes that are used in the
viewing parameters of scene graphs
(Canvas3D,Screen3D,View,PhysicalBody,PhysicalEnvir
onment). - Simple Universe utility class
- is used by the Java3D developers to
create a Java3D program without dealing with
Viewing object Classes. -
-
18Simple recipe for writing a Java3D program
- Using the SimpleUniverse class in Java 3D program
reduces the time and effort needed to create the
view branch Graph. - The basic outline of Java 3D program development
consists of seven steps - 1- Create a Canvas3D object
- 2- Create a VirtualUniverse object
- 3- Create a Locale object, attaching it to
the VirtualUniverse object . - 4- Construct a View object
- 5- Construct content branch graph
- 6- Compile branch graph
- 7- Insert subgraphs into the Locale.
- The steps 1,2,3,4,and 7 create a Simple Universe(
code for creating a SimpleUniverse
SimpleUniverse ( ) ) -
19HelloJava3D Class
- public class HelloJava3Da extends Applet
- public HelloJava3Da()
- setLayout(new BorderLayout())
- GraphicsConfiguration config
- SimpleUniverse .getPreferredConfiguraton(
) - Canvas3D canvas3D new Canvas3D (config)
- add("Center, canvas3D)
- BranchGroup scene createSceneGraph()
- scene.compile()
- // SimpleUniverse is a convenience Uility
class - SimpleUniverse SimpleU new
SimpleUniverse (canvas 3D) - // This move the ViewPlatform back a bit so
the - // objects in the scene can be viewed .
- SimpleU.getViewingPatform().setNominalViewin
gTransform() - simpleU.addBranchGraph (scene)
- // end of HelloJava 3Da (constuctor)
1- Create a canvas3D
4- Compile ContentBranchGraph
2- Create a Simpleuniverse
3- Customize Simpleuniverse
5- Insert ContentBranchGraph into the Locale
20Some terminologies in Java3D
- Become live
- a Branch Graph becomes live as soon as it is
attached to a scene graph. Each object of the
Branch Graph are subject to being rendered. - Compiling
- a BranchGroup converts an object and all its
ancestors to a more efficient one from the
rendered.
21- General 3D Modelling concepts
- Definition of a SceneGraph
- Important classes to develop a Java3D
- Recipe for writing a Java 3D program
-
- V - Transformations in java 3D
- - Translation
- - Rotation
- - Scaling
- VI - Key Java 3D features
- VII - Summary
- VIII - References
-
22Transfomations in Java3D
- The TransformGroup Class is the needed class to
represent a transformation of a Transfom3D
object. - The three basic operations for a transformation
are - - Translation moving object from one
location in space to another . - - Rotation An object can be rooted around
any combination of the X,Y,Z axes
simultaneously. - - Scalingscaling an object means changing
ist size .There are two different types of
scaling uniform and nonuniform.
23Key Java3D features
- Java 3D scene graphs are considerably more
difficult than a VRML scene graph,owing to the
inherent complexity of full-featured programming
languages such as Java. - Further than its complexity ,Java3D sceneGraph
offers excellent features such as - - Rendering control
- - Scalable Performance
- - Behaviors
- - Generic Input Devices
- - Geometry Compresion
- - Versatile View Model
- - Camera-based View Model
24Actual future works(1)
- Virtual Reality (VR)application could be
developped with Java3D - VR application insert other parameters such as
- - users physical characteristic (height,
eyeseparation,...) - - physical environment (number of displays,
their location , head-tracked-shutter-glass-based
desktop). -
25Actual future works(2)
Some devices for VR
Advance 3D Model
26Conclusion
- Java programmers can quickly and easily define
graphics programs using Java3Ds scene graph
classes. -
27References
- Getting starting with Java3D API (Dennis J
Bouvier) The Java3D Tutorial of Sun - Java website http//java.sun.com/products/javamedi
a/3D - http//www.sun.com/desktop/java3d
28- Thank you for your attention !