Sunday, 5 December 2010

Looking for a Forest, then look no further

If you are looking for some free
OpenSim resources, in particualr trees, then let me recommend the download from Diva. Objects_Library__large_.iar — IAR with assorted objects Very large.
The accompanying screenshot here is from a sim that I am running on a USB drive featuring 60 hi-res trees, really useful if you are in need of some instant foliage.
regards Vega

Thursday, 2 December 2010

A Storks Story


I have been posting less than usual of recent, principally I suspect as result of a good dose of seasonal flu. I am starting so feel much better now however and standing on one of my islands just the other day, I began to recall the comment that I had once read in a blog or posting someplace about there not being much actual life in Second Life. Sure there are plenty of buildings and avatars, waving flags and swaying trees, but actual life, not so much. In the light of this comment I started to have a good look around and thought the criticism not so un-justified, where indeed is the life? at which point I began purchasing some roaming creatures from different places for my sim, it does produce a different feel and perception without doubt. Now that I am working more and more in OpenSim, I have once again started to sense the need for some background life features, but these are not so readily acquired at the moment in OS as they are in SL. Back in my early days of SL I had made a simple flying Parrot, so decided to start with that, except this time the parrot would become a seagull. The animation is simply a llTargetOmega() function placed in a central transparent hub that connects to the bird through an equally transparent rod, the whole thing just rotates. To make it a litle more interesting, I used some loops with random iterations within the main hub to drive it in x,y and z axis using llSetPos(). As a final touch I included a random script to play suitable bird sounds, and altogether not bad. Anyway I dropped my new creation in place, made a half dozen copies around the region set everything in motion, once again not bad, or so I thought.
Next, I decided to go for something a little different, something that I had not tried before, a walking bird, a stork. I put the prims together and after a suitable amount of stretching and trashing, I had something that looked OK, well from a short distance anyway. To begin, I decide that all I need was a preset rectangular path for testing and then use llSetPos() to get the thing going. I also rummaged and hacked around to produce a function to have the prim always face forward, for obvious reasons. Next I attached two thin poles for the legs, with profile cut to the center axis and made use of a variation to a door script to make them run from messages sent out from the main body, not the most elegant of solutions and one prone to lag dysfunction over long periods, but this was only a testing stage anyway and I can soon put a rotation reset function in later to keep things tidy. Ready to go, I touch the body and after a few surprising and physically impossible contortions for the poor stork, I finally make a few script changes and it runs, brilliant, or so I thought. Back it comes to the start point, I click again and touch_start sets it off once more around its small 12 by 12 metre circuit, marvellous, or so I thought. Then the moment comes, that would lead to the best part of a wasted afternoon. I decide to put the whole sequence into a loop, and get ready to sit back watching my new creation walking around with the occasional small departures from what could be otherwise described as synchronised marching to the sound of stork calls. Indeed everything went very well until just before completion of the third circuit, the bird stopped ! Not moving standing motionless, one leg pointing straight down, the other pointing out at an unexpectedly high angle reminiscent of a Nazi salute, curses. Whenever these things happen in programming, I find despite experience, I am always overcome by the optimism of the two minute fix phase, where I find things that while not strictly correct, actually have no baring on the problem whatsoever, and after numerous mods and tests, the problem all to often remains. At such times, trust me, always go for the manual, but no, no, hack on regardless, changing and testing changing and testing. I’m not sure now if was someone turning the lights on for me as I was by this point sitting in the dark, anyway, eventually I turn to Google and before long discover that there is a bug report in for llSetPos(). Apparently llSetPos() bombs out of loops at somewhere between 100 and 200 iterations, magic. But hey-ho we are made of sterner stuff, so what’s the fix, well obviously make sure that the number of calls to llSetPos() is well within limits. I setup a simple prim in a loop that moves and reports to me, and after 50 tests I had bomb outs at 146 as the lowest and 188 as the highest, worth baring in mind. This gave me some optimism as my stork only consumed 128, but such small test samples are just misleading and sure enough it failed, at 104, but 96 seems to be OK at the moment, but do read on.

So what do you do, set it running for the two small circuits and place a sign around its neck saying please touch me to witness a short walk, no not really. I just need to find a way to reset the script, and llScriptReset was not it, instead I devised this fiendish little approach, which seems to runs OK

default{
state_entry() {
}

link_message(integer sender_number, integer number, string message, key id){
if(message=="start") {
state back;
}
}
}

state back{
state_entry(){
//call movement function
state forward;
}
}

state forward{
state_entry(){
//call movement function
state back;
}
}


At the moment I am still testing the solution, though I must say that since starting to publish this blog posting I have just looked in on old storky and it has actually failed at 96, so onward and downward in the search for a stable number. Of course I could be missing the whole point somewhere here, so if you have experienced any problems with llSetPos() in OpenSim and found a work-around then please feel free to post you comments. Otherwise I at least hope that my experience will be of some help to you.

