I've always loved birds and bees and love to make them. This bee was inspired by this sign I saw at the Texas State fair:
I'll show you how to make a bee that gather honey from flowers, and takes it back to a hive. This project includes several neat tricks I've learned:
1) It uses non-physical movement, so it is very low lag. Except for a small burst of script activity every 5 seconds, this script uses few resources.
2) It works in OpenSim thanks to a neat replacement for llLookAt(). If you are a scripter, you will love the function face_target().
2) I created a very fast wing-movement effect that create no server-side lag at all, even for very high wing rates. This is the same trick I have used in my fairies and hummingbird projects, and now you will know how the trick works. I've never seen it published before, and I have only seen it used once on a (rather expensive) set of butterflies.
The first, and easiest thing to make is a beehive. This beehive is a single, unscripted prim. It is hard to get any lower lag than that!
Right click and save this texture to disk. Upload it to Second Life.

Make a prim and set it to type = Sculpted, and drag the texture onto the Sculpt Texture window.
You should get a beehive shape:
Right click and save this texture to disk, and upload it to Second Life.

Apply this texture to the texture window:
Name this prim to 'Beehive'. It must have this name for the bee to find it.
Make a prim and set it to type = Sculpted, and drag the texture onto the Sculpt Texture window.

You should get a bee body shape:
Now upload and apply this texture to the body:

You will get our "Spongebob Squarepants" bee face:
I chose to make my bee rather large so it is easy to see. I also exaggerate it's features, partly for cuteness, but also to avoid the 'uncanny valley' effect.

If you want to know more about this fascinating subject, check out the article at wikipedia.
This next section uses a neat trick to make an animated eye blink.
First, upload this texture to Second Life. I made this using Animator, which is part of PaintShop Pro. You can get a copy of this tool in my download folder if you want to make your own images of this type. I made a set of 4 images of an eye, and added the eyebrow shade individually. These 4 images are made into a animated GIF, then made back into a flat texture using Gif2SL by Gonta Maltz. How to use these tools is explained in another post, Create-Gif-in-Second-Life

Now make a prim, type = Sphere, and add the texture to the Object Tab along with this script:
The eye script:
default
{
state_entry()
{
integer nTextures = llGetInventoryNumber(INVENTORY_TEXTURE);
string texture1 = llGetInventoryName(INVENTORY_TEXTURE,0);
list data = llParseString2List(texture1,[";"],[]);
string X = llList2String(data,1);
string Y = llList2String(data,2);
string Z = llList2String(data,3);
integer sideX = (integer) X;
integer sideY = (integer) Y;
float speed = (float) Z;
llSetTextureAnim(ANIM_ON|LOOP,ALL_SIDES,sideX,sideY,0,4,speed);
llSetTexture(texture1,ALL_SIDES);
}
}
You should see the eye start to blink:

Now you can delete the script. ( See, I told you it was low lag! )
Now shift copy the eye and place it and shape it to bulge out from the head:
upload this texture to Second Life:

Make a prim, type = 'sculpted', and apply the texture to the sculpt texture window:
I colored my legs black, then slid them under the bee body:
This next sculpt is one of the best ideas I have ever had, and you get it for free. This extremely useful sculpt took me weeks to create. It is an X-shaped wing sculpt designed to make wings using an "animation movie" script.

This specially shaped prim allows a movie to be played on it. The movie will play entirely on your client, and so it has no server lag at all.
I made this 8-sided sculpt in AC3D. It took a lot of experimenting to make ( the file is the 14th one I saved, and there were countless undos in between those 14 saves.)
It looks like this in AC3D.
Once you have uploaded the sculpt map to Second Life and added it to a prim, it should look like this:
Now save, upload and apply this texture to the wing sculpt:
Be sure to click this image and get the larger resolution image that results.
And then add this script to the Object tab:
default
{
state_entry()
{
llSetTextureAnim(ANIM_ON|LOOP,ALL_SIDES,1,2,0,0,10);
}
}
Your wings should start beating 10 times a second. You can change the rate they beat by editing the last number '10' in the above script.
Now you can delete the script. ( See, I really did tell you it was low lag! No script = no lag, as these are entirely client-side effects performed by OpenGL magic in your video card)
For those of you who want to make your own wings, here is a template you can use. Just follow the pattern in my bee wing with your own wings. Each wing is 128 pixels wide and tall, the overall image is 1024 X 256.

