java 3d pablo figueroa university of alberta pfiguero/english/ april 2000

31
Java 3D Pablo Figueroa University of Alberta http://www.cs.ualberta.ca/~pfiguero/english/ April 2000

Post on 21-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Java 3D

Pablo FigueroaUniversity of Alberta

http://www.cs.ualberta.ca/~pfiguero/english/

April 2000

Contents Introduction What is java 3D API concepts Some demos API details Summary More resources

Introduction: What and Why? What?

Represent 3D geometry Interact with 3D information

Why? Application specific reasons:

Design Architectural walkthroughs Analysis of 3D data

Introduction: Examples Macy’s fashion show

http://www.excitextreme.com/fashion/

Interactive animations (cult3d) http://www.cult3d.com/gallery/references/index.html

Introduction: Examples (2)

Introduction: Examples (3)

Introduction: Solutions APIs

OpenGL, Open Inventor, Performer, Java 3D 3D modeling tools

3D Studio Max, Maya, … VR environments

WTK, DIVE, … App. specific tools

Cult3D, Character Studio, Rodin, …

What Is Java 3D? Java API for 3D geometry description Platform independent File-format independent A scene graph API Describe the intended use of the model:

Modifiable vs. static objects Selectable vs. background objects

Abstract device model

API Concepts Scene graph Shape (geometry, appearance,

texture) Transforms Lights Sound Behavior Rendering model

Concepts: Scene Graph Objects are described as a

hierarchy of nodes: Leafs: shapes, lights, sounds,

behaviors Intermediate: transformations, groups

Group Switch Ordered Shared

Concepts: Scene Graph (2)

Concepts: Shape Geometry

Some primitives Box, Cone, Cylinder, Sphere

Indexed face sets Coordinates, normals, colors per vertex,

texture coordinates per vertex Appearance

Color, material, texture Point, line, and polygon appearance

Concepts: Transforms All geometry coordinates are

defined relative to (0,0,0) Translation Rotation

In radians Scaling

Concepts: Lights Based on the Phong model At least one light in the environment Several types:

Ambient, directional, point, spot Attributes:

Color, influencing bounds Uses material attributes: diffuse,

ambient, specular, emissive colors

Concepts: Sound Spatially located sound information

Several sounds Soundscape (aural environment)

Types: Background, point, cone

Attributes: Volume, loop parameters, scheduling

region, active flag, distance gain (point and cone)

Concepts: Behavior Actions in the world:

Object animation Input processing Picking Collisions Level Of Detail (LOD) Interpolations

Concepts: Behavior (2) General attributes:

Scheduling region Wake up conditions

View position, transform state, collision, other behavior’s state, AWT events, time interval, sensors

Interpolator classes: Position, PositionPath, Rotation, Color,

Transparency, RotPosScalePath

Example: SimpleSounds An extension of HelloUniverse

A cube 3 sounds 2 behaviors: rotate the cube, play

sounds

SimpleSounds (2)

sound1:PointSound

TransformationGroup

ColorCube

RotationInterpolator

BackgroundSound

BranchGroup

sound2:PointSound

SimpleSoundsBehavior

SimpleSounds (3)

Demos From the distribution

ObjLoad Loads geometry in format .obj

AWTInteraction 2D interface widgets with 3D worlds

TickTockCollision Behaviors, collision detection

Demos (2) From the website

YouBuildIt Author environment

Astro3D (Astronomy Visualization Tool)

Navigation + Collaboration Particles

Particle-based system

API Details Rendering model

Immediate Retained Compiled-retained

Hi-resolution coordinates 256-bit fixed-point numbers

(hundred-billion light years – protons)

API Details (2) Scene graph in detail: objects

API Details (3) Scene graph in detail: View model

API Details (4) Devices

Standard API for keyboard and mouse New model for input devices

InputDevice Interface Sensors

Math library Tuples, angles, quaternions, matrices

API Details (5) Capability bits

User’s intention for each part of the scene. Used for compilation purposes

Read/write Transformations, geometry, path, …

Collision bounds Sound data

API Details (6) Cloning groups in the scene graph:

Summary 3D, scene-graph based API Compilation capability for

performance Integration of other input devices View modeling allows VR apps. Sun, Windows, Linux, and SGI

implementations

Summary (2)

http://java.sun.com/products/java-media/3D/collateral/j3dclass.html

More Resources Java 3D site

http://java.sun.com/products/java-media/3D/

Java 3D related stories http://java.sun.com/features/#3d

Java 3D tutorial http://java.sun.com/products/java-media/3D/collateral/

#tutorial Java One 99 presentation

http://java.sun.com/products/java-media/3D/collateral/j3d_javaone.pdf

Java Technology Roadshow http://java.sun.com/products/java-media/3D/collateral/

j3d_clas.pdf