Monday, 29 June 2009

Free data broadcaster & gauge kit.

After much procrastination, I am getting around to publicising my latest development, a data broadcaster and receiving device, to be used for whatever projects it may benefit.

I am making these implements free -- both free-of-charge, and freely-modifiable -- in the hopes that they may further the progress of science and industry in Caledon and like-minded communities.

A link to the kit is found at the end of this posting.


This kit contains two items: a prim scripted to transmit an integer (in degrees, 0-360) on a certain channel, and a receiver contained in a circular gauge. The gauge prim has its texture offset changed such that it indicates the value received (normalised to percentage, in this case).

The scripts and texture are released free of charge, and as open-source. Please improve and extend upon it.

Figure 1. Data transmitter in the path of a mushroom-eating juvenile plesiosaur (Cryptoclidus sp.).


Users will wish to replace the data transmitter script with something appropriate to their own work. Out of the box, the transmitter when touched generates a random number representing degrees, converts the floating point result into a string, and broadcasts that string (via llSay) on a channel defined in the script. The script in the receiver (the dial itself, actually) listens on the defined channel for a string. The string is then converted to a floating point value, and the texture offset is changed by value/360 (again, representing degrees).

Must one use degrees? Of course not. The texture offset parameter is a 0.0 to 1.0 range, so a decimal approach is actually simpler than the degree business. (Actually, the texture offset is -1.0 to +1.0; that is, 0 to 1 in both 'forward' and 'backward' directions.)

Why, then, degrees? A reasonable question. The project included the notion of not just changing the texture offset, but actually rotating the dial prim around its Z axis, as an actual dial would do in Real Life. In that case, the state of the dial in degrees (think compass on a ship's binnacle) would be the ideal currency for transmitting. Unfortunately, as your writer did not read maths or physics at university, all that work involving rotations and Euler representations of quaternions had to give way to the more expedient -- and graceful -- method of simply shifting the texture around.

Figure 2. Scientist at leisure outside a public house, viewing transmitted data on the receiving device.


The list here is fairly large, limited only by imagination (and the whims of LSL). In short, any programmed system involving multiple objects can use this system to transmit and display numeric data in an analogue fashion. The initially-intended audience consists of steampunk builders, mad scientists, tinkerers, and anyone wishing to dabble in an old-fashioned method of data display.

The current broadcasting method, llSay, has its own caveats. The LSL wiki page on the function is recommended reading. (


The author will be happy to hear any suggestions, critiques, and constructive criticism related to this system. Users are asked not to keep their derivative creations hidden under their hats, but rather, to share them with the community. These scripts were not created by an expert, so any formative feedback will be taken in the manner in which it was given.

Figure 3. The location of the items in the offices of the Royal Society.

Monday, 22 June 2009

Movement of objects between virtual worlds.

In another forum I recently commented upon my success in moving objects from SecondLife into an OpenSim environment, namely, the one on a second machine in my home. For those readers who wish to experience some of this excitement themselves, I offer this recipe.

1. Build something in SL. Go in to 'edit mode', select all the prims in the object, right-click 'take'. Give the resulting inventory item a name.

2. Log out of SL.

3. Download an alternate viewer which allows for object import and export. I used the Meerkat Viewer. Install the new viewer.

4. Log back in to SL. Go to 'edit mode' again, and then rez the object from step no.1 above. Right-click, 'more', 'more', and then select 'export'. Save to your desktop or whereever; an .XML file will be created.

5. Be patient; the viewer will now download the object's description, and each of the textures associated with the object. A progress message will appear; "23 textures remaining..." or somesuch.

6. Once completed, log out of SL.

7. Now, restart the Meerkat viewer, and log in to the alternate grid of your choice. Or, as I did, log in to your very own OpenSim enviroment at home. N.b.: the installation and configuration of one's own OpenSim system is well-beyond the scope of this writing. I encourage interested parties to read the OpenSim documentation at least twice, possibly with a cuppa to aid in concentration.

8. Now that you are logged in to the alternative grid, simply choose 'import' from the 'file' menu, et voilĂ ! You have imported the build from SL to OpenSim.

1. Meerkat only transfers prims and their textures. No scripts are copied over! Those must be copied-and-pasted by hand.
2. The viewer respects permissions, and will only allow the export of items for which you have 'transfer' permission. This is not copybot!
3. Be patient with the import speed. Despite the horrid performance of the LL servers of late, OpenSim does not yet boast any speed records for asset server function, even on a dedicated single machine.

Here is the result, seen in a snapshot from my local OpenSim recreation of Winterfell Eventide, before I had to give it up in the Great Void Sim Debacle of 2008. The entire structure was imported in a single maneuvre. Still in edit mode, I moved the collection of objects to the appropriate coordinates, then left edit mode. I will need to find trees to replace the wonderful Heart Garden Centre birch trees in SL, and bring over my Tunguska stumps &c. to finish the look. But the proof of concept is sound.

Here are some views of Eventide before my exile:

Winterfell Eventide

Winterfell Views

Winterfell Eventide_001

Winterfell Eventide_002

Anyone wishing additional details may contact me at their convenience.