- September 19, 2010 I got tired of fighting with Ogre so there is now an OpenGL renderer. It's limping with textures, sculpties and basic scene display. The speed and memory footprint are better than Ogre and the scene management overhead is not to much of a problem. You switch renderers by copying either ModulesOgre.json or ModulesOGL.json into Modules.json.
- July 3, 2010 A new precompiled binary version 0.5.4. This changes the cache directory structure to help performance and disables the comm object queuing code what was introducing a lot of odd bugs (things floating off into space). You have to log into an area multiple times to get everything loaded -- something is broken in item update.
- May 31, 2010 A new version with a lot of little things fixed. Camera and avatar movement is MUCH smoother because of finding bugs and adding position and rotation animation code. That also means that movement of animated objects is now smooth. LG works great in OSGrid/Lbsa Plaza but larger sims like OSGrid/Wright Plaza stretch the bounds of memory. SkyX now works with OpenGL although the shaders aren't all together for the sun and moon lighting. Avatars are still stuck in T-pose and attachments are at the feet. Sitting avatars now are near the sit location and not at the sim's 0,0. Also upgraded to the latest libomv. A new Windows 32-bit installation package is in the download section.
- Old Progress Reports
LookingGlass Virtual World Viewer
The LookingGlass Virtual World Viewer provides a modular framework for a client viewer of virtual world systems. LookingGlass is written in C# and licensed with a BSD license. The current version has a communication module that talks Linden Lab Legacy Protocol ("LLLP") which is compatible with Second Life(r) and OpenSimulator. A rendering modules exist for OpenGL (OpenTK) and the Ogre3D graphics engine. Other communication and rendering modules will be added in the future.
The state of development is alpha. It is no where near a point where a casual user can download and run and view a virtual world of their choice. The sources can be downloaded and built for the Windows XP and Windows 7 operating systems with Visual Studio. A binary installation package will soon be available.
- Modular design to support many types of virtual worlds;
- Written in C# for operation under both the Windows(r) and Linux(r) operating systems;
- BSD three clause license;
- Initial communication module talking LLLP for connections to SecondLife(r) and OpenSimulator worlds;
- Orge renderer;
- OpenGL (OpenTK) renderer
State of the Project (July 2, 2011)
It's clear I've moved on from this partially finished project. The viewer is developed to the point where it does basic scene rendering and updating from the simulator. Texturing, rendering and transparency works but all the shader stuff (shadows and good lighting) is not complete. Progress stopped with trying to create the legacy avatars -- the OpenSim avatars are very rich and complex and the work of creating a base mesh, adding morphing controls, setting up texture mapping, etc. was too much of a project. But, without that, the viewer could not be 'finished'. That, plus the feeling that a separate, independent viewer was not the right solution lead me to other projects.
If I was to pick the project up again, I would probably totally redo the rendering portion (Ogre and all the stuff I put in there) and reorganize the C# portion to be more streamlined. The current implementation has and overall architecture to it but a lot of the solutions to tough problems grew organically.
So, what did I learn?
- C# is performant and a nice language to develop with;
- Ogre is not built for dynamic scene creation -- it expects structures and updating them without upsetting rendering is not always easy. Should look into how the Naali project got it to work for them;
- memory size and need for frustrum culling and LOD storage of data structures -- all the data structures needed for 3D scene display (meshes and textures) take up a LOT of storage and that needs to be managed;
- Boost worked for locking in the C++ world but it is gigantic and I never solved how to use it so C++ would build in both the Windows and Linux environments;
- <<<more to be added>>
State of the Project (September 29, 2010)
As mentioned in the progress bar, I got tired of fighting with Ogre. It's powerful and featureful but it is just not suitable for the dynamic loaded content of this viewer. It has its own requirements for timing so there are work queues and endless race conditions. Keeping up with the versions of Ogre and the vagaries of Boost proved too much for my patience.
So I started another renderer using OpenTK -- a C# library for OpenGL. The pictures here are rendered with that renderer. It plugged in easily which says something about the modular design of LookingGlass.
There are some problems with alpha texture rendering and I don't have the lighting correct (pretty dark at the moment) but the OpenGL renderer is about up to the capability of the Ogre renderer with a lot less work. Next steps are to splat texture the terrain, get multiple regions working and do some texture culling so high content regions can be displayed.
In the pictures, the blue balls are avatars.
I am using the git repository more and I've started a GitHub repository for an up-to-date copy of the sources. I will soon be packaging a new release of LookingGlass that defaults to the OpenGL version.
Old State (June 1, 2010)
I've found several of the movement jerkynesses so, for low prim regions like Lbsa Plaza, LookingGlass loads quickly and movement is pretty smooth. The video shows all the T-pose avatars at a gathering there. The horizontal avatars are actually sitting on the bench. Avatar animations are not implemented.
Old State (December 26, 2009)
As you can see in the video, avatars show up as spheres with all their attachments at the center. Toward the end of the video you can see the avatars moving around the crowded Lbsa Plaza. The other thing working is chat. The login dialog expands into a list of the avatars nearby and the chat dialog allows one to hear and chat with the other people in the scene. This means I can use LookingGlass in a regular viewer setting!
Still only Windows but I will work on that the next week. It does run in Windows 7 64-bit in XP compatibility mode but I'm sure there are 64 bit problems when I compile for 64 bit. Anyway, a little at a time.
Old State (December 5, 2009)
The display detail has not changed much and I've spent much time figuring out performance problems. My initial design of pull from the world by the renderer was, for the number of items there are in the world, much too slow. So I've been adding push of objects into the world. Ogre has been upgraded to use the threading version and some multi-threading has been added to the renderer. But my biggest disappointment is how long it takes to load a simulator. Once loaded, though, it works pretty well at displaying and navigating SecondLife and OpenSim regions. The video is of navigating around OSGrid::Wright Plaza. The frame rate is mostly the speed of Ogre with the thousands of graphic batchs (texture and prim coalescing is needed) and the jitter of the camera is that Ogre uses floats (32 bit floating point numbers) and they don't have enough significant digits to address world coordinates (region coordinate localizing is needed).
I build a package of LookingGlass that, on Windows, installs over a Radegast installation and adds a LookingGlass tools menu item. Used this way, one can see the world and chat, manipulate you inventory and other user interface things. Almost a whole viewer.
I am going to stop with the performance thing and add some display features. Avatars, animated textures and moving objects are next.
Old State (August 22, 2009)
I haven't been napping or spending all my time vacationing this summer. As of August 22, 2009, LookingGlass can now visit any simulator and do a pretty good job at displaying the contents thereof. These pictures are from Portland Connection in Second Life(r) and the last one shows lots of sculptie trees. The frame rates are half of what I see -- for some reason capturing the frame slows rendering down.
The quality of the display is much better because there is now a sun and, although the ambient is still a bit dark, the shading helps a lot. There are controls for rendering distance as well as frustrum culling of loaded Ogre objects. There was a big problem with running out of memory with keeping all the vertices and textures in memory. Now meshes and textures are loaded and unloaded depending on where one is looking. That led to discovering that the JPEG2000 decoder that ships with Ogre is very slow. Now all textures are saved on the disk as PNG files which makes for much more disk space used but makes reloading when the camera turns almost acceptable.
There are some problems with textures that show up on trees. Sometimes the texture on a sculptie is upside down. This makes for funny trees. Also, the flexible box that makes up some trees is rendered with the texture on the edges and the large surfaces transparent. I have built my own examples of these situations and it always works on them. I have not figured out what the difference is yet.
The next big problem is getting the user interaction smoother and frame rate up. Once things are loaded, I get around 10 FPS but loading really slows down rendering and after loading a sim it is often hard to navigate the avatar around. This probably entails figuring out the threading in libomv and how that interacts with LookingGlass. I want to get performance up to where it's almost usable as a viewer. That also means placeholders for the other avatars in the scene and adding some conversation code. Still lots to do.
Here is a video of navigating around OSGrid's Wright Plaza. You can see the effects of the low frame rate and the overly aggressive object culler.
I'm waiting for the release of SkyX for the upgrade to the skybox.
Old State (June 2, 2009)
As of June 2, 2009, the viewer connects and logs in and displays a region reasonably well. The images here are of connecting to OSGrid and displaying Lbsa Plaza and surrounding regions.
LookingGlass first displays a prim with a yellow placeholder. These are the transparent yellow balls you see. The prim is later meshed and rendered into the scene but with gray textures. Later, the textures arrive and the prims are decorated.
Some things to note:
- Only the one region the avatar started in has it's terrain. This often happens at the moment and needs fixing;
- There are long periods when nothing seems to happen but what's really going on is the rendering of all the small prims inside the buildings. There are several thousand prims total;
- The large blob in the center is actually a mega-prim sculptie tree. LookingGlass doesn't have sculpties yet;
- Transparency and solid colors are not correct everywhere. Work is needed in constructing Ogre materials;
- The reason this is not Wright Plaza is the number of prims. Since I haven't done any optimization in Ogre, Wright Plaza runs out of memory before displaying the whole sim. Vertices sharing is on the TODO list.
Joining the Development Team
The project is open to interested people who will contribute and extend. More communication systems, more renderers as well as opinions and code for completing LookingGlass's plumbing and framework. The Forge is keeping the growing collection of bugs and TODOs. If you have comments and/or questions, begin a discussion in the Forums. Or you can email me directly at "misterblue at lookingglassviewer dot removeme dot org" (remove the 'removeme dot').
For the current renderer, someone who knows Ogre (especially material definitions) would be a help.
Documentation on building and running is in the Development section.