Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Toggling transparency - wings and semi-transparent stuff

Starchaser Webb
Artist / Builder
Join date: 23 Feb 2006
Posts: 30
02-23-2006 11:45
Question about use of llSetAlpha...

Hi everyone. I joined SL just recently, after watching friends play for several months. I am now trying my hand at making my first scripted set of wings, and I have run into a question that doesn't seem to be covered clearly in the LSL WIKI. While I am new to SL, I am also a programmer and an artist. I've been programming longer than a lot of the Players in SL have been alive, so programming in LSL is not hard for me to pick up, nor is creating good-quality textures for use in SL.

When you use llSetAlpha to make a face of a prim invisible, how does that affect the texture applied to that face? In other words, if I texture a face with an alpha-mapped wing texture, use llSetAlpha in a script to make it 100% alpha, and later use llSetAlpha to make it 100% 'opaque' again, does the original alpha-mapped texture appear as it was before? Or must I re-apply the texture with my script?

I have a set of wings built that consists of five linked prims. Two of the prims will be the wings in their wide-spread position, in a shallow V to one another. Two will be angled back farther, and will be a 'mantled' position, similar to most SL wings, in a classic 'angel wings' pose. The last prim will be the wings closed fully, resting against the Avatar's back, and is the root prim.

I have figured out how to get the edges of the prims textured to 100% alpha, so they don't show, and how to use .tga textures with alpha transparency to texture the flat faces of the wing prims. The left and right wings use the same texture, flipped horizontally. I simply flip the texture horizontally for the 'underside' of the wings from what the upper side is, though I may later use a seperate texture there.

So far, so good, but I still have three pairs of wings showing.

So... I want to put a script into the root prim (the closed pair), that will use linked messages to command the other two pair. One command to close the wings, one to mantle them, and one to spread widely for flight. Eventually I'll make a better version that senses if I am flying, and extends them if I am, or which animates textures or wing sets to 'flap' the wings. One step at a time...

Thanks all!
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
02-23-2006 11:48
You can change alpha back and forth, it won't affect the texture on the prims, even if that texture has its own alpha mask.
Starchaser Webb
Artist / Builder
Join date: 23 Feb 2006
Posts: 30
02-23-2006 11:50
Thank you, Ziggy! That makes the script far easier!
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
02-23-2006 11:52
Welcome to the Forums, Starchaser! I'll bet Rhiann will really love a pair of those wings! Those sound much better than the ones I made for her.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
02-24-2006 08:04
From: Starchaser Webb
Eventually I'll make a better version that senses if I am flying, and extends them if I am, or which animates textures or wing sets to 'flap' the wings. One step at a time.
There's an open-source script that senses if you're flying in my shop in Skyhook Station at about 500m above Avalon Lagoon (the BIG crater at the south of LostFurest dAlliez (the first skyhook was a bit unstable, see, and made a BIG splash when it hit... that's my story anyway).