Showing posts with label OpenSim. Show all posts
Showing posts with label OpenSim. Show all posts

Thursday, August 8, 2013

A Tide Pool in Kansas?

Ocean life has always held a fascination for me, something I suspect is not uncommon among those of us who end up as biologists. My mother gave me some of Rachel Carson's books, the The Sea Around Us, The Edge of the Sea and several trips to Cape Cod imprinted the smells, sites and creatures of the sea. So of course as part exploring Blender and mesh had to make something with tentacles. I didn't think I was ready to tackle squid or octopuses so decided on sea anemones. Easy enough right...well it took 2 days to get something that looked sort of like a sea anemone.

Here are three of my attempts. My first attempt is on the left and my latest attempt is on the right.



 The first attempt was not meant to be realistic and I had all sorts of trouble with painting the seams out. Both the second and third attempts are more realistic, which ironically was easier than what I tried to do in my first attempt.  The tentacles were done using extrude, scale and translate tools in the mesh editor. There are I think other ways to do tentacles but I decided to stick with the the tools I best understood. The last one is still has some seam issues but pretty minor.

Of course I had to make my own little tide pool. Which resides some where in the cloud or mirrored to my home machine, alas in-silico.

Tuesday, July 30, 2013

Building is Theraputic



Slowly my Kitely world is taking shape as I get better at using Blender.  Just about very object in in this view except for the blue landing pad is made from mesh. The little purple flowers were actually pretty challenging for me though I am sure more proficient people could probably make these much more easily than I currently can. You can just make out a pink bridge that I threw together yesterday...OK so it did take me an hour to figure this out.

Here is a better view of the bridge:


Saturday, July 27, 2013

Framework for a tree

Yesterday I decided to try something a bit more ambitious in mesh-namely to make a tree with blender. So I started with an isododecahedron sphere and uses a series of selects, extrusions, and rotations came up with this framework. I didn't texture it but simply added a reddish material since I was more curious as to how well something like this would be handled in Open Sim. No problem as it turns out.



Here is my tree's framework on my Kitely test site.  Hopefully I can get to the leaves soon.

Friday, July 19, 2013

Adventures with OpenSim

At various times I have dabbled with OpenSim but in the past kept returning to Second Life but I have been taking a second look now that Open Sim has matured. First of all it is now really possible to have your own private world and I plunked down the $20.00 for NewWorldStudio's OpenSim generator. It has bugs being still in beta, but Hey I have my own private World for 20 bucks with 100,000 or so prims as opposed to my region in SL which costs 40 bucks a month.

I still haven't figured out how to link my private world to other grids-NewWorldStudio's connectivity test shows it as public but since I use this region to experiment with mesh and physics...well maybe I don't want any visitors just yet. But I did learn about OAR files. More on that in a bit.

Speaking of mesh-finally a reason to learn a bit about Blender. I have used sculpties but found trying to do them in Blender a bit temperamental so ended up using one of the SL tools for doing sculpties. So on to mesh. I like doing mesh but one nut that I hadn't cracked in a couple days of scratching was how to how to get the textures to render in the dae files that Blender exports and SL and Open sim support.  I had to grasp the concept of materials and also didn't notice the little check boxes in Blenders .dae export menu relating to exporting textures as well....duh.

One development I really in pleased with the Kitely. I had read about this company and its new business model and really low rates...so I plunked down money for their Bronze plan. Gives me a free region and costs 5 bucks a month. OK 5 bucks a month is definitely better than 40 bucks a month for what, an 8th of a region? Plus getting back to OAR files for just pennies I could upload an OAR file and even better can modify the terrain! How cool is that. That world is private for now. I can go public for 20 bucks a month...still a lot better than SL for the money.

Oh and it gets even better! Imagine my delight when I exported my world's OAR to my home machine and loaded it into OpenSim using NewWorldStudio and was able to watch my NWS World take shape in my viewer. How cool is that!  Now if I could only use a common AV look across all Worlds...At any rate the picture shows me in the NWS version of my Kitely World. One giant sandbox. Presumably I can go the other way as well but haven't tried that yet.

Tuesday, July 26, 2011

More on Avination

My initial enthusiam for the $40 price for a sim is a bit tempered by a couple of limitations in Avination. The first is minor-namely it doesn't seem to support SL's media on a prim idea. In SL I am used to being able to have my blogs and my Flickr site open on prims so that I can at least see what's going on. The second is a bit more surprising given the OpenSim background of the owner, namely that Avination does not support OpenSim specific functions some of which are really cool especially the texturing functions.

