XLand Modules

July 26, 2010

This is part 2 of the guest blog post on Xland, the 3D blog project from Nanjing University in China. In case you missed it, you can find Part 1 – Xland 3D Blog – here.

Xland Module Highlights

By Jiang Yufei, Nanjing University

Xland provides users with colorful modules, elements, and gadgets that provide infinite ways to assemble content for showcasing a blog host’s talents. Here are some of the ways users can customize their 3D blog.

Piano

The Piano module allows you to use the computer keyboard to play mellifluous music and share it with all the friends in your room.

Piano module
Piano module

We use JFugue to implement the mapping between key and note. Using the same mechanism, we plan to develop saxophone, trumpet, cello, and others until we can form an orchestra.

Tour Rocket

The Tour Rocket is huge! This splendid module will shock visitors when it is inserted into the world.

Tour Rocket
Tour Rocket

Utilizing a model of the Saturn V, this module gives anyone who stands on the platform at the bottom of the rocket a 100-second flying experience. During the elevation, you can see the world from above for a fabulous view.

Static Decorations

To help users build rooms with different styles, we supply different kinds of pre-made, customizable objects. For example, beds, tables and lamps. These all are static objects. For each type of object, bed, for example, we  supply several styles for users to choose from.

Bed module
Bed module

Different users may use different beds and different lamps. Only in this way may users feel they are unique. We put beds, tables, lamps and other furniture or artifacts like that into modules and we call them static decorations. Once a static decoration is inserted into host’s room, the host can choose different types of room decorations through a menu. The server remembers what the host’s favorite style is and renders the correct model in the scene.

News and Weather Forecast

The Weather Forecast and Rolling News are implemented as panes on the heads-up display (HUD). We display the information after parsing the weather and news XML source.

News Feed
News Feed

Particle effect

We add the particle effect to at least four modules including the real-time weather module, the tour rocket, the piano, and the portal.

Particle effect applied to different objects
Particle effect applied to different objects

Let’s take the real-time weather module as an example. This module synchronizes the in-world weather with the real-world weather. When snowflakes waft outside your real window, it also snows outside the window of your Xland room, as you can see demonstrated in the Xland video trailer. A previous WonderBlog article about a way to implement a snow effect inspired us; Douglas Finnigan, the author of that guest blog post, developed his snowflake particles using Groovy. Since we weren’t familiar with Groovy, we studied JME’s particle system and decided to use ordinary Java to create our particle effects. It turns out that JME provides a simple and powerful way to create particle effects. We simply needed to set some parameters and JME handled creating and managing the particles for us. All related classes are located in package com.jmex.effect.particles. The essential mechanism of JME’s particle system is its ParticleMesh which plays two roles in the class hierarchy. First, it is a child of Mesh class. This means it can be attached to any Node. At the same time, it is a particle system. You simply define attributes of particle emitter and add influences to particles, then update and render them in world. This mechanism gives you any particle effect you want.

New Camera Collision

In order to solve the problem of the camera colliding with geometry when an avatar turns a corner or gets too close to a model, we modified some of the camera collision code in the Wonderland core to correct these issues. (Note that some of these bugs have now been corrected in the official Wonderland release.) If you are interested in knowing how we solve this problem in our own way, please refer the link below which gives a brief technical description on this.

Photo Album

As we know, users can drag-and-drop jpg, png and gif images directly into a Wonderland window. This meets most requirements, but for a 3D blog, we wanted visitors to be able to preview a set of pictures rapidly using a series of thumbnails and then choose the ones they want to view. Furthermore, authority control was an essential concern—we couldn’t allow a visitor to drag-and-drop pictures into someone else’s space. Only the owner of a photo album can upload, delete and modify the album. Based on that, we created an alternate mechanism for uploading photos that addresses these issues.

Photo Album
Photo Album

A key part of the Photo Album module is its uploader. We use some tricks to reuse Wonderland’s intrinsic communication mechanism between client and server. Because of the limited length of one message, we divide the photos into many pieces and deliver them with ID respectively. Then, on the server side, we reconstitute the image according to the IDs. Due to the reusability of this technology, we can apply this mechanism to modules that allow people to easily and dynamically replace textures with local pictures. For instance, we apply this technique to changing wall paper in a host’s room. According to the testing we have done, this mechanism works quite efficiently and did not require any core code changes.

Blog Editor and Viewer

The Blog Editor and Viewer uses a mechanism somewhat like the Photo Album, but since text delivery is much less costly than images, it is even easier. This service is provided via two separate modules corresponding to the editing part and reading part respectively. It is simple for a guest to figure out how to use the reading panel. They simply have to click on a title of interest from the list. The editing parts is only accessible in a host’s room. To use it, the host left clicks on “the big book” model which represents the user interface of this function. An edit panel, implemented as a HUD pane, pops up for the host to write down what’s on his or her mind.

Blog module
Blog module

Music Player

“Music is what feelings sound like.” Hosts can play a piece of music in their cute room to create atmosphere. Every entry in the playlist stored in the database contains a unique internet address of a piece of music. We implemented the buffering and sharing, at the same time, let Jlayer handle how to play them.

Music Player
Music Player

Authority Control

Authority Control is the basis for the whole of Xland, guaranteeing the normal performance of the system and keeping order in the whole virtual world—no authority control, no Xland. For any blog, the editor, reader, photo album and music sharing constitutes the skeleton and the core set of the services, all of which deeply rely on the authority control. Our basic idea is to use cell IDs as the primary basis to judge if someone has the appropriate authority to access the content.

Motion Movie Recorder

The Motion Movie Recorder is a set containing two modules—flying movie recorder and circle movie recorder, both of which are modified versions of the existing Movie Recorder module. When we created our demo, we found that having a static movie recorder in Wonderland is fine, but not sufficient. We also wanted some movement. We made two new versions of movie recorder, one that moves straight ahead and one that moves in a circle, rotating at the same time to keep the lens facing the centre of the circle.

Motion Movie Recorder diagram
Motion Movie Recorder diagram

To use it, users click on the Motion Movie Recorder and it moves following the specific pattern. We hope these movie recorders will help you make your own awesome demo videos of your Wonderland worlds, or that you will simply using them to make a 3D film.

Circle Movie Recorder
Circle Movie Recorder

Database and Modification in Wonderland Core Code

We have uploaded almost all our modules to Open Wonderland Module Warehouse. But besides that, we also open all the details of the schema of our database and offer all modified core Wonderland code and the methodical guide to instruct you on configuring your own environment. Here are the links.

Final Thoughts

We designed this set of modules with the goal of making Xland a complete solution for building a 3D blog system in Wonderland. Here I want to thank everyone who has supported us: our mentor Professor Zheng Tao, without whose instruction we couldn’t finish such a project; Nicole Yankelovich, the Executive Director of the Open Wonderland Foundation, without her encouragement this article couldn’t exist and XLand couldn’t be known by so many people; and the Wonderland team, because of  their remarkable work, Wonderland is such a extensible project with brilliant software engineering where we can release all our imagination in this virtual land.

If you are interested in more information about Xland, please contact:

jjsahalf@gmail.com
jiangyufei07@software.nju.edu.cn

Jiang Yufei


Follow

Get every new post delivered to your Inbox.

Join 56 other followers

%d bloggers like this: