2. What is Project Wonderland?
100% Java, free, open-source toolkit for
creating 3D immersive virtual worlds
Copyright 2009, Sun Microsystems, Inc. 2
3. Video Demo
Copyright 2009, Sun Microsystems, Inc. 3
4. Motivation
• Improve business collaboration
and distance education
• Immersion enhances
business and edu collaboration
> Multiple simultaneous
conversations crucial
for informal interaction
> High emotional / social bandwidth
> Increases sense of presence
> 3D space provides context for learning and collaboration
> 3D space helps define culture
> Collaboration is the norm
Copyright 2009, Sun Microsystems, Inc. 4
5. Use the Toolkit to Build Worlds for...
Training, Simulation
Collaboration with Live Docs
Teaching, Learning
3D Data Visualization and Analysis Integrating with Real World
Copyright 2009, Sun Microsystems, Inc. 5
6. Virtual Northstar – St. Paul College
Copyright 2009, Sun Microsystems, Inc. 6
7. Engineering Team Room
Worcester Polytechnic Institute (WPI)
HTML Viewer
WonderBlocks Copyright 2009, Sun Microsystems, Inc. 7
8. Use the Toolkit to Build Worlds for...
Training, Simulation
Collaboration with Live Docs
Teaching, Learning
3D Data Visualization and Analysis Integrating with Real World
Copyright 2009, Sun Microsystems, Inc. 8
12. Use the Toolkit to Build Worlds for...
Training, Simulation
Collaboration with Live Docs
Teaching, Learning
3D Data Visualization and Analysis Integrating with Real World
Copyright 2009, Sun Microsystems, Inc. 12
14. Use the Toolkit to Build Worlds for...
Training, Simulation
Collaboration with Live Docs
Teaching, Learning
3D Data Visualization and Analysis Integrating with Real World
Copyright 2009, Sun Microsystems, Inc. 14
17. Use the Toolkit to Build Worlds for...
Training, Simulation
Collaboration with Live Docs
Teaching, Learning
3D Data Visualization and Analysis Integrating with Real World
Copyright 2009, Sun Microsystems, Inc. 17
18. th
6 Space - Malden Labs
Copyright 2009, Sun Microsystems, Inc. 18
19. th
6 Space – Malden Labs
Monitoring Data Center with Sun SPOTs
Sun Small Programmable Object Technology (Sun SPOT)
Copyright 2009, Sun Microsystems, Inc. 19
20. Sapienza University / Sun
Controlling Wonderland Worlds with Sun SPOTS
Copyright 2009, Sun Microsystems, Inc. 20
22. Vision
• 3D Web
> Federated, specialized
virtual worlds
> Common way to express
behavior across platforms
(Java mobile code)
Copyright 2009, Sun Microsystems, Inc. 22
23. Differentiators
• Architectural • End User
> Highly extensible via modules > Shared applications
> Internal or external deployment > Integration with
> Federated & secure business/web data
> Open - 100% Java, open > Audio as core feature
source, open art path > Telephony integration
Copyright 2009, Sun Microsystems, Inc. 23
24. Wonderland Status
Demo @ v0.3 v0.4
v0.5
Start
Start v0.3 v0.4 v0.5
JavaOne dev1
2007 2008 2009 2010
• Started with a challenge from VP of eco responsibility
• Demo of virtual Sun office (MPK20) at JavaOne '07
• Added features to “demo” code base through version 0.4
• Currently working on completely re-architected version 0.5
> Monthly developer releases
> End user release expected in fall '09
Copyright 2009, Sun Microsystems, Inc. 24
25. What's in Wonderland v0.5?
• Core features from v0.4
> Application Sharing
• Unmodified X11 application and
collaboration-aware Java applications
> Immersive Audio
• Includes mix of recorded and live audio, range
of audio fidelities, individual volume control,
audio recording, and audio applications such
as the virtual microphone and cone-of-silence
> Telephone Integration
• Includes dial-in, dial out, and connecting
avatars with telephone audio
• Lots of new features...
Copyright 2009, Sun Microsystems, Inc. 25
26. Updated Graphics and Avatars
• MTGame Graphics System
> Based on jME
(jMonkeyEngine)
> Adds threading and
process model
• Avatar System
> Bone models
> Skinning
> Customizable animations
(requires Maya)
> Limited posing
Copyright 2009, Sun Microsystems, Inc. 26
27. Modules Module
• Mechanism for packaging & sharing Code
Artwork
Wonderland extensions Scripts
Assembled worlds
> Can contain code, artwork, audio, Other resources
scripts, web management and web services
> Also world configurations for sharing whole worlds
> Deliver art assets via embedded HTTP server
> Packaged as archive (jar) files
• Modules can depend on
other modules
• Web-based UI for installation
and administration
Copyright 2009, Sun Microsystems, Inc. 27
28. World Assembly
• Open art path
> Import Collada 3D models
> Uses industry-standard tools
• Photoshop, GIMP
• SketchUp, Maya, Blender
> Direct import of .kmz models
created with Google SketchUp
• Dynamically add content
(eg, microphone, Firefox browser)
to world using a palette
• Move, resize, and scale cells
using in-world tools
Copyright 2009, Sun Microsystems, Inc. 28
29. Other New Features
• Embedded Swing
> For in-world applications
> HUD development
• Drag-and-Drop
> Mime-type scheme
> Application launches on drop
• Web-based management
> Manage modules
> Create snapshots
> Monitor server
> Access content repository
Copyright 2009, Sun Microsystems, Inc. 29
30. New Features, cont.
• Scripting
> Language-independent
support based on Java
scripting standard (JSR 223)
> Language-dependent support for more complete integration
• Security
> Control access to individual objects and spaces
> Integrate with standard identity management solutions
• Content repository and simple document management
> WebDAV integration
> Stores scripts, 3D models, shared application data
Copyright 2009, Sun Microsystems, Inc. 30
31. Demo
See video demo here:
http://www.youtube.com/watch?v=-ITA8Pags4g&fmt=18
Copyright 2009, Sun Microsystems, Inc. 31
32. Version 0.5 Architecture Overview
• Client
> Designed as browser for
Wonderland worlds
> Each world has different
content and behavior
> Client downloads content and code
when connecting to a server
• Server
> Set of independent applications managed by a web server
• Federation
> “Web-server model”
Copyright 2009, Sun Microsystems, Inc. 32
33. Wonderland 0.5 Software Stack
Client ● Virtual world browser ● Multithreaded 3D graphics
● 100% Java ● Advanced avatar system
● Open art path ● Immersive audio
● Shared applications ● Scripting support
Server ● Web Server manages services: Darkstar Server
● External processes (shown right)
● World assets Voice Bridge
● Module-based extensibility
● Security Shared App Server
● Web Management UI
● Shared resources for federation Chat Server
External ● Identity services ● Real-time telemetry
Services ● Asset repositories ● Hosting / world management
Copyright 2009, Sun Microsystems, Inc. 33
34. Networking Scheme
Wonderland Wonderland
Client Client
Wonderland
Client
Wonderland
Client Internet
RESTful Web Service API
Embedded Web/Application server
Darkstar Voice
Web-based Management Server Bridge
Node(s)
Module/ X11 Shared
World WebDAV/ Server App Server
Code Backup Content Start/Stop
Store
Application Nodes
Copyright 2009, Sun Microsystems, Inc. 34
35. Federation
Wonderland
Wonderland
Client
Client
Standalone Server
Internet Wonderland
Client World 5
Wonderland
Client Voice Presence
Module/
Code
Identity Apps
Store
Server Cluster
Standalone Server
Server Server Server
World 1 World 2 World 3 World 4
Voice Presence
Module/
Code
Identity Apps Module/ Voice Presence Apps
Store Shared Code
Services Store Identity
Copyright 2009, Sun Microsystems, Inc. 35
36. Wonderland Server
• Multiple services Wonderland Server
> Single-sign on across services Web Server
• Web server for management Data /
Darkstar Voice
> Based on embedded Glassfish Module
Store
Apps ...
• Darkstar server for “live” state
Identity
• jVoiceBridge for audio mixing
• Other services can be added
> Shared app server
> XMPP chat server
Copyright 2009, Sun Microsystems, Inc. 36
37. Project Darkstar Game Server
• Open source, enterprise-grade server infrastructure
> For games and virtual worlds
• Simple and familiar Java programming model
> Looks like single thread, single machine
• Designed for scalability (no “sharding”)
> Task scheduling part of the infrastructure
> Concurrency control through the data store, transactions
> Computation can occur on any machine
> Machines can be added (or subtracted) at any time
• Extensible set of services
Copyright 2009, Sun Microsystems, Inc. 37
39. Project Darkstar Programming Model
• Tasks
> independent, short lived
> transactional – either everything is done or nothing is
• Data
> data service detects conflicts, changes
> if two tasks conflict: one will commit/complete, and one will
abort and be rescheduled
• Communications
> client sessions (client to server)
> channels (publish/subscribe client/server-to-client)
> actual communication only happens on commit
Copyright 2009, Sun Microsystems, Inc. 39
40. jVoiceBridge
Enables Audio as a Core Feature
• Features
> Standards-based (IP, NIST SIP, & RTP)
> Hybrid VoIP / PBX system
> Fidelity ranges from telephone to
CD quality
• Enables
> Immersive audio
> Telephone integration
> Individual volume control
> Ability to mix recorded and live audio
> Audio applications
> Audio capabilities applied to objects
Copyright 2009, Sun Microsystems, Inc. 40
41. Wonderland Client
Wonderland Client
• Virtual world “browser” MT Game JMonkeyEngine
• State-of-the-art 3D rendering Scripting Collision Physics
> MT Game / jMonkeyEngine Avatars Cell HUD
DnD Security Input/Events
• Provides core client APIs Communications
> Cells, world management
> Visual: rendering, HUD, avatars
> Utility: events, security, physics, collision, ...
• Extensible with new cell types, plugins
Copyright 2009, Sun Microsystems, Inc. 41
42. MTGame
Graphics Rendering Framework for Wonderland
• High-performance 3D rendering engine
> Designed to scale on multi-core/multi-threaded clients
> Presents single-threaded programming model to
developers
> Support for advanced shaders and
rendering techniques
> Based on open source jMonkeyEngine
> Model import via Collada
• Highly Extensible
• Per-object behaviors
• Pluggable collision and physics systems
Copyright 2009, Sun Microsystems, Inc. 42
44. Extending Wonderland
• Custom cells
> “Objects” in the world
• Cell components
> Capabilities to add to any cell
• Custom connections
> Send / receive non-spatial data
Copyright 2009, Sun Microsystems, Inc. 44
45. Cells
• World is divided into discrete volumes called “cells”
• Cells are nested into a tree structure
• Cell tree divides 3D scene into network-sized chunks
RoomCell AppCell
WorldRoot
Cell
AvatarCells
TeapotCell
Copyright 2009, Sun Microsystems, Inc. 45
46. Cell Trees are copied on each client
On connecting to the server, clients create a local hierarchy of cell
objects that mirror the server objects
TeapotCell
Sally
TeapotCellMO
TeapotCell
Jessy
TeapotCell
Server Raphael
Copyright 2009, Sun Microsystems, Inc. 46
47. Creating Custom Cells
• Client behavior in Cell
> Bounds, rendering
• Server behavior in CellMO
> Synchronization, persistence
• Communicate via Messages
Server Client jME
Teapot Messages Teapot Teapot
Server CellMO Client Cell Cell Renderer
Copyright 2009, Sun Microsystems, Inc. 47
48. TeapotCellMO – state management
public class TeapotCellMO extends CellMO {
// state storage
private Color color;
// required constructor
public TeapotCellMO(CellID cellID, CellCache cache) {
super (cellID, cache);
}
// corresponding client state
public String getClientCellClassName(WonderlandClientID id,
ClientCapabilities capabilities)
{
return "org.wonderland.modules.shape.client.ShapeCell";
}
// synchronize when the client connects
public TeapotClientState getClientState();
// long-term storage as XML
public TeapotServerState getServerState();
public void setServerState(CellServerState state);
}
Copyright 2009, Sun Microsystems, Inc. 48
49. About state management
• “Live” state on the server
> Serializable objects stored in Darkstar datastore
• Synchronized with a client
> Send the client a CellClientState object on client connect
> Afterwards, send messages to maintain state
• Long-term storage as XML files
> CellServerState object can be represented as XML
CellClientState
CellServerState CellMO Cell
Message
XML File Serialized object Java object
Serialized object
Copyright 2009, Sun Microsystems, Inc. 49
50. TeapotCellMO – communications
public class TeapotCellMO extends CellMO {
@UsesCellComponentMO(ChannelComponentMO.class)
private ManagedReference<ChannelComponentMO> channel;
// sign up for messages
public void setLive(boolean live) {
channel.get().addMessageReceiver(TeapotMessage.class,
receiver);
}
// message handler object
private static class SharedMessageReceiver
implements ComponentMessageReceiver, Serializable
{
public void messageReceived(WonderlandClientSender s,
WonderlandClientID id, CellMessage message) {
TeapotMessage message = (TeapotMessage) message;
cellRef.get().setColor(message.getColor());
}
}
}
Copyright 2009, Sun Microsystems, Inc. 50
51. Teapot communications
public class TeapotCellClientState extends CellClientState {
private Color color;
// no-arg constructor
public TeapotCellClientState() {}
// getters and setters
public Color getColor();
public void setColor(Color color);
}
public class TeapotCellMessage extends CellMessage {
private Color color;
// no-arg constructor
public TeapotCellMessage() {}
// getters and setters
public Color getColor();
public void setColor(Color color);
}
Copyright 2009, Sun Microsystems, Inc. 51
52. TeapotCell
public class TeapotCell extends Cell {
Private Color color;
private ShapeCellRenderer renderer = null;
// required constructor
public TeapotCell(CellID cellID, CellCache cellCache) {
super(cellID, cellCache);
}
// set our state from the client state
public void setClientState(CellClientState state) {
super.setClientState(state);
this.color = ((TeapotCellClientState)state).getColor();
}
// create a renderer
protected CellRenderer createCellRenderer(RendererType type) {
if (rendererType == RendererType.RENDERER_JME) {
return new TeapotCellRenderer(this);
}
return super.createCellRenderer(type);
}
}
Copyright 2009, Sun Microsystems, Inc. 52
53. TeapotRenderer
public class TeapotRenderer extends BasicRenderer {
public TeapotRenderer(Cell cell) {
super(cell);
}
protected Node createSceneGraph(Entity entity) {
String name = cell.getCellID().toString();
TriMesh mesh = new Teapot(name);
// set the color
Color color = ((TeapotCell) cell).getColor();
mesh.setDefaultColor(new ColorRGBA(color.getRed(), ...));
// create a node in the scene graph
Node node = new Node();
node.attachChild(mesh);
node.setModelBound(new BoundingBox());
node.updateModelBound();
node.setName("Cell_" + name);
return node;
}
}
Copyright 2009, Sun Microsystems, Inc. 53
54. Other Stuff
• CellFactory
> Create the cell from the cell palette
• CellProperties
> Adjust the cell from the UI
• Events / input
> Handle mouse clicks or other events
• Server state
> Serialize to XML
Copyright 2009, Sun Microsystems, Inc. 54
55. Cell Component
• Add a capability to any cell
• Can be dynamically added or removed
• Client and server code (just like a cell)
• Access to other components in the same cell
• For example: Cell
> Channel AudioComponent ChannelComponent SecurityComponent
> Audio
> Metadata AudioComponentMO ChannelComponentMO SecurityComponentMO
> Security CellMO
Copyright 2009, Sun Microsystems, Inc. 55
56. Creating a Cell Component
• Just like creating a cell
> CellComponent, CellComponentMO
> CellComponentClientState, CellComponentServerState
> Messages
> CellComponentFactory, CellComponentProperties
• Add a component to a cell
> Identified by Java type
> Dynamically using the UI
> Programatically
Copyright 2009, Sun Microsystems, Inc. 56
57. Injecting cell components
• Cells and components can refer to other
components
• Automatic creation and injection makes it easier
• Cell (or CellComponent)
public class TeapotCell extends Cell {
@UsesCellComponent
private ChannelComponent channel;
• CellMO (or CellComponentMO)
public class TeapotCellMO extends CellMO {
@UsesCellComponentMO(ChannelComponentMO.class)
private ManagedReference<ChannelComponentMO> channel;
Copyright 2009, Sun Microsystems, Inc. 57
58. Custom Connection
• For communicating non-spatial information
• Add functionality to existing client or create a
standalone client
• For example Client
TextChatConnection
> Text chat
> Presence
> Server performance TextChatConnectionHandler
> NPC controller Server
> Sensor integration
Copyright 2009, Sun Microsystems, Inc. 58
59. Creating a Custom Connection
• On the client
> CustomConnection extends BaseConnection
> BaseConnection provides messaging
> Provides API that uses messages
• On the server
> CustomConnectionHandler implements
ClientConnectionHandler
> Notification when message is received
> Send messages back to clients
> Access to all Darkstar data and services
Copyright 2009, Sun Microsystems, Inc. 59
60. Modules
• Mechanism for sharing Wonderland extensions
> Can contain code, artwork, audio, scripts, web
management and web services
> Also world configurations for sharing whole worlds
> Deliver art assets via embedded HTTP server
> Packaged as archive (jar) files
• Modules can depend on
other modules
• Web-based UI for installation
and administration
Copyright 2009, Sun Microsystems, Inc. 60
61. Wonderland Ecosystem
Engine Extensions Services Art Tools
(AI, physics, ...) (Software distribution, (Maya, Blender,
hosting, world creation) Sketchup, Softimage)
Avatar Tools Client
rd
(3 party avatar designers,
custom graphics,
3D Engine Art Import Art Warehouse
Avatars Scripting (Google 3D warehouse,
accessories, animations)
other art repositories)
Asset Repositories Darkstar Server
Asset Management External Data
(WebDAV, module storage, Modules Security Voice Bridge (Sensors, telemetry,
artwork, video) web services)
Monitoring & Management Shared App Server
Storage
Web Server Chat Server
Software Development Authentication / Authorization
(Netbeans plugin, ...)
(OpenSSO, Java.net, custom integrations)
Learning Management Economy Systems Management
Systems (Micropayment providers, (Deployment management,
(Class content integration, inventory management) Performance monitoring)
login integration)
Copyright 2009, Sun Microsystems, Inc. 61
62. Getting Started with Wonderland
• Today
> Download code from subversion:
# svn co https://wonderland.dev.java.net/svn/wonderland/trunk
> Build and run with ant
> See tutorial
• Soon
> Download binary from http://projectwonderland.com
> Binary is for the server, clients use Java Web Start
• Frequent developer releases
Copyright 2009, Sun Microsystems, Inc. 62
65. Technical Requirements
• Scales up and down
> Run entire system on a laptop
• Linux, Windows, Mac, Solaris
• Java 6
• Client: 3D accelerated graphics
> OpenGL 2.0
> ATI or nVIDIA
• Server: Unix for application sharing
> Linux or Solaris, works without apps on other platforms
Copyright 2009, Sun Microsystems, Inc. 65
66. Project • Join the Ecosystem
Wonderland: > Offer a Wonderland service
Call to > Create & distribute modules
• Become a developer
Action > Plenty of project ideas
> Active open source community
• Create artwork
> SketchUp makes 3D content
creation accessible to
everyone
• Create your own world!
Copyright 2009, Sun Microsystems, Inc. 66
67. Project Wonderland Resources
• Open Source Project Site
> http://ProjectWonderland.com
> Download: binary, source code, examples
> Learning: architecture, roadmap, FAQ
> Community: latest news/blogs, forums, mailing lists
> Tutorials, technical articles, troubleshooting
> Suggestions for student projects
• WonderBlog - Official Wonderland Blog
> http://blogs.sun.com/wonderland
• Sun Immersion Special Interest Group
> http://sun-isig.ning.com
> Social network for Wonderland interest
Copyright 2009, Sun Microsystems, Inc. 67