On the plus side my inquiry about OS functions was quickly answered by their support staff. I also like that you can import prims that you own from SL using the Avination viewer, including scupted prims as my picture shows. Just be aware that it doesn't seem possible to import the scripts in the object- you have to do that separately or use Stored Inventory as explained here.

https://www.avination.com/support/faq/creation-inventory.html

Of course Second Life is not sitting still what with pending rolling out of mesh and if you haven't noticed realistic shadow rendering like that in Blue Mars. Since Avination is billing itself as content creator friendly, I wonder how the introduction of mesh in SL will affect Avination.

Who knows, I may ultimately find it cheaper to set up my own Open Sim server, and link it to OSGrid. Not that I have ever done anything like that mind you. Hmm as cheap as computers are today...might be worth it to take that plunge.

Saturday, July 23, 2011

An Alternative to Second Life?

Somehow I keep getting side tracked. Today I stumbled upon a new virtual world grid based on open sim called Avination and of course checking this out took precedence over cleaning and reorganizing my study.

Avination according to its website was started by an OpenSim developer, Melanie Thielker who has created her own "spin" on Open Sim. See https://www.avination.com/inside-avination/management-team.html for more information about Avination's Staff.

Now I have invested lots of time and energy in Second Life, including on my college's land. Unfortunately Second Life has doubled educational fees for a ful sim to around $4,000 which has my IT people really nervous. Avination right now is advertising full sims with 15,000 prims at the special price of $60.00 a month. Hmm in SL I am at the $40.00 tier level which means I am paying about 6 times what I could be paying in Avination.

Well even a virtual lady can't resist a bargain so I went on over. Joining is easy and similar to Second Life in that you choose your own first name and then select a second name from a predefined list and select your basic avatar form. One slick thing is that Avination has terminals in Second Life. (Wonder if Linden Lab knows about this.) You can go there and use the terminal to assign your Second Life AV name. Which I did right away. You don't get to share your inventories or your appearance but when you log back in to Avination your SL profile name shows in place of your Avination AV name. The system is like SL's new double naming system so my Avination name still shows on my profile if you click on the Avatar.

You can use SL viewers for Avination but I choose to use the Avination viewer. This viewer is clearly based on the SL viewers but is a lot more like the older 1.2 series of SL viewers wth some things out of SL 2.X viewers. Just about everything should be familiar to veteran SL users. I have not had a chance to try any scripting but Open Sim's version of LSL typically has some things on it that are not found in SL's language so I would be suprised if all my scripts will always work.

Buying land. Unlike SL it looks like the best thing to do is buy a whole sim. In fact the map is set up as a huge grid and you pick your sim and which one of a limited number of configurations you want and buy the sim using one of several methods including Paypal.

The advertisements have a promotional code so you might watch out for that. A sim is $40.00 a month for the first three months and then goes up to $60/month. Mmmm sounds to good to be true even at $60 a month but the lure of the bargain was too strong so I am giving it a whirl. I am sure there are some limitations in terms of flexibility and service...we shall see. Supposedly I can port my SL objects to Avination-assuming I have permissions on the objects so we shall see. Probably can't port my nice Kimono collection though.

I had my sim within 5 minutes of the transaction. Seeing all that sunny empty land is a bit intimidation as I have always lived in the mainland in SL. By the way there is apparently no sort of division between PG, Mature and the "Dark side" but you can control access to your sim just as in SL. So I figure at $40 bucks a month for three months this is worth a try.

One risk is that this is a small company-when I was on there were about 850 users online (SL might have 60K users online at the same time) so that perhaps adds a bit of premium to SL. Avination has it's own currency(C$) I haven't compared it closely, but it looks to be valued roughly the same as the Linden. I bought 2,000 C$ for $8.00 so I can upload textures and files. Uploading costs are 10C$ per upload.

I am not ready to give up my SL account so you still find me in Carmine at http://maps.secondlife.com/secondlife/Carmine/137/181/144

More to come.

Tuesday, March 23, 2010

Evolution Simulation IV: Mutating critters at last!

As noted in my last post I was finding all sorts of problems with my region. Turns out that these were due to two things. First to control my critters I was killing them off bu broadcasting a commmand that triggers the llDie() function. But too many prims dying at once was messing up the asset server.

