Wednesday, February 7, 2007

Conundrum!

I noticed the other day that some of my scripts were able to execute on no-script land.

Through the process of elimination, I was able to narrow it down to exactly what combination of factors permitted this to occur, and now I can reproduce it at will — for example, I modified the "Sexy Walk" attachment so it now continues to function in no-script territory; no more monkey walk for me!

My first thought was, "I should probably report this as a bug."

My second thought was, "But I could make a mint selling AOs that keep working!"

My third thought was, "I wonder if this is an exploit. Do they still offer a bounty on exploits? And if I don't report it, but sell objects which make use of it, would I get banned?"

Further research is needed.

Tuesday, February 6, 2007

Nifty Find

Sometimes I'll just look around on the map to see what interesting-sounding sims are nearby. While doing benchmarks for the First Look viewer, I saw some interesting — but unfortunately inaccessible — sims with names like TextureTest, Bug Island, Island for Misfit Toys and Danger! Danger!

Looking to the west of First Look Isle, I saw a block of six sims with German names, one of which looked like it had a fort on a promontory of land.

I had to check it out — and I'm glad I did! Sitting atop a large hill, surrounded by a lush trees, was a haunting ruined castle, like one of King Ludwig the Mad's notorious projects fallen into disrepair.



As I walked upon the broken stones, avoiding the sporadic rubble, I espied some familiar objects. Glowing hands atop pedestals. A parrot. An eye-chart. In a courtyard at the bottom of the castle, a sign read Willkommen in der Orientierungs Burg, which even my pathetically rusty German could recognize: Welcome to Orientation Castle.


I've heard mention of a new Orientation Island; I wonder if this is what they will look like. It's certainly a lot more compact than the existing ones, taking up maybe a sixth of the sim. And the beach ball has been replaced with a well, into which (I think) the notecard says you're supposed to drop a large rock. There is a "physical" rock on a nearby staircase landing, but it's locked; I can't move it.

I've been looking around for a similarly upgraded Help Island, but so far haven't found one. There is a cluster of German-language, standard Orientation Islands just to the south of Frisch, though. I wonder how many other languages have their own Orientation Islands?

In sadder news, the Dynamic Reflections option has been removed from the Client->Rendering menu of the most recent First Look build. :( I can still enable it through the Client->Debug Settings dialog, but it crashes the viewer on my Windows machine immediately. (It still works on my Linux box, but that's not as powerful.)

It looks like most of the rendering improvements will be put into the official viewer soon! :) Get ready for smoother motion!

Friday, February 2, 2007

Oh. My. God.

I tried out the First Look viewer yesterday. I'd put it off, because in the comments about it in the official SL blog, I've read all sorts of wailing and gnashing of teeth about how unstable it is, but I was bored and wanted to see these "render pipeline improvements" for myself.

It was quite a bit faster (I haven't got exact numbers, but everything was much smoother), until I started playing around with the debug options and found the one to turn on reflections.

It's not just an image map of the sky sphere overlaid on the texture of shiny objects, the way the current "Shininess" texture setting works — my guess is that every so often (especially when you change position), the viewer renders a 360-degree panoramic image of your point of view, and then overlays that image onto shiny objects.

It's not perfect (for example, in order to see yourself in shiny objects, your point of view has to actually be in front of your avatar; and if you're in mouselook mode, you're either invisible or headless depending on whether or not you've got "Show Avatar in Mouselook" checked in your Graphics Preferences.

But still, it's phenomenal, and the frame rate with reflections turned on seems pretty comparable to the existing (non-First Look) viewer. And it didn't crash once while I was using it, though I noticed flexi prims aren't nearly as flexible as they are in the existing viewer, and HUDs tend to flicker madly from time to time.

While walking around and looking at reflective things, I took a trip to the Design Center in Idea City. It has some nifty tutorials on shadows (using a different technique than baking them right into your textures), and a nice display on microprims.

One thing that I hadn't managed to figure out with microprims was to make a complete sphere smaller than 0.01 in all dimensions. In my jewelry, I'd been faking it by stretching a sphere and then dimpling away all but the very tip, and using that as a mostly hemispherical bit, but it was far from perfect. The Design Center display gave some really good advice: use Hollow, and then apply a transparent texture to the outer skin of the sphere.

This was great, but the shadows are reversed in the hollow -- at noon, for example, the top of the microsphere would be shadowed while the bottom would be lit.

I found that by setting the twist on the sphere to -180 for both the begin and end, it will turn the shadows "right side up" and look much better.

And, oh, how tiny you can get them! In the image below, the moon on the left is 0.01 in all directions, the smallest SL will let you make it. To its right is another one, hollowed, twisted and textured, with the hollow set at 10 — a millimeter in diameter. And to its right, the dark grey dot, is one with the hollow set to 1, a tenth of a millimeter wide. It's almost too small; nobody would ever look closely enough to actually see it.



Now to make some jewelry with tiny little spherical gems!

Tuesday, January 23, 2007

The Lost Art of Communication

I was in an empty classroom, working on some visual aids for a class on texturing, when a shirtless, tattooed man walked in. The conversation was pretty bizarre.

Him: hi
Me: Hello.
Him: your the teacher?
Me: I am one of the teachers here at Rockcliffe, yes. :)
Him: make me a star

Now, I assumed that he was demanding that I produce for him a five-pointed star object. I have no problem helping people learn how to build objects, but being brusquely commanded to work for them, without even so much as a please, makes me ornery. So, with the old joke about "How do I get to Carnegie Hall?" leaping forth from my memory, I deliberately misinterpreted him.

Me: What instruments do you play?
Him: giuttar at real live
Me: Well, the first step would be to start playing at clubs which have "open mic nights" in order to get exposure.
Him: and than??
Me: Well, assuming people like what you play, you'll eventually gain a following, and perhaps become a star.
Him: i think you teach me?
Me: I'm afraid I'm not really the person to speak to about that; I'm not a musician and have no experience with performing in SL.
Me: All the "stars" I see in SL have basically performed until they've gained a following.

Well, I thought I'd been deliberately misinterpreting him! But I decided to make sure what he really meant.

Me: Or was that not the kind of star you were talking about?
Him: where can i find the crime lorde here??
Him: i mean mafia ORE SO
Me: I have no idea whom you might mean. This is a university, not a Mafia stronghold.
Him: (teleports away)

Huh?

Sunday, January 21, 2007

Open for Business

Johanna Hyacinth Designs is now open. I still haven't rerendered the textures to match the new positions, but I'll get around to it once I muster the enthusiasm. (I hate having to redo projects, and if I put off opening the store until I get around to it, I might never open!)

Alas, the parcel's landing zone makes it more difficult to find my store (my old store's location was great: walk up the ramp right in front of you, last store on the left).

