Dome a dozen

… so, I imagine ‘Offworld Homebase’ to be a cluster of geodesic domes in a desolate crater [anyone who has seen the Dr Who episode “Water of Mars” will get the idea] – the problem is I do not know how to  make a geodesic dome. To the CDROM in the sky called the interweb, researching geometry I realised [or rather decided] that if you were travelling to a far away place with the components to make something, the last thing you would want is a “jigsaw from hell” [that is, hundreds of pieces, each different] so decided to explore making things out of ONE size and shaped triangle.

Originally, I tried equilateral [maths nerd fact: all 3 sides the same length] triangles and when I put them together into a hexagon, it was flat [to make the side curved it needs to be slightly less-so]. So I took a SQUARE, bisected one of the sides, joined that point to opposite corners and voila I had an ISOSCELES triangle [math nerd fact – 2 adjacent sides the same length, both slightly longer than the original side of a square which forms the base, and a means to connect them to others].

bunches of 3, 5 and 6 triangles

bunches of 3, 5 and 6 triangles

Clumping these together into groups of 3, 5 and 6, we now have the basic building blocks of a dome. Now, purists will argue that the triangles used for the pentagonal pyramid should have shorter sides so it sticks up less, but I figure the last thing spacemen want to do on the planets surface is work out whether they need a long or a short triangle … imagine being half up and realising you screwed up one further down.

…so, 6 pentagons, 10 hexagons and 5 half-hexagons later [105 triangles, cut, folded and stapled] we have a dome:

100 triangles later, a dome

100 triangles later, a dome

…structurally, and to my great surprise, this paper structure [I designed a ’tiled’ template in an attempt to waste as little paper as possible using CorelDraw and printed it out on normal printer paper] is quite strong. So long as the base is secured on a couple of points, the whole structure stands up on its own and seems to self-organise. In retrospect, I should have had the seams on the inside, but again, I imagined some poor bastard in a space suit with a spanner bolting these panels together.

Making the physical model actually helped me “see” this structure virtually. The interplay of sides, angles and so on was instructive [if a little madenning towards the end, was a little “craft project from hell” as each layer of new facets caused the structure alternately rigid then floppy]. making the virtual model was another issue alltogether. I remember, in the object yard, seeing a square-based triangular panel, so went and got the name of that object, next to rockshop I created a triangle, duplicated it, rotated it 60°, rinsed and repeated 4 more times to make a neat hexagon, then inclined each facet of the hexagon until the seams aligned and neatly met at a point. Saving that as an “object group” [so I can spawn more of them in one step later], I did the same for a pentagon [72° rotation this time].

In-World Structure begins

In-World Structure begins

The most difficult part of the 3D build was angling the panels so they seamlessly joined – pitch, yaw and rotation is really difficult to gauge from only ONE perspective point and I have yet to find a way to move without having to de-select the object I am working on [Activeworlds object manipulation keys are the same keys you use to move, in a different context] … am sure there is an efficient way of doing this [certainly in SecondLife the camera re-positioning is superior to anything I have found so far in AW], yet to determine if there is an angle recipe I can use [which would make the tilting simpler and less “guesswork”].

