3Di OpenViewer

OSGrid in Rei

Posted by Zaki on December 21, 2009
OpenSim / 3 Comments

Textures

Before Rei was released at the end of September, it was called 3Di OpenViewer. As it stands, that viewer didn’t need to download textures through the region server, rather, it would download assets (textures, meshes, avatars) directly from an asset server. For this reason, when someone logged in to an upstream OpenSim grid with 3Di OpenViewer, textures and avatars would not appear.

But that changed when we released Rei as an open-source viewer at the end of September. At that time, textures were already being fetched from OpenSim. You can go ahead and grab the installer from github and it will display textures. What it won’t do with textures is correctly apply UV coordinates in some (fortunately very rare) twisted-hollow-prim cases (but it was more about PrimMesher than Rei). Since September, we have done many improvements to PrimMesher – and Rei too, so now even those rare cases appear correctly (big thanks to the bug reporters). Texture downloads are slow unfortunately, but more on that later.

Avatars

Now this is a very delicate issue. The heart of the issue is that currently there is no non-LL viewer that supports SecondLife(tm) avatars. Let me say that again: there are no viewers that support SL(tm) avatars. Naali has a built-in mesh (the same as the old viewer), IdealistViewer has a built-in mesh, LookingGlass doesn’t yet have avatars (correct me if it does), Xenki doesn’t have an avatar yet as far as I know either.

The closest a viewer gets to SL avatar support is the PandaViewer by dahlia (http://vimeo.com/6812213) , which supports avatar shapes and actually looks really nice. Unfortunately it’s not open source (yet?), nor is it available in any form.

The thing with avatar support is that it’s pretty difficult to do right. No, not only technically, but there’s the issue of using or not using Linden Labs(tm)’s original mesh. You can find downloadable meshes, but there is a nice warning hidden neatly inside an obj file:

# This model is released for use by residents of Second Life.
# It may be imported into external 3D modeling, texturing, and animation applications to aid in the creation of character animations and textures for Second Life, as well as for any non-commercial purpose.
# Use or modification of this model for any other commercial purpose is prohibited without the express written consent of Linden Lab.

With all this said, we are looking at SL(tm) avatar support. It definitely won’t happen before the end of this year, the target is early next year.

OpenSim support

Of course Rei still has issues with upstream OpenSim support. This is partially due to the very very bad way textures are downloaded (through a single server, in UDP). The truth is, even SL(tm) viewer chokes on those: in heavy regions it would download the low resolution image, but the full image is never actually downloaded. My personal opinion is that the sooner we can break free from that way of transferring assets to clients, the better (guess how 3Di OpenViewer delivers content). Hopefully OpenSim will not remain an SL(tm) clone and there will be lots of innovations in the virtual world space coming from OpenSim. Rei is supposed to show what is possible when we can control both the viewer and the server side without the fear of not being able to work on one or the other for six months.

The current state

Below are two videos of Rei logging in to OSGrid’s Lbsa Plaza and Wright Plaza.

So, what do you think of the viewer so far? What sort of improvements do you think would be nice? What do you think is missing, other than the avatar support?

In general, what are the things you absolutely expect from a virtual world viewer?

Let me know in the comments.

Tags: , , , ,

Wii Controller Plugin for 3Di Viewer “Rei”

Posted by Zaki on November 20, 2009
OpenSim / 1 Comment

 

Wii Controller Plugin

3Di Viewer “Rei” provides a great flexibility when it comes to adding custom functionality to the core viewer by making it possible to create binary plugins. Just drop these binaries into the Rei folder and let the viewer find and load it automatically the next time it starts. While these plugins are still in their early phase – we can do a lot more to ease the process of deploying plugins and resolving their dependencies – you can get a glimpse at their power already.

The WiiControllerPlugin is a fun project, a proof-of-concept, rather than a commercial solution, so before you dive in, be warned, that it is sometimes rough around the edges. With that out of the way, if you have Rei, head over to http://github.com/zaki/ReiWiiControllerPlugin and grab the binary from the Download section. Just copy the contents into the Rei installation folder (usually C:\Program Files\3Di\Rei). And… that’s basically it.

How to connect the controller?

To use a Wiimote, you will need a Wiimote, a nunchuck and a bluetooth adapter. I’ve heard that Toshiba adapters works best, but I have used Broadcomm’s chips successfully as well. It is said that the Microsoft stack doesn’t work most of the time with the Wiimote.

Before you start the viewer, connect/pair the Wiimote via bluetooth. If you find it difficult to connect, I found that keeping (1) and (2) pressed simultaneously while connecting helps a lot.

Once the Wiimote is connected, start Rei and if everything goes well, the primary Wiimote will have its first LED turned on. You are now ready.

How to use the Wiimote?

The WiiControllerPlugin allows you to use the Wiimote and the nunchuck to control your avatar and the camera. The nunchuck’s joystick, or the directional controller on the wiimote can be used to make you avatar walk. Up will always make your avatar walk forward, regardless of the position of the camera.

The camera is controlled with a combination of the wiimote and the nunchuck. Zoom in and out by holding down (Z) and tilting the nunchuck forward and backward. Hold the wiimote straight up; while you press (B), you can tilt the wiimote in four directions to rotate the camera around your avatar. Remember, you don’t have to look away from the screen to change the camera angle.

If you get lost with the camera, you can always press (C) to go back to behind your avatar. Pressing (C) also switches to “follow” mode, so your camera will “stick” to  your avatar and will follow it from behind if you move. Pressing (C) another time will switch back to the free camera mode.

If you get tired of moving with the wiimote and want to switch back to using the keyboard or mouse, you can disable avatar movements by pressing (-). Your wiimote’s will light the third LED when it’s disabled. Press (-) again to enable moving by the wii controller.

About the demo

The video above contains a very dull maze, in which there are colored balls that hurt or heal you when you touch them (I’ve never said I was a great contents designer, have I :) ) The demo shows how easy it is to integrate custom features with an unmodified OpenSim grid. All that was used is simple LSL script that detects collisions and gives commands via llSay. These commands can be intercepted by javascript and further dispatched to all plugins, that can act accordingly. In this case a simple health bar is adjusted.