So now there are two ways to get there:

  1. When you materialize, walk all the way to the end of the hall, fly out the door, turn left, fly until you come to a similar door on your left, fly in, and I'm the first store there on the far wall (and if you come in this way, alas, all you'll see is a whole wall full of blank vendors which I haven't filled up yet).
  2. When you materialize, turn around, walk out the door, turn right, walk until you come to a similar door on your right, walk all the way down the hall, and I'm the last store on the left. But at least coming from this direction, most of the vendors hung on the window actually have products for sale.
However, I did IM the proprietor of the mall, and she promises to move the landing point to a spot between the two hallway entrances, so hopefully soon it'll just be "go in the door on the left and all the way down the hallway, I'm the last shop on the left."

I guess I'm going to have to work like mad if I'm going to fill up all those vendors... I'd put my PDA up for sale (it appears when you start typing, and you hold it in one hand and tap on it with the other), but I made it for me, and I'm a lefty -- so you hold it in the right hand and tap with the left. Which, since the default "wear" location (and most animations that involve hand-held objects) is the right hand, means that any time you wear most objects (like mugs and glasses, weapons, walking sticks, etc.), the PDA gets detached and you have to wear it again once you drop or detach the other object. (Even in Second Life, the rest of the dextrocentric world tries to keep us down!) Maybe I'll make a righty version of the animation, and let the script choose which one to play depending on what hand it's held in...

Friday, January 19, 2007

I'm not dead yet!

Okay, so I suck at blogging, apparently.

