User:Gimisa

From OpenSimulator

Revision as of 06:41, 16 June 2015 by Gimisa (Talk | contribs)

Jump to: navigation, search

I am opensim user and simulator operator sharing my notes so its usefull to others.  :


VOCABULARY: my understanding of the following terms.

   ARV:  Avatar Rendering Cost, a relative figure that provide indication as to the load an avatar represent. 
   Child Avatar: A number of mirror avatar creates in adjacent region. This is the mechanism by which the viewer is aware of the other adjacent regions.     
   GRID: One ore more simulator (SIM) supported by one or more robust.exe instance. 
   MOP Media on prim: the possibility to present a web page content on the face of a prim. 
   OAR: Archiving file for region. 
   PARCEL a subdivision of a region minimum size is 4mx4m= 16 meter square
   REGION a 256mx256m = 65,536 meters square area in opensim
   SIMULATOR: also call SIM one opensim.exe instance running supporting one ore more region(s).
   STANDALONE: The simulator and the supporting  services are all run from one instance of opensim.exe 
   VARREGION: a region with variable dimension. At time of writing limited to square values of multiples of regions (ex. 4x4 = 16 region area) .  



OAR.

I advocate the use of OAR for backup similarly to any other software file extension. I believe that creators in opensim shall be able to save their work as easily within their region as creating a document in word. For now you can do that with an object inworld and a opensim script command call osConsoleCommand(string command). That script command is high treat level as define in by opensim. Therefor it has to be authorize by simulator operator for parcel owner in the region simulator as follow: Allow_osConsoleCommand = PARCEL_OWNER or UUID You can also use the UUID of the simulator operator to enforce treat level and rez the object yourself for your guess to use. This script will automatically save an oar when the prim count change by more then 10 . OAR saving can also be initiated by touch. Here is an exemple of the script for such an object. :
   //gimisa@yahoo.fr 130502
   //oar saver rez on region you are owner 
   //see read.me for instruction
   //130502 add interaction with hud
   //gimisa@yahoo.fr 130120
   
   integer setup=FALSE;//Chnage to false to complete setup
   string dir="/home/gimisa/Bureau/oar/gimisa/";//the location where to sa ve the oar so your user can access it.
   //_________________________________
   key id = "598c76d4-a9d0-2fd6-0a81-fc72dca068b5";//default key 
   string idName="gimisa";
   key dtc;//detected avatar
   string region;//region name
   string cmd;//command
   integer ok;//status
   integer pcount;//number of prim cunt
   integer ppcount;//previous prim count
   integer flag=FALSE;//save oar flag
   
   //_________________________________
   integer dbug=FALSE;
   
   saveOAR(){
         region=llGetRegionName();
         ok=osConsoleCommand("change region "+ region);
         string tme=llGetTimestamp();
         llSay(0,"Region: "+ region);
         llInstantMessage(id,"saving oar " +dir+region + "."+tme + ".tgz" );  
         llSay(0, "please wait a few minutes to complete");  
         if(!setup) ok=osConsoleCommand("save oar " +dir+region + "."+ tme + ".tgz"); 
         osMakeNotecard(dir+region + "."+ tme + ".tgz","");//storgage is done by notecard name
         llSetObjectDesc((string)pcount);//count is store in object description  
   }
   
   sayPrimCount(){   
       llSay(PUBLIC_CHANNEL,
           "There are " + primCountThisParcel(PARCEL_COUNT_TOTAL) + " total prims on this parcel."); 
       llSay(PUBLIC_CHANNEL,
           primCountThisParcel(PARCEL_COUNT_OWNER) + " prims are owned by the parcel owner.");
       llSay(PUBLIC_CHANNEL,
           primCountThisParcel(PARCEL_COUNT_GROUP) + " prims set to or owned by the parcel's group.");
       llSay(PUBLIC_CHANNEL,
           primCountThisParcel(PARCEL_COUNT_OTHER) + " prims that are not set to the parcel group or owned by the parcel owner."); 
       llSay(PUBLIC_CHANNEL,
           primCountThisParcel(PARCEL_COUNT_SELECTED) + " prims are selected."); 
       llSay(PUBLIC_CHANNEL,
           primCountThisParcel(PARCEL_COUNT_TEMP) + " prims are temp-on-rez.");
       }
   string primCountThisParcel(integer flag)
   {
       vector currentPosition = llGetPos();
       pcount=llGetParcelPrimCount(currentPosition, PARCEL_COUNT_TOTAL, FALSE); 
       return
       (string)llGetParcelPrimCount(currentPosition, flag, FALSE);
   }
   
   default
   { state_entry(){
       id=llGetLandOwnerAt(llGetPos());
       idName=llKey2Name(id);
       llSetTouchText(idName);
       llSetSitText("-");
       llSetTimerEvent(1.);
    }
   
    
   touch_start(integer num_detected)
   {  dtc=llDetectedKey(0);
      if ( !(dtc==id | dtc ==llGetOwner())) {
      llSay(0, "sorry but only "+ idName + " can use this");
      return;} 
            
   sayPrimCount();//say in open chat prim counts of the sim 
   saveOAR();//save oar
   state wait;
  }
  timer(){
     llSetTimerEvent(1800.);
     ppcount=(integer) llGetObjectDesc();
     primCountThisParcel(PARCEL_COUNT_TOTAL); 
     if(pcount==0) return;
     if(ppcount==0){ ppcount=pcount;llSetObjectDesc((string)pcount); }
     if((pcount-ppcount>10 | pcount-ppcount<-10) && !flag){flag=TRUE; llSetTimerEvent(60.*15.);return;}
     flag=FALSE;
     llSetTimerEvent(3600.);
     if(!(pcount-ppcount>10 | pcount-ppcount<-10) )return;
     sayPrimCount();//say in open chat prim counts of the sim 
     saveOAR();//save oar  
     }
   }
   
   state wait {
        state_entry(){ llSetTimerEvent(5.0*60.);}
   
   timer(){ llSay(0,"will appear on FTP when complete");
        llSetTimerEvent(0.);
        llLoadURL(dtc, "OAR FTP SITE", "ftp://where.to.access.the.oar.file"); 
        llResetScript();}
   }