Kind regards Vega




Tuesday, 12 October 2010

USB OpenSim tests

Following my recent post on installing OpenSim on a USB drive, which I have been continuing to use around the college with real success on both 32 or 64 bit platforms. The other day I came across a posting on http://iliveisl.com/the-need-for-speed-usb-opensim/ by Ener Hax where a number of drives are assessed for performance including frame rates. If you are thinking about this approach, then I can recommend paying a visit and having a read. Comments welcome.

bye for now Vega

Wednesday, 6 October 2010

Run Standalone OpenSim on a USB

Recently I posted a blog about my installation of openSim on a standalone machine, well I was reading through some new OpenSim postings yesterday when I came across an article entitled “OpenSim on a USB”. The article described the installation of Mowers, OpenSim and Imprudence, all running from the USB drive. I confess that for some reason I seem to have run into a few difficulties with Mowers with regard to getting Apache to stay running. After trying a few of the more obvious tweeks like paths in the conf files and ensuring that port 80 was not already being used by another app, I thought why not use Xampp, which was already on my PC and simply needed to be installed across onto the USB. After that I downloaded the OpenSim binary, unzipped and went through the basic setup including a new avatar; by the way I named my new region port-able, which I thought appropriate. Finally I installed Imprudence. With all that done, and it does take a fare bit longer for a USB. I started Xampp with Apache and Mysql services; you will need this if you wish to use the Mysql rather the standard SqlLite. With Xampp running I started OpenSim. The next part was to run Imprudence, and entered in the user details for my avatar for localhost. After a short delay, there I am standing on a small island, brilliant.
Given some of the difficulties that a few students had with getting access from home last year, a problem which seemed to have more to do with the availability of broadband and their local machine settings, this could be a really useful future option. While working on a standalone simulator may not have all the advantages of grid work, it does allow you to practice orientation, building and scripting, in private, which in itself has other advantages. I think my next move is going to be dropping the necessary download links onto a Moodle block along with a click-and-go set of instructions and see that works.

Bye for now please feel free to comment, regards Vega

Tuesday, 5 October 2010

Virtual World Roundtable

Starting back in the days of 3DML and Flatland Rover, you may remember that yourself, I guess I have been working in and making use of Virtual Worlds now for ten years. Being able to stay in touch with developments that surround the general theme of education and training is an aspect of my virtual and real world activity that I always find interesting and often surprising, particularly true I find these days of improving functionality between the virtual world and web. So I was pleased to stumble across the Virtual Worlds Education Roundtable site the other day. The name probably tells you all that you need to know about the purpose of the site and I can recommend a visit.



regards Vega

Saturday, 2 October 2010

Railway train project


Following my previous posting on getting vehicles to run reliably in OpenSim, I came across the Bungang-Isip ni Matangdilis blog the other day that featured an old style railway train. If you follow the link above you will find a short video and links to the train and smoke scripts, looks good.

Tuesday, 28 September 2010

A Hovercraft project in OpenSim

Its usual at around the summer break for me to set myself a project of some kind. This year there have in fact been a couple of little projects but for this post its about my decision to get a vehicle to work reliably enough in OpenSim that is stable enough on the one hand and use-ably fun on the other. It was during the students projects of the summer term that I first really became aware of the issues here, as one group tried it seems very much in vain to get vehicles running around without aircraft zooming of to some distant a horizon, cars flipping over onto a front bumper or boats turning turtle and plunging to the depths of the virtual ocean . Initially my approach had been to supply them with some basic SL scripts and get them to try them out, make a few changes and see which worked the best, but clearly it was not going to be as simple as that.
For my own project I decided upon a hovercraft, a bit of an easy one maybe, because it would only be running across a flat sea. I decided to use one of the scripts that my students had been playing around with and found the first thing that I needed to do was make sure that the vehicle was only going to run on water

llSetVehicleFlags(VEHICLE_FLAG_HOVER_WATER_ONLY);

In fact this very small adjustment did seem to make a difference.

I did seem to have some difficulty with the buoyancy setting, but eventually got it to settle down between session OK with a suitable value.



To have a hovercraft of course, I needed a rotor and that caused some difficulty in that the craft would be running around all over the place, so I basically copt-out of this one by using rotating textures (sneaky) but to reasonable effect.

I then installed a particle script for the spray and a suitable wav file that I found on the net, I think it was the sound of a piston engine biplane. And the results of all this you can see in the two accompanying screen shots. Not much by way of banking at the moment, so motion is a little wooden, but I am working on that.

The whole project went really well really and I am putting together a video that I will post to this blog later. If you have had any experience with vehicles in OpenSim then please feel free to comment.

regards Vega