Also I was duplicating the critters en mass and that I led the server to treat my critters as the dreaded grey goo. Grey goo is a term for excessive rapid self replicating prims. See this discussion of the origin of the term from nanotechnology. When Second Life, and apparently OpenSim as well, detects too rapid prim replication this is treated as grey goo and a defense against this called the grey goo fence is activated.

Open Sim apparently doesn't warn you about this and I only discovered the problem when experimenting with my critters in Second Life. Second Life does warn you about grey goo and I got the warning rezzing even a small number of critters at once. Apparently the limit is about 240 rezzings in 6 seconds. Beyond that the ability to rez those prims is restricted. My inadvertant experiments suggest that in SL the limit may be more stringent than 240 rezzings in 6 seconds.

See http://lslwiki.net/lslwiki/wakka.php?wakka=GreyGooFence for a discussion of Grey Goo and the Grey Goo Fence.

This last week I worked out how to input and represent the critters genetics and the mutation routines. In my earlier systems I had the critters read their initial genetics from a note card. Instead I use the object description field to enter and store the genetics as a string of integers.

Right now the description field has 4 digits

position 1 = "1" or "2" "1" = haploid "2" = diploid. Right now the critters are strictly haploid so this position is ignored for now.

Position 2, 3, 4 are three loci each with 9 possible alleles represented by single character "0" through "9". For the haploid critters, this means there are 1,000 possible genotypes.

Since I mean my evolution simulation to be visual the genotypes in the three loci are used to make a vector that can be used with the llSetColor function.

So in the object description field the legitimate genetic description would be
"1045" . When a new critter is rezzed, the description can be passed to the offspring through the parameter in the llRezObject function.

I also wrote a mutation function:

string mutation(string start, float mforward, float mback)

Where the string is the genetic description, mforward and mback are forward and back mutation rates going forward to the next allele and mback the back mutation rate to the previous allele. So I assume if the allele is "7" then forward mutation would lead to a change to "8", and back would change from "7" to "6".

In addition another function setcolor(string thedata) takes the genetic string, isolated the loci and uses them to set the color of the critter and display the genetic description as using llSetText. I did this because just as in real populations most of the genetic variation leads to subtle variation in the population phenotypes over the short run.

The image shows the results. The critters started out with the color <.9, 0 .9> which sort of a light bluish green. After 4 generations of mutations if you look at the image you can see subtle differences resulting from successive mutations.

The critters still don't really interact with each other and wander around randomly, but not leaving my region. I did some work streamlining this routine so it was much more efficient.

Next up....adding simple natural selection to the mix.

Monday, March 8, 2010

Evolution Simulation III Devastation in Science Sim!

Well not quite. But I was testing my critters to see how big a population my parcel in Science Sim could hold. Everything was fine until I went to delete them using a listen event with llDie triggered by a chatted command. Guess what, 600 prims dying all at once causes the asset server to have a fit: a bit disconcerting but Mic Bowman got things fixed....




And immediately after Mic's fix:

















Thigs were still loading at this point. What Mic recommended is that I use a random number to determine when a particular critter is going to die so that when I issue the command to die the critters don't all die at once.

In SL this bit of code gives a quite realistic movement for my critters:

vector newpos = newcoodinates(llGetPos() ,3.0);

llSetRot(llEuler2Rot(<0,0,-pi/2>)*llGetRot());

llLookAt(newpos,1,0);

llSetPos(newpos);



But in OpenSim the critters don't seem to turn toward the target in response to llLookAt as they do in SL.


Saturday, February 20, 2010

The Selfish Herd: OpenSim Evolution Simulation II

Been a bit distracted by academics but this week worked a bit on my evolution simulation. First I put limits on my critters so that if they escape my parcel they die. Next I set up a controller that uses or at least attempts to use llGetParcelPrimCount in a timer event to count my organisms and kill them all if the population grows beyond a certain size.

The script is straightforward:

But the script does seem to update the prim count properly in OpenSim unless I touch the prim with the script. What's weird is that I have used a very similar script in SL and it updates fine.

The other thing I have been working on is the duplication script itself. I am using the basic script givenn in the LSL Wiki at this link.

http://lslwiki.net/lslwiki/wakka.php?wakka=ExampleSelfReplication

This gives a pretty complete list of precautions if you want to make self replicating critters. So should you decide that you need some sort of self replicating critters pay real close attention lest you get the grey goo.

Right now I have the basic replication scheme worked into my code but right now the critters replicate only on a command from me...so they are on a pretty tight leash. The picture accompanying this post is after 8 doublings from a single critter. My critter sensing prim did not pick up that there were more than 128 critters so it is good thing I am not letting these things replicate on their own! The critters remind me of a herd hence the Selfish Herd after W. D. Hamilton's famous paper: Geometry for the selfish herd. J. theor. Biol. 31:295-311.

Thursday, February 4, 2010

OpenSim Evolution Simulation I

This is the first progress report on what's going on with my OpenSim Artificial Life/Evolution simulation introduced in this post.

Since I am interested in social behavior I think a good place to start is simulating a population where prisoner's dilemma is operating. The term "game" here used in the game theoretic sense, gets its name from the following scenario:

Two suspects are arrested by the police. The police lack enough evidence for a conviction. The prisoners are kept separate and the prosecutor visits each of them with the same deal. If one testifies (defects from the other) against the other, and the other remains silent (cooperates with the other prisoner), the betrayer goes free and the silent accomplice receives the full 10-year sentence. If both remain silent (they cooperate with each other), each gets only six months in jail for a minor charge. If each betrays the other, each receives a five-year sentence. Each prisoner must choose to betray the other or to remain silent. Each one is assured that the other would not know about the betrayal before the end of the investigation.