You can find a free copy along with a tutorial about oars and the object oarsaver in the little grid I operate for testing purpose call gimisaOS. You can reach it via Hypergrid using your viewer map with search for 3d.gimisa.ca:9000

MOP.

Media on prim can be very interesting. The way to add a media on the face of a prim is straightforward selecting a prim face in the build tool and then activating the media of choice in the texture tab media selector ( varies with viewer). Se tutorial in gimisa5 tutorial area for more detail and picture. You should display a picture of some kind ( you can use the same prim by texturing it) as default texture to illustrate to your visitor that you are using media on prim. Most viewer disable the auto play of media prim forcing user to seek them for display. The advantage of Media on prim is that it has no impact server side since the viewer is handling the request via its internal browser. Please note that the view is asynchronous. Specially if video it meaning that what you see is not what other will see or hear on the same prim face. Just like if you are visiting the page by yourself on the web. The web browser in viewer is Mozilla compatible with QTWebKit. Therefor it has NONE of the HTML5 capabilities.
I am using MOP to overcome the sound limit in OpenSim. A sound file play in world is limited to 10 sec per file. One Technic use to overcome that limit is to cut a longer sound file in 10 sec sections and to piggy back the set with a proper script . That has a detrimental effect on your region cause of the bandwidth required to send the sound file in this way. The advantage is that the sound is heard by all avatar in the vicinity.
The way I use to do that is via MOP. The sound file can be built from any mixer software you like and can have any length. The trick is to convert it to swf (flash) so it can be compatible with any operating system (mac, window, linux ) . There is a number of online converter that will be fine for the job. The file need to be accessible to the web. That is a serious limitation to causal users unfortunately comment on the later as to how to do that direcly in opensim would be nice. Then you need a wrapper in the form of a standard web page with the following embed tag. <embed src="http://locationOfYourSoundFile/Here.swf" width="100%" height="100%" type="application/x-shockwave-flash" loop="false" autostart="true" > Sorry your viewer does not support flash (swf) </embed>
As a useful alternate in case your user viewer does not support swf is to provide a hyperlink giver on touch of the prim pointing to the same web page. In this way a HTML5 code wrapper can be use in your web page as follow:
<audio controls autoplay> <source. src="myOriginalFile.mp3" type="audio/mpeg"> <embed src="http://locationOfYourSoundFile/Here.swf" width="100%" height="100%" type="application/x-shockwave-flash" loop="false" autostart="true" > Sorry your viewer does not support flash (swf) </embed> </audio>
You can get a demo of the effect of this trick by hypergrid visiting 3d.gimisa.ca:9000 and search for gimisa4 region in map.