As my LSL was sending plaintext commands like “heal,20″, the necessary javascript looks really simple:

function DispatchCommand(message)
{
	var strList = new Array();
	strList = message.split(",");

	if (strList.length == 2)
	{
		ctrl.Callback(strList[0], strList[1]);
	}
}

If you have a question, or have a good idea about plugins, or the WiiControllerPlugin, please share it in the comments.

 

 


Please note: WiiControllerPlugin is not endorsed by Nintendo. WiiControllerPlugin depends on  WiiMoteLib, which is release under the license MS-PL. For more details, see http://wiimotelib.codeplex.com/

Tags: , , , ,

Slowly getting there…

Posted by Zaki on September 08, 2009
OpenSim / 2 Comments

3Di OpenViewer on OSGrid

Hippo Viewer on OSGrid

Pretty close, but still not close enough. I guess, I’ll need to take a deep, hard look at PrimMesher too.

Tags: , , ,

How to install and use 3Di OpenViewer

Posted by Zaki on August 19, 2009
OpenSim / 11 Comments

How to install 3Di OpenViewer?

First and foremost, please note, that the viewer is currently for Windows and 3Di only supports Internet Explorer 6+ and Firefox 3.0 and 3.5 at this time.

Step 1.

IE Users:

Go to http://www.3di-opensim.com/openviewer/ie_install.html

The ActiveX bar will appear, click Install

FF Users:

Go to http://3di-opensim.com/openviewer/ff_install.html

Click on the orange button with the arrow to download and install the plugin.

Step 2.

The installer will appear.

3Di OpenViewer Installer screen 1

The first screen is only an introduction. It asks you to close other applications before clicking next. The left button says Next, the right one is Cancel.

3Di OpenViewer Installer screen 2

The second screen is the EULA. I won’t try to translate it to english, you can get a raw English version by pushing this through any online translation service. The long and the short of it was summarized in these two sentences:

1) No commercial use
2) No reverse engineering

The first radio button says Agree, the second says Disagree. Again the buttons are Back, Next and Cancel in that order. I guess it is pretty difficult to Agree with something you can’t read (I always feel that way in Japan :) ). There are no traps in there and as long as you don’t use it to become a millionaire celebrity without 3Di’s consent, you should be alright. (If you happen to be a millionaire celebrity already, you should definitely contact us :) )

3Di OpenViewer Installer screen 3

The next screen has three buttons saying Back, Install and Cancel respectively. After clicking Install, it will start the automatic install process. When it finishes, you can click on the Finish button on the next screen.

How do I embed the Viewer on a web page?

