WindLight First Look Viewer for (Mac OS X Intel only)

Second Life LogoWell, here it is. After two days of getting the open source code from Linden Lab to compile under XCode, I’ve managed to raise up to Zen Linden’s challenge and compiled the WindLight First Look Viewer for my Mac.

Zen Linden hinted that the next version of the WindLight FL will be under development (based on the input from a tremendous number of users who tested it) “for a few weeks”. For those of you that can’t wait until Christmas or 2010 for a new version, I’ve compiled my own from the sources.

Compiling the Linden Lab source code is fun. Obviously, as you might have expected, this is not your regular download-click-on-a-button-it-compiles-fine-yay-install type of software. It’s way too complex for that. Although a whole lot of procedures are (thankfully!) automated, some things really have to be done manually (I’ve added as much documentation as possible on my own “challenge” on the Second Life Open Source Wiki, and I’m pretty sure most of it are basic things. Of course, when it comes into figuring out why the headers for the OpenGL helper modules for Nvidia cards do not compile correctly, I’m at a loss โ€” I just commented out the C++-uncompliant code, and let the compile finish. With God knows how many billion lines the source code has, who knows how many bugs have suddenly popped in because of that ๐Ÿ™‚

Reading LL’s source code is a pain, there are almost zero comments, and even with a “grand plan”, it’s hard to figure out what goes where. If you’re an open source code fanatic, used to extremely well documented code, you’ll be very disappointed. More recent bugs that have been figured out are commented here and there. The style, however, is fortunately pretty much consistent across most files, although one can notice a difference in style from the old veterans and the newer generation. It’s like reading the Bible in the original Hebraic/Aramaic, with all pages loose, and trying to figure out who wrote what, or in which sequence the books are supposed to be placed together. And no, you won’t see any comments like “Hey Andrew, found a bug here on Havok, please fix it โ€” Philip, 20020112” or something like that. The younger programmers still leave comments like “HACK โ€” Can’t figure out what parameters to pass on the constructor”. Uh-oh. Now we know why we’re missing items in inventory ๐Ÿ˜€

Jokes aside, it was fun seeing that at last this even managed to compile fine, and the number of “hacks” was really minimal: the major thing to deal with were missing files and a weird directory structure. The code, by itself, doesn’t give a single error when compiling (congrats LL!). It takes close to two hours of compiling, though, which has been very likely the slowest compilation in my live (I guess I’m used to “simple” things like MySQL databases, Apache webservers, and about half a thousand hand-compiled utilities that is part of my job as an IT consultant to compile when installing FreeBSD servers for customers โ€” it usually takes two hours to compile them all together). But it works. Hooray ๐Ÿ™‚

I was half expecting nothing to work either. And indeed, I got a crash-on-login! Then I remembered that I usually clean the cache every time I install a new version of SL. I did that and… logged in flawlessly with the home-brewn compiled version of SL… without a glitch! And after 5 hours online without a single crash, I think I beat some world record or something ๐Ÿ™‚

Now the bad news.

The open source version of Second Life uses a proprietary, closed-source, and no-distributable commercial JPEG2000 decoding library. It is ultrafast, and this is very likely the major reason why LL still bundles it with their own in-house-compiled SL viewer. For us mortals, it means using a regular open source library, which has perhaps a third of the performance or worse. This means that the home-brewn variety of Second Life is painfully slow. On my reference sim, where I’ve got 30 fps with my iMac (2 GHz Intel Core 2 Duo, 1 GB RAM, ATI Radeon X1600), I had about 15 fps under LL’s own WindLight First Look Viewer, and… only 5-7 fps under the open source version. It’s pretty much unusable, except, obviously, if you really, really wish to take a picture using the WindLight weather system and “forgot” to take it when LL’s own WindLight FL client still connected to the main grid โ€” and can’t afford to wait until Christmas or so for the next release (LL will be too busy with the voice FL client now).

The second bad thing I immediately noticed was that the eyes didn’t render! I don’t know why this is happening. I suspect that something weird is going on with the way WindLight interferes with the eyes “glowing”. Full-bright also seems to be exaggerated. These quirks were visible on the “regular”, official WindLight FL client, but they’re far worse on the open source client, and having “blind avatars” is also not fun ๐Ÿ™‚

Sadly, I can’t afford to pay Amazon S3 to host files there (I have an account, though!…), so, unlike LL, the downloads here will be painfully slow. To cut the size of the download, I did two things: first, strip out the debugging code from the executable (I wonder why LL doesn’t do the same on the Deployment version, it saves you 25 MBytes of precious RAM โ€” perhaps it’s used in some way by the CrashReporter or something). Secondly, I’ve just managed to get the Intel version compiling correctly for some reason. Sorry โ€” I’ve also got an old PowerBook G4 pretty much able to run SL, but really, 0.5 FPS with this home-brewn version is really not worth the effort ๐Ÿ™‚ Although I imagine that the latest batch of G5 Macs might be able to run it with a handful of FPS; so if you pester me for it, I might be able to compile a PowerPPC version as well, if it’s worth the trouble.

(And don’t ask for the Windows/Linux version; even if I had a working development environment under Windows/Linux, I have no time to figure out how the compile works under those environments. I’m sure some nice open source enthusiast might already have placed a copy of their own compiled versions online somewhere for you to download)

Thirdly, don’t complain if this doesn’t work for you. This compiled build of SL is provided “as-is”. If it works for you, fine. If it crashes, I don’t have the slightest idea why. If you lose all your money and your inventory, and LL says that they can’t do anything about it because you’ve been using a non-supported compiled version of SL, it’s your bad luck. I can’t help you either.

It was fun compiling it a a “proof of concept”, but that’s all there is to it ๐Ÿ™‚

Enjoy… or not, if you’re too used to the superfast “regular” viewer…

Print Friendly, PDF & Email
  • Pablo Andalso

    Apparently my viewer didn’t get the memo. My WindLight First Look Viewer ( according to Finder) is still logging in as normal. The login screen indicates that I’m using the Voice First Look, but it’s still got the WindLight effects and no Voice Chat.

    Don’t tell anyone, okay? ๐Ÿ™‚

    The update broke the main viewer, though. Go figure.

  • As to the JPEG thing, why don’t they/you use a pre-compiled dynamic linked library containing the proprietary code?

  • I want WindLight back!! ๐Ÿ™‚

  • I don’t know to think if you’re lucky or not, Pablo, but I’m definitely not telling anyone about your case ๐Ÿ™‚

    Ashcroft, people can indeed just copy the pre-compiled dynamically linked library and use it instead of OpenJPEG. What they can’t do is distribute a compiled version of Second Life with it ๐Ÿ˜‰

    Ana, so do I, so do I… *sighs*

  • No, but one can distribute instructions on how to do it with a pre-compiled version of SL that’s compiled for the purposes of using it ๐Ÿ˜‰

  • Placard66

    Glad to hear you got it working! Did your compilation fail on Nvidia’s GLH related code? They don’t even exist bundled on Linux systems either.

    LL may be using modified version of GLH or be using a version that is no longer available from Nvidia.. they probably need to be bugged to also distribute those files like glh_linear.h etc, which their license allows to ensure people can actually compile them on non-Windows systems.

  • So that’s it, Placard66, I was wondering about what version LL was using of GLH, since Nvidia’s publicly available one is certainly different!… I’ve used LL’s two header files and just used Nvidia’s current version for the rest of the includes. Strangely enough, though, the libraries seem to be correct otherwise, it’s just a few dozen of missing files.

    Nobody else is commenting it on the Open Source portal โ€” I’ve added a comment myself โ€” so I guess either “everybody” has those libraries and header files correctly installed and never bothered to check, or something strange happened ๐Ÿ™‚ Still, my iMac has an ATI card, and that might explain why my compiled version of SL works well on it.

  • Placard66

    Nah, the silence could also mean that nobody has tried compiling Windlight yet. ๐Ÿ˜‰

    So I finally compiled my own and I had to comment GLH stuff out too, but it works, and that’s quite nice.

    I get up to 10 fps less than the non-windlight but I think that’s what I was getting on the precompiled versions too. Using the proprietary *kdu* libraries is as easy as symlinking them into newview/, which the code finds and loads for you if they exist, for better fps (I don’t know if you’ve tried it).

    One quirk I’ve noticed though and I’m wondering if you have this too..

    Only about half of HUD objects actually render! Things attached to lower left, bottom and bottom right are invisible and none appear from transparent highlights. Do you get this too?

    Hopefully this is related to some of that newly commented code and I hope LL will release their glh code soon so we know things are otherwise working as expected. If so, I’m actually quite happy that those are the only things broken, heh.

  • Placard66

    Ahh.. correction! No HUD objects at all render if they have a texture transparency.

  • A.T.

    women always had my respect to them tripled if they can make

    …with understanding what they do and what happens “under hood”

    take my hat off again.

%d bloggers like this: