25 September 2011

Release Viewer, Masks and Shadows


If I'm wearing an avatar mask that makes the entire avatar invisible, I have no shadow.

If I wear a mask that covers part of the body, that hidden part appears on my shadow. Notice the pants legs, and the feet.

23 September 2011

Boosting the signal

Current list of viewers supporting mesh.

Viewer hair + shadows glitch

I was very excited today to realize that when I turned shadows on (in the release viewer) I was both seeing shadows and not seeing my alpha textures disappear! Pictures! With both hair and shadows! Squee!

But then I saw this... Noooo! What is this strange glitch around my avatar's head?


I began experimenting. It didn't appear on all my outfits. So I began taking thing off... No help there. But that shape was so familiar...

Aha! That's the shape of Ruth's hair! But why?

There's three ways to do bald hair.
1. Pull all the default hair lumps and bumps into your skull.
2. Use a transparent texture as the hair texture.
3. Wear an alpha mask that hides the default hair.

Some of my outfits use #2, and those were the ones that have the mysterious glitch. The solution is to either change your default hair to one that pulls all the hair lumps inside your head, or wear an alpha mask that hides default hair. Making an alpha mask that hides the default hair is much easier (just check the hair box when editing the mask!) so that's what I did.

The glitch does reappear when I've got the outfit in EDIT mode, but when I return to normal mode things look right again.

21 September 2011

H is for HTTP: Alphabet Game

HTTP with lsl

You can use llHTTPRequest() to get text information from the web. The free landmark HUD I offer uses it.

You can also run a http server inside the grid. Note the section about URL lifetime limitations! If you're doing anything beyond light testing you'll want to explore a URL-mapping service so sim reboots don't break your code.

20 September 2011

G is for Greyscale: Alphabet Game

Greyscale and 'tint' textures

A lot of people use greyscale tiling textures and gradients for texturing metal objects, but they're useful for more than that.

If you're looking to lessen lag on a sim or other large area, consider experimenting with prim color. If you make greyscale or tint textures (sepia, cool blue, etc) or a greyscale texture with a bit of color in some spots, you can use prim coloring to give the objects a bit of variety without requiring a lot of textures.

There's a couple items in the Library that use this. Grab a copy of the Sea Fan and see a greyscale texture in action.


To try a tint texture, grab a copy of Seaweed 1 from the same spot and change the prim color on it from green to white. Notice the white one has a bit of yellow on the top and light purple down in the center.




It's also handy with clothing. I've noticed a number of clothing makers that make one or two versions of greyscale textures and tint the various colors instead of uploading each color as it's own texture. I've used this myself, but I found that sometimes it's better to make a light greys version for pastels and a dark version for stronger colors, or to make a warm color version and a cool version.

Torley has a pack of greyscale textures that are fun to experiment with. There's also a couple in here scattered in the other sets.

16 September 2011

F is for Flexi: Alphabet Game

F is for Friday! Wait a minute...

F is for Flexible prims

Flexible prims were brand new to the grid when I signed up back in spring 2006. They're used for everything from flags and hair to tentacles and ballgowns.

Natalia's is still one of the best tutorial on using flexi prims.

If you want to make a more complex shape flex, it's possible to group flexi prims into units that move as one, although there are a lot of restrictions on making that work.

Flexi properties can be manipulated with lsl using the PrimitiveParams() functions.

15 September 2011

E is for Exporting Sounds: Alphabet Game

E is for...

I considered Environment (as in windlight) but right now I loathe the interface for it in the release viewer. Whoever came up with that needs to locked up in a room with 20 newbies and not allowed out until they can all make fashionista-quality snapshots. I can't see both shadows and textures with transparency at the same time, and I can't use shadows and antialiasing at the same time. The current release viewer is going through some rough times. I thought about Editing prims or terrain, but I'll save you the rants those thoughts inspired. E could be for Errors, but again with the rants!

So E is for Exporting sounds because that's something new I learned today. Cache location is on the Advanced tab instead of the Setup tab in the current release viewer, but everything else was right on.

14 September 2011

D is for DPW: Alphabet Game

Dept of Public Works

Do you like to travel? If you do, you've probably come across places the Department of Public Works built. Many of the public roads, railways, and seas on the mainland were made by them.

Three of my favorite places they've done are the funfair at Pyri Peaks (make sure to explore the Tunnel of Love), Rizal (a great place to go with a friend or three), and the Linden Memorial Park.



It would also seem that D is for Darn. Or maybe Disconnect.
At least the message made me laugh, right?

13 September 2011

C is for Color: Alphabet Game

Color. Prim color.

The color picker window on the viewer has several slots for you to save custom colors, but what about when you need more? Or what if you're working with a group and want to share colors? Why not make your own palette?

Rez a cube. I add a greyscale radial gradient texture to it, but that's up to you. Set it to full-bright. Copy the prim several times to make a row of prims. Link them together. Now as you pick colors for your project, set one of the prims in your palette to that color. Wear the palette as a HUD if prims are tight on your parcel, or leave it rezzed for collaborative building.


If you're doing scripting, you may need color information in RGB <0-1,0-1,0-1> format. Unfortunately the official viewer doesn't offer it that way in the color picker window. I add a root prim to my palettes (see that black prim behind the others on the top left?) and place this script in it. When you touch a color, it whispers the color information in that format.


default
{
  touch_start(integer p)
  {
   integer linknum = llDetectedLinkNumber( 0 );
   list l = llGetLinkPrimitiveParams( linknum, [PRIM_COLOR, ALL_SIDES] );
   vector color = llList2Vector( l, 0 );
   llWhisper( 0, (string)color );
  }
}

12 September 2011

B is for Bounding Box: Alphabet Game

Bounding box

How tall is your avatar? If you script, you know that while llGetAgentSize() claims to tell you, it isn't as accurate as getting the avatar's bounding box with llGetBoundingBox().

I am very amused that there's no way via script to guesstimate how thin or fat an avatar is. llGetMass(), llGetAgentSize(), and llGetBoundingBox() all assume default values for an avatar's x and y dimensions, and so any variation in their results is based entirely on the height of the avatar.

Add the following script to a prim and touch it to see how tall your avatar is.


default
{
    touch_start(integer total_number)
    {
        key avatar = llDetectedKey(0);
        string name   = llDetectedName(0); 
        list BB  = llGetBoundingBox( avatar );
        vector size =  llList2Vector(BB,1) - llList2Vector(BB,0);
       
        integer feet = llFloor( size.z * 3.28084 );
        integer inches = llRound( (size.z * 39.37008)  - (feet*12 ));
       
        string meters = (string)size.z + " meters";
        string us = (string)feet + " feet " + (string)inches + " inches";

        llSay( 0, name + ", counting your shoes you are " + meters + 

                 " or " + us + " tall."); 
    }
}

11 September 2011

A is for Animations : Alphabet Game

Animations

QAvimator is my favorite tool for making them. There are others though.

-The hip is the part that moves and rotates the entire avatar.
-The keyframe controls how your animation looks in SL. If the joint doesn't change between the keyframe and the second frame, it won't be moved by your animation in SL.
-Priority: 0-4. Don't be afraid of layering animations to get what you want. Built-in animations will encourage you to learn about how animation priority works.
-Hand and face 'animations' are morphs that you can trigger using scripts or attach to an animation when you upload it to SL. There's only a small selection to choose from, and sometimes they don't appear when the animation is triggered.
-Suggested joint movement limits.