What did I learn?  I know a little more about engineering [enough to realise as an Engineer, I make an adequate teacher 😛 ], and there is a definite construction order if you were to actually try to build one of these things with any force of gravity acting on you. I also learend that the modular approach is what would be used if you had to ransport everythign tot he remote location, and the SIMPLER the better in terms of modules, if you think about them, other structures are possible with the same shaped buts [tunnels, turrets, tubes and so on. Triangles are strong, the weakest part of any structure are the joints.

Scale is difficult to determine – if I continue as I am with the structure in-world, the dome will be MILES high and that is a little silly, so will return to the CDROM in the sky to see if there is a way of determining scale of the structure, as it must be some proportion of the side length [yeah, I know, my engineering friends will be saying “duh”]. The other model I need to explore is the “soccer ball” model, that uses alternated FLAT hexagons and pentagons – less pieces, smoother shape I suspect … all very interesting.

Lights, Camera …

So, bored with the flat, uniform lighting and wanting to get a little moody, I set about first investigating lighting.

The “world” settings can vastly effect the mood of a place – the “ambient light” [general, non-directional ambiance] and “directional light” [that coming straight from the “sun”] can be bright and cheery, dark and dank and everything in-between.  You control the “colour” of the light and therefore the intensity/luminosity by the density of colours you choose – all very nice. I am wondering if an admin “bot” might not be able to programatically change these settings, I should think this would then give us night/day as the bot could do this change gradually, using world time. Anyways, i dimmed the settings on Q2 a little, so it was not quite so sunny and cheery …

As it turns out, most things can contain a “light”, so I went for some rock’n’roll lighting with part of Wonkyhenge to create a myriad of reflections and other cheesy fx and the result ..

Lighting effects combined

Lighting effects combined

..was actually quite satisfactory. There are LOTS of things that can be varied about each light source [note to self – the light source does not actually illuminate ITSELF – each of the rocks in this part of Wonkyhenge is a light source – you see the colour from other rocks, if that makes sense]. There are “point” lights [like a bare incandescent bulb that spreads outwards from that point] and “spot” lights that shoot out a cone of directed light [you specify the direction, intensity, cone dynamics etc] – both nice. Obvious controls exist for colour [using named values or hex html refs, so 16.7 million shades might just be enough; note to self: kids will learn to spoll colour wrongly because for it to work in script, it must be spolled color – *shakes fists at Americans*], brightness [ intensity] and radius [spread].

A rather nice collection of fx exist for lights as well – blink, fadein/out, fire [a lovely faux flame flicker], flicker [like a fluoro tube going bung], flash [like lightning] and pulse [a rhythmic throbbing] – most fx have a time parameter to control the rapidity of them also, again, very nice. I can see lots of applications here [particularly when I get around to discovering fire in rockshop.

It seems most typed of objects can also be defined as a “camera”.

camera position and controller

camera position and controller

…so what I did, after an idea I saw in the Activeworlds Forum was define an object, set it rotating [to be my camera] and then defined a clickable somewhere else that would switch the user’s view to that camera object [in effect, creating a “guided tour” that followed the animation of the object].

Camera:  create name wonkycam, visible yes, solid no, rotate 2 time=8 loop
Remote: activate camera location=wonkycam

meaning, the “camera” object is rotating at 2rpm, for 8 seconds, then returning to it’s original position in 8 seconds and repeating that. The “remote” transfers the user who clicked on it’s vision to the camera object, so you see what the object pans past  – nice

Walk-throughs and guided tours are possible using this trick [note to self, explore animation and path-controlled movement more], as is “remote sensing” of far-away places without actually leaving the comfort of your current location – very useful. Lots more to explore, will keep banging the rocks together.

Forums and some telly

…so I was at a loose end, nothing on the telly so I thought I would make my own television – and a wide-screen slate-based [continuing the rock-based theme] telly in Wonkyhenge seemed like a good idea.

An In-World Telly

An In-World Telly

Lacking anything interesting to watch, I turned the “picture” property of a ‘picture type’ object [they have a mystical tag value of 200, not yet sure what that means yet as ‘sign’ objects have a tag 100 – think it is a tie in to custom code underneath that allows you to use certain commands and not others] to point to a “live webcam” of southbank. This webcam dumps pictures into the same place, so the filename stays the same, just gets overwritten every 30 seconds or so.

create picture url update=t
eg: create picture http://www.ourbrisbane.com/files/weatherdata/sbimage.jpg update=30

…very nice – now the virtual world has a portal to the real world. Yeah, I know the screengrab has a mostly dark image, but it was late, not a lot happens in Brisbane at night 😛

Seems the “picture” command is intended to allow people to bring in images they have uploaded somewhere else – shame there is no “uploader” or user files upload area for the user to upload their content, although I suppose you could use any of the cloud tools [flickr, yfrog …] so long as the URL points to a JPG file – apparently the only one supported for this parameter. One would think it should also work with ani.gifs, swfs, flvs, pngs and other modern file extensions – the content is well understood by most other platforms … still. I am assuming there must be another way to get such content in-world because I have seen it in other Activeworlds, so I have some more research ahead of me.

It seemed like I got little done tonight, but spent a whole bunch of time trolling through the AWForums, there is a richness [and familiarity that I am gradually gaining], particularly in command syntax and options that is lacking in the Activeworlds help pages … must try and find a more complete reference as it is annoying only being able to get at some of the commands and a small collection of the parameters – can anyone help here? [is anyone actually reading this junk?]

I also got a bunch of code snippets to try and some valuable advice on creating custom objects and placing them in the world object path.

I also stumbled across a web-catalogue of objects that someone had compiled of in-world objects for their world – it has categories, was searchable and contained thumbnails of many of the standard objects as well as their customs – this is great news as I can see this idea works although some of the seasoned builders in that world still preferred to wander object yards shopping for things. Maybe an amalgam of approaches is best?

Their web catalogue was an external “fan” site, but I see no reason why it cannot be used in-word using the integrated browser. There are a bunch of undocumented but interesting commands for having the integrated browser interact with in-world named objects [well, initially remotely activating and teleporting, but I am sure there are more options, I just cannot find them] … this has great potential. I am sure, for example, I saw a chat pot that could be talked to or interacted with via “links” in the accompanying browser page when last in Quest Atlantis … must investigate further.

Ready to Rok

So I was determined to play around with sound in-world…

A Real Rock Band

A Real Rock Band

and built a rock-based apparatus [this is, after all, Rockshop 101 in da Henge, man] and experimented with the “noise” command and the “sound” command which, on external appearances seem quite similar.

Both trigger samples [wav, midi or mp3], but in different ways.

Using “noise”, you can trigger it, by activating an object, say, [clicking on it] – you can wait until it finishes playing before you click on it again, or you can use an “overlap” parameter to let many concurrent noises [including multiple copies of the same one] play until they finish. In no time a wonderful cacophony results from overlapping samples.

So … I embedded the following script in one rock:

activate noise http://www.wonko.info/wOnKoBUZZ/samplesRus/percussion/drums/bigconga1.wav overlap

then chose other sounds [from my own online sample collection] for the other rocks, and a nice long sample for the big rock. I even did a dodgy flash capture [the sound quality is a bit mashed]: RokandRoll Flash Capture

The SOUND command is a bit different – there can only ONE sound playing for each citizen, that sound comes from the sound-enabled object closest to you. Nicely, that sound is “spatial” in that it appears to come from the direction the object emitting the sound it which is nice. You can LOOP but I have yet to work out how to programatically STOP the noise [I can go to the menu system and stop it there, but I am sure there must be a command that lets me do this].

I changed the “activate” script for the big rock to:

activate sound http://www.wonko.info/UoD/objects/aural/UoD8.mp3 noloop

and now when you click it is directional – as you walk around, it moves in the stereo picture [left to right], not yet sure of the range though I notice that the volume increases as you get closer and diminishes when you move away – nice for creating ambient noises and atmosphere, although I suspect it impacts a little on the bandwidth as the sound downloads before it starts playing [unlike other technologies that can stream it as it arrives].

The sound/noise can be from any accessible URL – I am hoping the new proposed “Mytunes” upload and share thingy that The Learning Place are developing will have sufficiently exposed URLs of the sounds stored in it so that we can link to them in-world – that way juke-boxes and other interactive sound-art is possible.

Imagine, building a sculpture and linking it to hand-made noises – audio performance art harnesses a number of intelligences [and is a lot of fun]. More practically, things like buttons [that need to sound like they have been pressed], doors that creak as they open, water splashing as it falls and so on are now all possible – this is a good thing if we are to create a sense of place and immersion.

Rockshop 101

One of my favourite authors of all times, Douglas Adams, once coined an expression encapsulating the basis of evolution – he said “The secret is to keep banging the rocks together guys”.

I love this sentiment – chipping away at stuff that is not clear to seek clarity; being accurate to seek accuracy … thank goodness my brain is still accommodating enough to let me learn new stuff. So I delve [all be it tentatively] into the murky depths of object scripting for the first time …

wonko-henge, rockshop 101

wonko-henge, rockshop 101

So I needed a workshop, and found a collection of rocks in the standard object bin, so decided to partially construct WonkyHenge so I could sacrifice things in the name of the new deity – knowledge.

My mission was to begin to explore object scripting, because that is where the smarts of an interactive environment will lie. Deftly I delved into the object properties and in minutes was scaling objects in X, Y and Z, easy peasy.

To something new…

Actions are applied in the object properties

Actions are applied in the object properties

There are a number of things an object can “detect” – events for those of you familiar with event-drive, object oriented programming. The “Create” event is useful – you can tell the object to do stuff when it is first rezzed [encountered] by a player – useful for size, initial appearance etc. Scripts can be “stacked inside the action field

command; command; command      or

command part, other part, other part; command part, other part  etc.

Annoyingly, a de-bugger is NOT present, so if there is even ONE error in the script, none of it works and you get NO error message, no on-screen display [and oddly sometimes your object even disappears into an unreachable place], nothing except a non-working object [if you are lucky]. From a noob perspective this is fine because you do not get beaten up as normal programming/scripting languages do with pages of indecipherable error codes … but, some feed back would be nice.

programmed movement - translation in 2 axes - doors etc

programmed movement - translation in 2 axes - doors etc

When an object is “Activated” [left clicked on], it knows – you can get it to do stuff when it detects such a click – very useful. The first thing I tried was the “move” command.

activate move -2 2 0 noloop time=5 wait=3

= when clicked on, move backwards 2m in the x direction, up 2 m in the y direction and do not change your z position, do this thing once, take 5 seconds to do it, wait 3 seconds before un-doing it.

Nice,  slidey-door [think star trek, and an accompanying and very satisfying “wooshing” sound] sorted. Automatically translating objects is nice, fairly easy to control and it can be done on create or triggered by a click also.

A programmed rotation "onclick"

A programmed rotation "onclick"

Translation is not that dissimilar in concept to rotation, except the controls that Activeworlds use are a little interesting [different from what I was expecting, but manageable]

activate rotate 0 0 5 time=3 noloop wait=3 smooth

= on click, rotate at 5 rpm on the z-axis, do not keep repeating this, rotate for a total time of 3 seconds, smoothly, wait 3 seconds before un-doing the movement at the same speed. Easy – the opening door thing sorted. Just gotta learn how to move the axis of rotation – some objects have their axes plumb centre and so a door that has a “hinge” in the middle is a little odd.

objects that "know" other objects and communicate

objects that "know" other objects and communicate

Objects, on create, can be named – this name can be used programatically. In the above rockshop experiment, I spawned a big rock and called it “fred” – conveniently I could call other things “fred” as well – the name does NOT have to be unique in the collection of things that I create. Also usefully, a thing called “fred” that I make is DIFFERENT to a thing called “fred” that some one else makes – this is a good thing as side-effects caused by scripts someone else wrote using names you did not were already taken would be really really annoying but more importantly, very difficult to debug.

I then made 2 other rocks, and programmed them to reach out to things called “fred” and change their appearance:

activate color name=fred red

= when you are clicked on, look for objects owned by this citizen that are called “fred” and apply a red texture to them.

I rinsed and repeated to make a blue one, and added into “fred” an activate command that re-applied “granite” as a texture to it when you clicked on “fred”, itself so you can do a colour cycle and return to the base state if you wanted.

That objects can be aware and effect others is a terrific discovery [well, I say discovery, because it was for me, I know accomplished Activeworlds builders will be wondering what this dweeb is lathering on about].

I had convinced myself that the land of scripting must be pained and difficult, so was avoiding it. Having some success and more importantly finally getting what is happening, I am now eager to beaver away in the rock shop to see what else the world can let me do

I can see you quiver with antici …[wait for it] … pation…

Next Page »