ARC.

The load an avatar represent in being rendered is an interesting figure to be considered by user. For local or hypergrid traveling the impact of the integration of avatar in the region scene is more or less loosely represented by that figure. This relative amount can be use comparatively as a guide for the amount represented by the avatar in rendering effort. In general the travelers should pack the avatar with as little as is needed to make a personality to minimise the load the region they are visiting. This is as much to have a pleasant experience for themselves as to help the experience of other by the same principles . They can put in their suitcase the travel avatar and the regular flashy model for convenience so they could switch while they traveling if they are in need to go to something more .
A good tool to judge the weight of one avatar is to use the avatar rendering cost display available in viewers. When activated with shortcut key ctl-alt-sht-C you are displayed a number over your head as well as avatar surrounding you . When green the avatar is good to travel. Yellow is limited while RED is no no. Its an interesting experience to make to remove part of an your avatar outfit and see the impact on that display. Good outfit part does show not only by the look they provide but also by the weight they represent for that results.
People should think about how much a traveling avatar has to transfer to the other grid (HG travel) server and how much information the region server has to handle to render the result they and other in the vicinity sees. This is all their texture, mesh and prim to be added to their scripts compiled. The few second required to render see a lot of activity both in the robust server and the region servers. This time is spent to acquiring that information (prim scultp mesh shapes , textures, compiled scripts) . The result is use to create the rendering information for the avatar and its numerous child avatars in the region and adjacent regions for the new arrival (max of 9).
More about avatar rendering cost calculation and detail can be read on "http://wiki.secondlife.com/wiki/Avatar_Rendering_Cost"



CHAT_BOT.

I use a number of way to interact with visitor. Making the visit more interactive can be a challenge to try to make the visit more interesting. Scripting provides the tool to do that and touch is the perfect function to trigger interactivity while not causing annoyance. Its also low on lag so this is my interactive function of choice. AIML is the language to give brain to your chat bot. Its interest is in the apparent two way communication it provide much like natural languages. There is script to do that inworld in lslWiki but scripting memory is too limited to do a good job so external service is required. I have tried that and will come back to it later.


What I found more intuitive and accessible using the dialogue blue box tool also offered with scripting . It is possible to construct with it a rather easy two way communication in the form of multiple choice discussion. That way is less interactive then a true conversational discussion but can be as attractive as a story book where you are the Hero. Using OSL notecard feature one can rig a notecard to provide for extensive exchange with the visitor. The line length of the OSL card is 1024 bytes ample for supporting multiple choices and trends in the discussion. The visitor reads the story line and make one choice out for the continuation. I use three choices the story direction can take but that is an arbitrary limit. And while at it why stopping to chat lines. The same tool can be use to give interactively on demand in a more natural way. For LandMarks and objects. Add to it wave files and you have voice recording of your story to tell . Give choice of language and you have a rather interesting interactive feature pack. A demo and code of that way of using interaction in opensim. You can reach it via Hypergrid using your viewer map with search for 3d.gimisa.ca:9000 gimisa5 region

Hope it helps 150616

Personal tools
General
About This Wiki