Here is an example butterfly wing:

Select all the prims in your bee, and click and unclick and click again on the legs so that the legs are the last thing clicked and highlighted. Now press Ctrl-L to link them together.
You will need one or more flowers for your bee to fly towards. As far as this bee is concerned, a suitable flower is any prim named 'Flower'. If you already have pretty flowers with mod rights, just rename them 'Flower'. If the flowers are no-mod, rez a small box, name it 'Flower', and make it invisible by setting the texture alpha to 1.0. Place these boxes wherever you want your bee to fly.
Don't have a flower? Here is a texture you can apply to a flat box to make one.
Make a box, flatten it, and set it to 100% invisible. Select the large face, set it back to 0 transparency, and apply the texture. Repeat for the other side.
You can add more of these prims in an X shape to make a better flower.
Just be sure to have at least one out on your land, and name it "Flower"
Now it is time to fly your bee!
You will need two sounds and a script.
Buzz1 and Buzz2 are different bee buzzes. Save these wave files to disk, and upload them to Second Life. I put them into a zip file because saving wav files is harder for some browsers than saving images. The two sounds must be in the prim Object contents along with the script, and they must be named buzz1 and buzz2.
Now add this script:
// Simple Bee script to locate and gather pollen from all prims named "Flower" then returns to the Beehive"
// Requires 2 sounds buzz1 and buzz2
string FLOWER_NAME = "Flower";
string HIVE_NAME = "Beehive";
vector offset = <0,.10,.1>;
vector hive_offset = <0,.5,0>;
// This is an OpenSim compatible llLookAt()!
face_target(vector lookat)
{
rotation rot = llGetRot() * llRotBetween(<0.0 ,0.0 ,1.0 > * llGetRot(), lookat - llGetPos());
llSetRot(rot);
}
default
{
state_entry()
{
llSetTimerEvent(5); // move every 5 seconds
}
on_rez(integer p)
{
llSetTimerEvent(5); // move every 5 seconds
}
timer()
{
llSensor(FLOWER_NAME, NULL_KEY, ACTIVE|PASSIVE, 15.0,PI);
llSetTimerEvent(0);
}
sensor(integer numDetected)
{
integer i;
string name = llDetectedName(0);
if (name == FLOWER_NAME)
{
for (i = 0; i < numDetected; i++)
{
llPlaySound("buzz1",1.0);
vector new = <90,0,0> * DEG_TO_RAD;
rotation r = llEuler2Rot(new);
face_target(llDetectedPos(i));
llSetPos(llDetectedPos(i) + <0,0.1,0>);
llSetRot(llDetectedRot(i) * r);
llSleep(4);
}
llSensor(HIVE_NAME,NULL_KEY,ACTIVE|PASSIVE,15.0,PI);
} else {
llPlaySound("buzz2",1.0);
vector pos = llDetectedPos(0);
face_target(llDetectedPos(0)); // face beehive
llSetPos(pos + hive_offset);
vector new = <90,0,0> * DEG_TO_RAD;
rotation r = llEuler2Rot(new);
llSetRot(llDetectedRot(0) * r); // orient to it
llSleep(1);
llSetPos(pos ); // move in
llSleep(10);
llSetTimerEvent(2);
llSetPos(pos + hive_offset); //move out
llSleep(1);
}
}
no_sensor()
{
llSetTimerEvent(15);
}
}
Once you put this script in your bee, it should sit for 20 seconds. It will then fly to the nearest flower, face it, and gather pollen. After a few seconds, it will move to the next flower. When it is finished, it will fly to the beehive, and disappear inside.
Troubleshooting:
If your bee flies backwards, edit it and turn the legs around.
The maximum distance your bee will fly is 10 meters in radius.
Back to the Best Free Tools in Second Life and OpenSim.