The Art Galleries of SL List is available at http://sasun.info/ArtGalleriesOfSL.htm.

New visitors, please read: About This Blog

Thursday, March 4, 2010

Web Kiosks

Wow it's been a while. I've been neglecting this blog completely for the past two months. Time to get back into the groove!

The new "Rev 2" Galleries of SL kiosks are out and I couldn't be happier. Part of my goals in terms of my programming skills for the past year has been LSL/web integration, and I've been learning a lot of C# and ASP.net to do just that. I've also been wanting to learn a cool javascript library called jQuery that a lot of web developers are using, and the new web config for the gallery kiosks has been a great excuse to do that.

I've been wanting web-based config for the gallery kiosks for some time but due to some technical details (medium trust for ASP.Net applications running on godaddy.com servers doesn't allow the ports in the URLs for in-world HTTP-in objects, for you tech-heads), I am unable to make HTTP calls directly from an ASP.net page on my website to an SL server. However, I can display a standard .htm form from my web server on your browser, and set it up so that the datda in the form you fill out is submitted directly to your kiosk (since your kiosk is already set up as a simple HTTP web server with the new LSL "HTTP-in" functions). However I just plain didn't know how to do that, and I can't do it in ASP.net (not that it's a limitation of asp.net at all), which is what the entire Sasun.info website that all the gallery kiosks communicate to is written in. So I had to create such a form with pure HTML and javascript, no asp.net. I finally spent some time learning jQuery to make it much easier, and before you know it I had a working form that could send data directly to an in-world kiosk. I was pretty thrilled to see that actually working. I also learned all about a common web technology called AJAX that allows me to easily get data from my website from a pure HTML web page, so I can pull your kiosk data in from the database to populate the fields on the config form or show you a list of your kiosks below the form if it can't find a kiosk on the current parcel.

So far the response has been very positive. I really like the fact that I can validate all the inputs directly on the web form, which means I could remove some code from the server that used to do all the data validation, since it was now being done on the website instead, and free up some valuable memory, which is like gold with big LSL scripts.

The other killer thing about the new web config form is that it allows kiosk owners to migrate their own data to a new kiosk. If you move to a new parcel and rez a new kiosk, the system has no way of knowing that your newly rezzed kiosk is the same one as before on the old parcel, and unless you asked me to migrate all that data to your new kiosk, it would be lost and you'd have to start fresh with no visitor counter data and no ratings. Now, you can click your old kiosk on the config form and all your data is moved to the new kiosk for you, so you don't ever have to lose your visitor/rating data!

The other cool feature is that the visitor counter uses WAY less script resources due to the new parcel keys feature, which is a good thing.

I also decided that I needed a new, updated look, so I built some new kiosks from scratch. The floor stand version was sculpted and textured by me. Yay!

Funny story with the "wall" version of the kiosk (the flat one you can hang on a wall). I did the stand version with the nice sculptie and textured it (which is not so easy when working with sculpties) and then got to work on the "wall" version which is basically the banner, display, and rating prim stuck on the black and white square backboard. So I thought, all I need to do is remove the stand part on the sculptie and leave the square backboard. So I removed the leg, created my sculptie, then had to retexture everything so it looked right. In about 20 min I had a nice... square... box. Yes, I essentially created a freakin' sculptie BOX. Omg. Duhhhh. So I trashed it, rezzed an actual box, made a quick texture, and had it ready in about 5 min. Sigh.

One downside someone pointed out to me about the sculptie version is that from a distance, it looks really weird. The texturing goes a little bonkers and it just looks awful, from far away. If that is an issue for you, I recommend swapping out the standard kiosk for the wall kiosk, it will always look fine from a distance. It's just a thing about sculpties and nothing I can do about it. I know there is some debug setting that keeps sculpties looking detailed from a distance, but with all the viewer uninstalls/reinstalls I've done lately I've lost all my fancy debug settings. Something LOD something, I don't remember.

There was one bug that snuck out that caused some rather odd things to happen, some people got stuck with a "you are missing a texture" error and someone else's texture if you didn't configure your kiosk with a UUID for your texture when you first submitted the form data. I quickly fixed it (well, it took many hours actually) and had to run around and upgrade about 50 kiosks asap while the new config system was shut down for the broken kiosks. Got everything fixed and upgraded that day (unfortunately it took ALL day) but they are working fine now.

1 comment:

  1. I found this page in a google search saying, set RenderVolumeLODFactor to 4 in the debug settings to make sculpted prims look normal at a distance with no extra lag. Which I have done.