If you just want to try the viewer out, you can head to this page: http://zaki.asia/3di/ov/index.html

You can of course see (and therefore use yourself) the HTML and JS codes that are used to embed the viewer. Please keep in mind though that 3Di is just about to make these available officially (and more conveniently) very soon as well.

You can see some details about changing the login behavior from javascript here: http://zaki.asia/?p=46

Is it possible to use 3Di OpenViewer in English?

This question is asked many times lately, so here’s a short guide on how to do it. Please do note, that this is sort of a pre-release thing, that might in some places be a little rough around the edges. And if you find any leftover Japanese text after the switch, do let me know.

When you install the viewer, and open a page with the viewer embedded, it will appear in default Japanese locale, but it is possible to change this to English. There are two ways to do it: you can log in to an OpenSim grid with the Japanese version and change the locale from the menu, or you could change the configuration file to make the viewer appear in English from the first login page. Either method you choose, you will have to start the viewer at least once (to initialize the necessary directories and configuration files).

Method 1 – Using the menu
3Di OpenViewer login Japanese
Using the login screen, specify the login URI, first name, last name and password in that order, then click on the button to log in.
3Di OpenViewer settings Japanese
After you log in, move the cursor towards the upper right corner until the menu appears. Click on the wrench icon to go to settings. The last selectbox on the first tab is the locale, you should select the first option and press OK. A dialog will appear telling you that the settings will be effective after you restart the viewer. Do so, and the UI will appear in English now.
3Di OpenViewer login English

Method 2 – Changing the configuration file

After you start the viewer, the configuration file will be created in your local settings directory. On XP, this will be in Documents and Settings/<username>/Local Settings/Application Data/3Di/OpenViewer/, while on Vista and Win7, this will be in Users/<username>/AppData/LocalLow/3Di/OpenViewer

Open the file in configs/ called OpenViewer.ini and change locale to en

locale = en

Start the viewer again and it should be in English now.

Can I connect to OpenSim grids?

The short answer is ‘yes’. The long answer is ‘yes, but’. You can definitely log in to OpenSim grids with the current release version and prims will display. However textures and the avatar will not currently appear. The reason for this is that assets are not downloaded through the region server. We are working on a fully compatible version that we will release in the future, but for the moment to get the full experience, unfortunately you will have to connect to 3Di’s servers. We are also preparing more demo servers, but I have to ask for just a little more patience on that.

If you try 3Di OpenViewer, your feedback is always appreciated.

Tags: , ,

3Di OpenViewer Feature Focus: Login

Posted by Zaki on May 01, 2009
OpenSim / 1 Comment

3Di OpenViewer provides a number of ways to connect to a grid, let’s look at those in a little more detail.

Manual

Manual login is the normal way, that everyone using SecondLife/realXtend/Hippo/etc are already used to using. This mode will show a login box right within the application and will allow you to specify the login uri, the first and last name and password. You can set the default values with additional params as well.

<param name="LoginMode" value="manual" />
<!-- Optional -->
<param name="ServerURI" value="http://1.2.3.4:10001" />
<param name="FirstName" value="first" />
<param name="LastName" value="last" />
<param name="Password" value="password" />

3Di OpenViewer manual login

Click

Click login is great if you want to specify all the information for  the login and not allow the user to change it in any way (for example dynamically creating the login page based on an already existing session information). In this case, the user can only see an empty screen with no login box; when they click on this screen, login starts automatically.

Of course in click mode, you will have to specify all the login information like above.

<param name="LoginMode" value="click" />

3Di OpenViewer click login

Hide

Users can also use a JavaScript function to log in. Sometimes, it is better not to allow users to specify any information, but at the same time, login information can dynamically change at any time. In this case, you can set the login mode to hide, which will not show the login box, but also not allow login from within the application. Rather, it only allows JavaScript logins.

<param name="LoginMode" value="hide" />

To log in from JavaScript, one can use the following function:

openviewerCtl.Login(firstname,
                    lastname,
                    password,
                    server_uri,
                    login_location);

For the JavaScript login method, it is also possible to specify the exact location to log in to. The format is

// " uri:regionname&amp;x&amp;y&amp;z"
uri:region1&amp;128&amp;128&amp;25

Tags: , ,

3Di OpenViewer

Posted by Zaki on April 24, 2009
OpenSim / No Comments