Actually I've had to cut way down on my SL time, darn it. So, what's been going on in the past ten days?

  1. I had my store almost completely set up and ready to go, when the owner of the mall it was in decided to renovate. Now, the purpose was to increase traffic for those of us on the second floor, since people rarely went up there (which I certainly can't complain about), and she did let us keep our same relative positions (well, moving closer to the front might have been nice). But unfortunately, the proportions and features of the new location are different, so I have to re-render all my textures. Fooey!
  2. I've started teaching classes at Rockcliffe University. It's a fledgling school (it just started up at the beginning of this month), and so far the curriculum is limited, but I like the founder's ideas and I would like to see it succeed. Right now we have four building classes (with a fifth hopefully debuting this weekend), but instead of the follow-a-recipe-by-the-numbers, here's-what-to-do-but-not-why kind of class that I've taken too many of, we're teaching what all the options in the Edit Pane do, and why and how you would want to use them. I'm also working on a series of classes to teach scripting, which has me very excited. Hopefully, we can get that course started in February.
  3. I met Ged Larsen, who (like me) found the existing necklace generator scripts a little lacking, and set to work building a better mousetrap. And what a mousetrap he's built! Whereas mine is slow and ponderous, but gets there in the end, his is snappy and full of mouth-watering bells and whistles.
  4. I downloaded the Open-Source Second Life Viewer code, but alas! it won't compile on my beautiful new 64-bit machine. Let's see, I can spend even more time out of Second Life fixing the code so that it will compile on my system, or just wait until some other enterprising Linux user modifies the code for 64-bit. Hmm, what to do, what to do?
  5. Yesterday, I finally came up with an easy way to demonstrate how Texture Offsets work, just in time to teach my first class on texturing. I'll have to take some screenshots once I get off work and put up a post on the issue.
  6. I had an awesome idea for a script this morning, which hopefully I'll find the time to write this weekend.
Okay, so I haven't really accomplished much. I'm such a slacker!

Also, on a completely random tangent: why is it that, when I'm on a dance pad and someone wanders into the casino when all the dance pads are full, I'm the person whose dance pad they sit on in hopes of bumping off? Every single time! Maybe I should make a mean-looking avatar for when I'm dancing.

Tuesday, January 9, 2007

O Happy Day!

When I arrived at my vendor-booth-in-progress to make some additions, I noticed that there was a SPACE FOR RENT sign blocking the booth next to mine. Dare I hope that the genitalia merchant next to me will be gone?

(Not that I have anything against genitalia per se, mind you — it just kind of clashed with the jewelry I want to sell.)

Complete tangent: Among the last names that exist in SL are Hartnell, Cushing, Troughton, Pertwee, Baker, Davison, McCoy, McGann, Grant, Broadbent, Lumley, Eccleston and Tennant. But not Atkinson? How on Gallifrey could they have missed him?

Monday, January 8, 2007

Geeky Joy!

I read at Second Life Insider that Linden Lab has released the source code for the viewer client. This means I can compile it to run natively on my new 64-bit Linux machine! :kermitarms:

Also, maybe I can hack it so the "Jane Doe has left this session" group messages won't open up a new IM session if that group isn't already open. That's got to be the most annoying "features" of group chat.

Sunday, January 7, 2007

A Magic Barrier

While I'm getting my little vendor stall ready for its grand opening, I put up a "Coming Soon" barrier across the entrance — I guess I'm a little shy about letting people see my works in progress before I'm happy with the way they look. (Though I got a great compliment on it from someone yesterday, which totally made my day.)

Anyway, since the parcel's "landing zone" overrides the landmark I tried to set in my store, if I wanted to get through the barrier to work on it, I had to edit the barrier, set it to phantom, walk through it, and then set it to non-phantom again. And I'm way too impatient for that (in fact, just about all the programming I do at work is to make my life easier by automating the tedious tasks I have to do). So I wrote a little script for the door to set it to phantom when I merely touch it, and then turn itself back to non-phantom after five seconds.

But I was still too impatient, so I made it do its phantom thing when I walk or fly into it too. As it demonstrates the use of states, timers, and setting prim parameters, I figured it would make a good post for part 3 of my scripting tutorials.

Wednesday, January 3, 2007

Baked Textures, attempt 1

I took the plunge and rented myself a little vendor stall. Of course, I wanted to make it look nice, and I wanted to try out some texture baking, so I've spent the past couple of days working on that.

Aimee Weber's American Apparel build changes textures at sunset, and displays a floodlit look at night. Because I don't own the building my stall is in, I couldn't do much about the exterior — but since my stall has windows on two sides, and is across an aisle from similarly windowed stalls, I decided to change the interior lighting and shadows to match the position of the sun.



Every fifteen minutes (except at "night"), it gets the sun's current position and uses that to determine which texture to display. Fortunately, Linden Lab have been kind enough to provide a function to tell us where the sun is:

vector SunDirection = llGetSunDirection();


For some reason, the sun doesn't go straight east to west; it's tilted over by about 45 degrees, and the center of its path is somewhat above the grid, so it's below the horizon only one hour out of every four.

Anyway, making the textures for the store was fairly easy, but time-consuming. I recreated the entire store, plus some of the surrounding walls, ceiling and floor, using the Persistence of Vision Raytracer (a free 3D renderer). I chose POV-Ray over the other 3D packages I have because, like SL, it works with graphics primitives rather than polygon meshes, so it was easy to exactly re-create the geometry. Also, it can be scripted, so I could just plug in the list of sun positions, and make it light the scene from a different position based on which frame number I was rendering.

I had to render everything which would receive a baked texture: the wall, the floor, the ceiling, and every visible side of the wooden "bench" which would hold three vendor boxes. Then upload and apply! (The uploading was a bit pricey, since I had foolishly chosen to make a new set of textures for every fifteen minutes except nighttime. I managed to squeeze all the "bench" textures onto a single image for each time slot, but the grand total was still L$480 for only four things to texture — ouch! Maybe just day/night textures next time after all.)