(modified from http://en.wikipedia.org/wiki/Prisoner%27s_dilemma)

Now this scenario may not seem related to evolution but it turns out that this is exactly the sort of thing that happens when two animals related or not might have choices to cooperate or not with other animals either of the same species or sometimes other species.

A couple of design issues revolve around topics like how to link the organisms' behavor to genetics, represent the genetics of the interacting organisms and how to pass that genetics to offspring. To get a feel for the general strategy I have used in the past, go to this post.

One new technical issue is that unlike my genetics activities and my discrete generation evolution simulation, the organisms I am using here have to be able to replicate themselves independently of some command from me. Now that a scary thought since I don't want to over run a sim with thousands of little evolving critters.

Fortunately the LSL Wiki gives a good rundown on how to make non invasive self replicating critters. For instance have them be killed if they get out of your parcel. Right now my critters are able to detect the parcel boundary and turn away from the boundary....but I will add the kill feature as an additional safety.

One of LSL's safety features isn't going to work in my case. LSL recommends using a counter that is decremented by 1 each time an offspring is replicated from the parent. The value of the counter is passed as the integer parameter in the llRezObject function and when the counter reaches zero say after 10 generations the critter dies rather than replicating. The problem is that I use this parameter to pass the genetics from parent to offspring.

So I need to figure out how to prevent non invasive critters from over running my parcel. My first impulse was to have each critter sense the number of critters in the parcel and stop them from replicating when the parcel count gets to a certain point-kind of a parcel carrying capacity. And that might be a good idea but the simplest way to do it might be to have one object track the number of critters in in the parcel and periodically send that to all the critters using llRegionSay on a private channel and have the critters individually adjust their replication as required.

A more interesting option might be to use a sensor event to get the number of critters in a set radius around the sensing critter and use that to adjust the rate of reproduction, perhaps make it negative. So critters in a region with few others would be able to multiply more rapidly than those at higher densities. I already use a sensor event to let the critters detect each other so I could modify that to do this as well. This would actually be quite realistic since organism's reproductive rates are often affected by density dependent factors.

So here is what I am thinking on the replication issue:

1. Implement a die if beyond land owned by me along with my current boundary detection routine.
2. Implement a central controller that determines how many critters are in my region and either kills them all or stops them from reproducing further if they get too numerous beyond some large population size say 4,000.
3. Implement the sensor option to determine the density of critters and adjust the rate of local reproduction. Should be possible to tweek this so the population's maximum would tend to run at a lower limit than 4,000, say 2,000.

Maybe I am being paranoid but who knows what sort of chaotic things can happen with 2,000 artificial life forms run around a sim unchecked. It would be the equivalent of pythons in the Everglades and probably really annoy my neighbors.


This may be interesting in its own right as a simple population growth model even with out the complication of prisoner's dilemma! If you want to join the fun and see what's going on, IM me as Paul Decelles in ScienceSim or as Simone Gateaux in SL . Remember, you need to configure your client for OpenSim and set up a user account. Also Avatars do not port between SL and Opensim.

The ScienceSim site will get you started.: http://www.sciencesim.com/ Make sure you read and follow the directions and rules carefully.

PS: SLurls don't work in OpenSim as far as I can tell but if you are in OpenSim I am in
Oregon North 47, 184, 23 in the ScienceSim grid.

Saturday, March 21, 2009

OpenSim and INTEL's ScienceSim

A group from INTEL has been busy setting up a virtual world called ScienceSim using OpenSim and so over the last few days I took a little look. First about OpenSim: OpenSim can use a scripting language based on lsl and indeed you can use the standard SL viewer for OpenSim sites. However OpenSim is not centralized as is most of SL but is run on servers owned by different people and groups.

According to the OpenSim wiki, OpenSim:

  • Supports creating multiple 'worlds' in a single application instance.
  • Supports multiple clients and protocols - access the same world at the same time via multiple protocols.
  • Extensive ability to customize your avatar, both with custom clothing, skins, and attached objects.
  • Realtime Physics Simulation, with multiple engine options including ODE, PhysX, Bullet and more.
  • The ability to create content real time in the environment using in world building tools. What you see is what you get.
  • In world application development using a number of different languages, including LSL/OSSL, C#, JScript and VB.NET

You can have your own virtual world offline on your own computer or link a server so that people from the outside can visit. Plus its free and you don't have to pay $L to anyone. So let's see, I am at the $40/month tier so that means I pay $480 + $88 or $568/year so maybe it would pay to use my tier money and get my own server and load OpenSim. Also OpenSim has some really cool extensions to LSL. Check these out.

Of course the flip side is I have never run my own server and OpenSim is buggy at least when using the current SL client so it would be very difficult to bring freshmen or sophomore students into an OpenSim region. For example I had great difficulty teleporting and my avatar sometimes would not be easily controllable. How much of that is due to problems with the software vs the servers and connections is not clear to me. As an alternative to the SL viewer you can use a viewer called Hippo.

First getting there- You need to set up an account via the ScienceSim adminstration page. But read these instructions and follow them carefully. You will need to make another copy of your Second Life shortcut, rename it and change the target. Remember that OpenSim is not Second Life so that you need to register a new avatar. ScienceSim prefers that you use your real life name for your avatar; I chose to register Simone again since I am not working in ScienceSim's grid but did register with my carbon based world name.

When you open the log in page, the left hand side has a list of regions run on private servers linked to the ScienceSim grid but I recommend just logging in. It may look at first like you are going to Second Life but you are not!










When you first launch your viewer to enter ScienceSim, you get a default female avatar which you can customize just as in Second Life. But while visiting ScienceSim decided to keep things simple. So here I am rezzing at ScienceSim's orientation site which serves as your default home.

There are four regions in the main ScienceSim grid Galileo, Kepler, Newton and Einstein, the world map is shows just those four regions. However there are currently 46 regions in total as shown here, which is a bit confusing. But it makes sense when you consider that these other regions are not really set up for the most part for public display but used for visualizing scientific data.

Here are some various screen shots I took on my first visit:

Einstein Region














Kepler Region














Newton Region. This shows part of the amphitheater. There also an observatory build in ScienceSim from where you can teleport to some of the other regions connected to the grid.











There is kind of a fun marble launcher and several other goodies like that in the main grid but right now there is not a whole lot to see.

Since I am a biologist I was particularly hot to see some of the biology being done there and sent an inquiry to the site master and got a nice response inviting me to the user's meeting on Friday. Unfortunately people got really confused as to what time the meeting was so it really didn't happen as scheduled.

However I did find a friendly group of users and they invited me to join their discussion and then later on met some other users at the amphitheater. They use Skype for much of their conferencing so I had to download and set up skype on my machine but that was pretty painless and the sound quality was excellent, much better than SL's voice.

One of the people I met is Aaron Duffy who a grad student using OpenSim to simulate the population genetics of ferns and since some of my training is in population genetics, was interested to see that. So today I went back and he graciously gave me a tour and demo of his work which is just starting. His project superficially resembles the ecosystem working group effort in Second Life, in fact Aaron got onto his project from exposure to that group.

This is Aaron and in the back ground are shown the 3 basic stages of the fern life cycle. The tall structure that is not entirely in the frame represents a sporophyte. The upside down "hat" to the left of sporophyte stem is a gametophyte and the brown ball partially hidden by Aaron is the spore which of course is produced by the sporophyte. Guess what gametophytes produce. Hmmm.

His simulation tracks the details of the genetics of the population as the population evolves over time. So for me this was really neat to see. Right now he is working on interpretative slides to make his project more understandable to non population genetics geeks.