Select blog: [setup] [lsl] [tst] [sfx] [img] [loop] [3d] [state] [bldg] [out] [vfx]

Images: textures and photos

putting up some nice pictures


Check out the links and the library and our main blog

Textures

The images that can be put on the surfaces of objects in Second Life are called textures. The library in your inventory will have many of these, and you can upload additional ones too for L$10. (Uploaded images can be JPG, TGA, or BMP format (but not GIF).)

Images can the be dragged onto an object's surface, onto an avatar, or onto particles (which we will talk about later).

Try creating a cube and dragging a beautiful texture like this one onto it (it should be in the cube you got from me or Tiplife, or you can click here to get your own copies):

MonaLisa.jpg
or this one...
MonaLisa.jpg

What happens if you put the Mona Lisa or Homer onto a sphere? Or a torus? Try it to find out!

First scripts to set a color or texture

default 
    state_entry() 
    { 
       llSetColor (<1.0,0,0>, ALL_SIDES); 
    } 

This uses the RGB way of specifying colors. R=red, G=green, B=blue, so <1,0,0> is pure red, <0,1,0> is pure green, <0,0,1> is pure blue. All the colors can be specified this way. When you have 0 of each color, <0,0,0>, is black, and just a little bit of each color, <0.1,0.1,0.1> is a kind of gray. Here is a chart with many colors specified in this way.

Since the library has the texture "Asphalt road", we can also bring that into our object and then use a script like this:

default 
    state_entry() 
    { 
       llSetTexture ("Asphalt road", ALL_SIDES); 
    } 

Maybe the "Zebra Skin" texture would look nicer than asphalt? Try it! (To use these textures, you might have to first drag them from the library textures into your own textures in your Inventory, and then drag them into your object's contents.)


Sunset spheres: a challenge

My library came with only one picture in it, a nice sunset. Make a sphere and drag this nice sunset onto its surface. Name the object "sunsetSphere" (if you spell the name exactly that way, we can use it later). Then add this boom sound that we used earlier to its contents. Finally, see if you can add this script, and then get the sunset sphere into your inventory!

default 
    state_entry() 
    { 
       llSleep(5.0); 
       llTriggerSound("boom",1.0); 
       llDie(); 
    } 
    on_rez(integer x) 
    { 
       llResetScript(); 
    } 

Why is this hard? If you are careful, you will be able to do it. (And if you don't want a boom you can use any other sound.)