Disclaimer: I am a senior engineer working on multiple products – including various OpenSim technologies and most recently 3Di OpenViewer – at Japan-based 3Di Inc. This is a personal blog, and my opinion does not necessarily always represent that of my employer.

Introduction

3Di has released (Japanese) its virtual world viewer last week. It is an embedded viewer, that works directly in a web browser; it connects to the virtual world server solution also provided by 3Di, called 3Di OpenSim Enterprise 1.0 (Japanese) that has quite a few addition on top of the community version, utilizes much more than just SL prims to create a nice looking environment even within the limitations of the web-browser.

Open?!

Let’s get the biggest question out of the way first: the virtual ink on the press release hasn’t even dried, but I was already asked where one could download the source code. After all, it is called OpenViewer isn’t it.

The short answer is: it will be released as open source at a later – not too distant – stage. Personally I think that opening up the viewer will be crucial for two simple reasons: first, the future of OpenSim depends on a viewer that opensim developers can look at without running the risk of getting burned by the license – and serious innovation requires some degree of control (I met with “we can’t do that without changing the viewer” so many times). Second, tying back to the first reason, personally I think we are in a kind of a deadlock with the SL protocol. It was never designed for the sort of things the opensim community dreams about: rather, it is a very centralized, “the region server does everything” sort of protocol, that needs a fertile testing ground in the shape of a viewer that you can bend to your own will.

When exactly can you get the source code? I don’t really have the answer to this question, as it is not nearly my decision. For now, just keep an eye on this viewer because we are going to deliver some features that I hope will show everyone that by changing the viewer, you can accomplish extraordinary things.

Features

The main distinction is of course that this viewer runs directly inside the browser. Now, does that mean, that it is forever constrained within the limits of a solitary HTML page? Not really.Internally we sometimes use a standalone version for testing, so technically there is nothing stopping someone to “liberate” (as I’m sure many would call it so:) ) the viewer from the evil browser. Our first target was IE only (boohoo, yes) and at the very least people can start using it they way they are already used to after years of experience with ye’ olde series of tubes and, equally importantly, provide us with feedback on the important questions (no, not about our plugin system or our 3D engine). And the next stop is Firefox and Safari support.

The viewer itself is operated with the mouse only. This makes it simple and straightforward; on the other hand, there are not so many actions to do: you can walk around, run about, sit down to objects or touch objects.  More complicated actions like chat or teleporting are of course in a simplified menu system. Our first priority is to make OpenSim – and virtual worlds in general – accessible to a wide audience. This will hopefully help the community indirectly as well as more and more people get used to using virtual worlds, more businesses will join the ride. Of course we could have gone to the other extreme and create a highly customizable meta-GUI system, but for the uninitiated first-time virtual world user, that wouldn’t really help.

The SL Viewer supports prims, which is a great thing if you have a limited bandwidth. Or if you push every single bit through your region server. But realistically, getting professional content into SecondLife can pose a challenge because of this. As realXtend has also realized this before, 3Di OpenViewer also enables content providers to use their usual 3D content created with most major 3D modelling software like 3DS Max or Maya with little or no change. This should further lower the entry barrier to many CPs that don’t really have the time and resources to invest in creating prims for all of their popular contents. If they can import their content as-is, the cost goes down and at the same time customer satisfaction goes up. In turn, there is an increase in virtual world penetration, that is good for 3Di as well as the community. (Hopefully the trend to make virtual worlds popular and more accessible can be seen here)

The last new feature for today is the JavaScript API: we are providing ways for a fair amount of intercommunication with a CP’s HTML content and OpenViewer.You want to create an e-commerce solution in OpenSim supporting currency? Why go to the trouble of recreating your already existing EC in the virtual world, when you can quite easily communicate between the 3D world and the 2D world. The demo site is actually showing a mockup for an EC site that doesn’t require lengthy configurations and recompilation of OpenSim. No, it’s  not an end-all-be-all, but it’s a simple solution that one can use to quickly start up a new business in the virtual worlds.

In closing

There might be two things apparent from this post: first, I tried to convey why I think a new viewer, and specifically an in-browser viewer is good for the community. Second, I never talked about technical details. This latter, I am planning to ammend in a later post, but first I just wanted to make it clear that 3Di OpenViewer is not a product in isolation, and although it is only a first step towards a bright future for OpenSim and virtual worlds in general, I believe that it will be a significant one. So please keep an eye on the product, and do post any feedback you might have in the comments.

Tags: , , ,