calgary ahoy

I landed just fine in Calgary last night. I think the city knew I was coming because this morning there’s a healthy dusting of snow over everything.

Each time I come back the city looks a little more different. Even the downtown skyline isn’t one I recognize any more. It’s strange, turning down familiar streets and seeing unfamiliar landmarks shoulder-to-shoulder with the old. I mean, that happens everywhere– Toronto is notorious for new shops vanishing within a handful of months of opening– but it’s different to see it happening in the place I still call home.

Differences aside, the traditional Albertan friendliness hasn’t changed, and that’s something I definitely miss, living in TO.

I’m still getting over the fact that I have a whole week off. I know Banff is on our list, and I’m actually going to visit more folks than just Trez and her kin this time around, but I’m really looking forward to taking my 7D out and seeing what I can see.   

today’s collected inspiration

I have a soft spot for stories where tiny people meet and make friends with us regular humans. Arrietty the Borrower is looking good. Trailer says: “This is the story of the coming together and coming apart of a ten-centimeter tall girl and a young boy” (or something close to that effect).

Not to mention, ゲド戦記 (Tales of Earthsea) was also finally released recently, although I didn’t see it up for viewing anywhere near me. I’ll have to wait for the Blu-ray on that one.

Another animated thing I’m excited for is the new 3D Le Petit Prince. I hear it’s 26 episodes, and that in each episode he goes somewhere completely different (odd and exotic for a 3D TV show, seeing as that’s a lot of built-out). There’s a bit of art here.

fully functional?

Seems like everything is finally working!

The move over to Dreamhost was not without its bumps with regards to WordPress. I made the mistake of thinking that the “backup” tool was what I needed; turned out it spit out an unusable SQL database dump. Export was what I wanted but by the time I’d figured that out my site URL was already pointing at its new home. It took me a good chunk of yesterday and all morning today to find a workaround, which involved editing the old SQL database by hand, but now all my old WordPress posts have transferred and everything is working again.

My friend Mike has been a Dreamhost customer for years; possibly for as long as I’ve known him. He’s never had any complaints, and as particular as he can be about technology (not as particular as myself, mind) I thought that him being a satisfied customer was the highest compliment a company can be paid. As is always true when he gets me to try something new, either directly or indirectly, I am not disappointed. There were so many things I wanted to do with my old Yahoo hosting where I was told either it wasn’t possible or it wasn’t something they were interested in supporting; all those limitations are now gone with Dreamhost. Plus, hey, I get a shell account with Emacs again!

This site’s going to be changing. I’ve spent most of this year figuring out what I want to do and how I want to accomplish those goals; I hope that the coming months see me with more time to do just that. I’m going to start by talking more about gaming in general. In particular, I want to start writing game reviews again. I think the last time I did so was three or four blogs / hosting services back. Reviewing games is good for understanding how games work, or moreover, how and why they fail. I might start with Mirror’s Edge soon as I can find the time to finish it.

moving house

This is just a parker post for the moment. I’ve just upgraded from Yahoo to Dreamhost.  I’ve disabled the link on the main page.  It turns out that the SQL backups WordPress sends aren’t as easy to restore from. ^_^;

first steps in openCL

I’m going to post something about my trip to Italy in a bit, after I get my pics uploaded properly to Flickr. But I wanted to put this up so I don’t forget about it later.

A conversation at work got me interested enough in GPGPU calculations to start doing a bit of research into the topic. Seems that at a base level both the ATI and NVidia APIs behave similarly, and that OpenCL is a nice, understandable alternative if you don’t want to be locked in to a single vendor. (Not that I use ATI cards.) I tried getting CUDA working on my Mac, but between weirdness caused by the drivers and the fact that it doesn’t support 64-bit on OSX, I’ve decided to go with OpenCL instead for my tests. Functionally everything will be the same, and after a nice tutorial on ATI’s site detailing some introductory points I have code that compiles and does what I want it to do, which is more than I can say for CUDA.

Anyway, here’s my first test. I wanted something simple for getting device information off my laptop.

#include <iostream>
using namespace std;

#include <stdio.h>
#include <stdlib.h>

#include <OpenGL/gl.h>
#include <OpenGL/CGLDevice.h>
#include <OpenCL/cl.h>
#include <OpenCL/cl_gl.h>
#include <OpenCL/cl_gl_ext.h>
#include <OpenCL/cl_ext.h>
 
#define MSG_SIZE 4096
#define MAX_DEVICE_IDS 16

#define RT_STRING       0
#define RT_UINT         1
#define RT_BOOL         2
#define RT_PLATFORMID   3
#define RT_SIZET        5
#define RT_SIZET_ARR    6

void printDeviceInfo(cl_device_id deviceID) {
   
    cl_device_info param_list[] = {
        CL_DEVICE_NAME, CL_DEVICE_VENDOR, CL_DRIVER_VERSION, CL_DEVICE_VERSION,
        CL_DEVICE_PROFILE,
        CL_DEVICE_PLATFORM, CL_DEVICE_VENDOR_ID,
        CL_DEVICE_MAX_COMPUTE_UNITS, CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS,
        CL_DEVICE_MAX_WORK_ITEM_SIZES, CL_DEVICE_MAX_WORK_GROUP_SIZE,
       
        NULL
    };
   
    int param_return_types[] = {
        RT_STRING, RT_STRING, RT_STRING, RT_STRING,
        RT_STRING, RT_PLATFORMID, RT_UINT,
        RT_UINT, RT_UINT, RT_SIZET_ARR, RT_SIZET,
       
        NULL
    };
   
    char *param_strings[] = {
        "Device Name", "Vendor", "Driver Version", "Device Version",
        "Device Profile", "Device Platform", "Device Vendor ID",
        "Max Compute Units", "Max Work Item Dimensions",
        "Max Work Item Sizes", "Max Work Group Size",
   
        NULL
    };
   
    int i = 0;
    int maxWorkItemDimensions = 3;
   
    while(param_strings[i] != NULL) {
        char    msg[MSG_SIZE];
        size_t  param_sizeT;
        size_t  param_sizeT_array[MSG_SIZE];
        cl_uint param_uint;
        cl_bool param_bool;
        size_t  param_value_ret;
        cl_platform_id param_platformID;
       
        cl_int error;
       
        switch (param_return_types[i]) {
            case RT_STRING:
                error = clGetDeviceInfo(deviceID,
                                        param_list[i],
                                        MSG_SIZE,
                                        msg,
                                        &param_value_ret
                                        );

                cout << param_strings[i] << ": " << msg << "\n";
                break;

            case RT_UINT:
                error = clGetDeviceInfo(deviceID,
                                        param_list[i],
                                        sizeof(cl_uint),
                                        &param_uint,
                                        NULL
                                        );

                cout << param_strings[i] << ": " << param_uint << "\n";
                break;
               
               
            case RT_BOOL:
                error = clGetDeviceInfo(deviceID,
                                        param_list[i],
                                        sizeof(cl_bool),
                                        &param_bool,
                                        NULL
                                        );

                cout << param_strings[i] << ": " << (param_bool ? "True" : "False") << "\n";
                break;
               
            case RT_PLATFORMID:
                error = clGetDeviceInfo(deviceID,
                                        param_list[i],
                                        sizeof(cl_platform_id),
                                        param_platformID,
                                        NULL
                                        );

                cout << param_strings[i] << ": " << param_platformID << "\n";
                break;
           
            case RT_SIZET:
                error = clGetDeviceInfo(deviceID,
                                        param_list[i],
                                        sizeof(size_t),
                                        &param_sizeT,
                                        NULL
                                        );

                cout << param_strings[i] << ": " << param_sizeT << "\n";
                break;
               
            case RT_SIZET_ARR:
                error = clGetDeviceInfo(deviceID,
                                        param_list[i],
                                        sizeof(size_t) * maxWorkItemDimensions,
                                        param_sizeT_array,
                                        &param_value_ret
                                        );

                cout << param_strings[i] << ": " << param_sizeT_array[0] << ", "
                    << param_sizeT_array[1] << ", "
                    << param_sizeT_array[2] << "\n";
                break;
               
               
               
            default:
                break;
        }
       
        i++;
    }
}

int main(int argc, char **argv) {
    cl_device_id deviceID;
    cl_uint numDevices;

    cl_uint err = clGetDeviceIDs(
                NULL,                  
                CL_DEVICE_TYPE_CPU,    
                MAX_DEVICE_IDS,        
                &deviceID,             
                &numDevices
                );
   
    cout << "Number of CPU devices: " << numDevices << "\n";
   
    for (int i = 0; i < numDevices; i++) {
        printDeviceInfo(deviceID);
    }

    cout << "\n\n";

   
   

    err = clGetDeviceIDs(
                NULL,
                CL_DEVICE_TYPE_GPU,
                MAX_DEVICE_IDS,
                &deviceID,
                &numDevices
                );
   
    cout << "Number of GPU devices: " << numDevices << "\n";
   
    for (int i = 0; i < numDevices; i++) {
        printDeviceInfo(deviceID);
    }
   
    cout << "\n\n";
   
}
 

(Hope that copy-and-pasted correctly.) To compile it on your Mac:

g++ test2.cpp -o test2 -framework OpenCL

Here are the results on my laptop, a 2010 Core i7 MacBook Pro 15″:

Number of CPU devices: 1
Device Name: Intel(R) Core(TM) i7 CPU       M 620  @ 2.67GHz
Vendor: Intel
Driver Version: 1.0
Device Version: OpenCL 1.0
Device Profile: FULL_PROFILE
Device Platform: 0
Device Vendor ID: 16909312
Max Compute Units: 4
Max Work Item Dimensions: 3
Max Work Item Sizes: 1, 1, 1
Max Work Group Size: 1

Number of GPU devices: 1
Device Name: GeForce GT 330M
Vendor: NVIDIA
Driver Version: CLH 1.0
Device Version: OpenCL 1.0
Device Profile: FULL_PROFILE
Device Platform: 0
Device Vendor ID: 16918016
Max Compute Units: 6
Max Work Item Dimensions: 3
Max Work Item Sizes: 512, 512, 64
Max Work Group Size: 512

Next step: getting the GPU to do some calculations.

Tags: ,

funhouse and the big top

As I type this I’m over at FUNHouse central with Dimos. It’s been a while since we were able to work on things together, in person. Usually we work a lot over email and lunchtime talks; it’ll be good to sit and jam together.

It’s been an interesting week. I’ve been tasked with doing research on cloth simming, or rather not simming, which is about all I can say. However, I can say that it’s been an interesting challenge and has helped me to better understand some of the more esoteric corners of Maya Dynamics.

Work aside, the G20 meet up has the entire city by the balls. The trains are shutting down due to bomb threats, and a number of people at the office have been ID’d on the way in by the some of the hundreds of cops patrolling the downtown core. The whole thing is a mess. Lots of downtown businesses are losing money because of forced shutdowns. Even my office is shutting for friday because the building is getting boarded up.

It’s strange to me… I can’t quite follow the logic on violent protests for something like this. Regardless of what’s being discussed, I can’t imagine any topics are worthy of that kind of response.

Anyway, to work with us!

Tags: , ,

iPad madness

Well, I went and did it. Today at lunch I bought the 32GB wifi iPad.

I initially meant to ignore the iPad entirely, then only gave it passing thoughts as a possible development target for games and products. (I have a really great app idea for photography that I may still attempt seeing as nobody else on the app store has released anything in the category of note!) But I didn’t see myself using one, or even really wanting one. I already have an iPhone; why would I need a bigger one?

What changed is that one of the other gear heads at work, Jordan, not only had the audacity to go out and buy one, but also let me touch it. You hear a lot of talk about how once you’ve held the iPad things are different, but you really can’t appreciate that fact until you’ve held one for yourself. Jobs said that the development of the iPhone was just a stepping stone on the way to this, and seeing the differences between the two platforms I completely understand why this was the end game and not the phone.

For starters, even knowing the dimensions I was surprised at how small it is. I’d been expecting something much more massive; the ads on busses and billboards make it look like its the size of a fat magazine, so regardless of knowing that it has a ten inch screen I still thought it would be too large to be useful. Boy was I wrong. Maybe it’s that I have big hands, but I don’t think I’ve ever owned another device that was so comfortable. Even typing on it is great in landscape mode (this post coming to you from the WordPress iPad app). It took me a minute to find the right spot for it to sit (which seems to be balanced on my lap despite the perfectly good desk in front of me), but because the keyboard and system are just an extension of the iOS and since I’ve been an iPhone user for nearly two years, there was almost no learning curve. Although, I do like that there’s an actual undo key. I will admit I shook the pad a few times before I found it.

Right now the only thing I’m missing is WriteRoom. I hope that iPad app comes out soon. The prices on a lot of the “HD” versions of apps I use are pretty up there (Cultured Code must be insane if they think I’m giving them another $20 on top of what I’ve already paid them for Things and Things iPhone), but enough of my backup apps have become universal that I don’t think I’ll miss them all that much.

Maybe I’ll do another writeup in a month or so, but as of this minute, a few hours in, I have to say I am absolutely in love with this piece of kit. Next stop: Ableton Live + Touch OSC?

Tags:

lots of stuff

Geekery: The open source community received a few nice promises over the past few weeks. How on the heels of the Humble Indy Bundle experiment (pay-what-you-will MacHeist-style bundle of games from indepedent developers), the creators of the games in the bundle have said they’ll be open sourcing their games. The two that interest me are Gish and Aquaria. Aquaria has been very open to the modding community, allowing much of the game to be completely redone by enterprising fans. I hope the source for it gets released soon; I’m particularly interested in their editors.

The other good news was that the Lightworks NLE software package, promised to go open source after it’s parent company’s acquisition, will actually be released this fall. It sounds a little too good to be true, and is all about interoperability with other editing suites. I know people mention projects like Cinelerra when asked about open-source video editing, but having a real editor that’s been put through its paces on real films (Lightworks was apparently used on The Hurt Locker) will be great for the community.

Music: I’ve met a number of like-minded people lately who’ve turned me onto some new artists (or at least, new to me). Lykke Li’s debut has found a permanent place on my iPods. I knew it was a winner when a friend at work told me over messenger to listen to her song Little Bit, because she was listening to it right then and enjoying the heck out of it; my reply was that I was listening to it at the same moment.

I also picked up The Postal Service’s debut, Give Up. It’s an “oldie” but holds up well even now. The sound they created is very popular now, almost like they’ve managed to find a timelessness despite being an electronic band. I’m not one for Death Cab for Cutie, not usually, but side projects of lead singers often surprise. (See: Lotte Kestner, The Soft Skeleton.)

Work: I probably shouldn’t say anything but I’m too excited to stay quiet! The other night we rendered out poses for the characters on Yoko, Mo, and Me. We’ve recently hired on an experienced texture artist, and between him and the tireless efforts of the other talented folks at March, the look blew me away and the assets aren’t even final!

There are two times when I remember why I got into CG. One is when you get a face rig, even a temporary one, onto a character. Until that point the character is just a lifeless statue, but raise an eyebrow or put a mouth into a moue and suddenly they’re a person. The second time is when the flat lambert of OpenGL displays turn into the beautiful shades and hues of a final render. Last night’s images were good reminders of why I do what I do.

Life: Getting the Epic Flu a few weeks back made me re-evaluate how I spend my off time. That, and a Tarot reading warning me to stop putting all my energies into things for other people. Sunday, I rode my bike up to the local EB and picked up a copy of Super Mario Galaxy 2.

Holy crap.

See, I only finished Galaxy a few months back, me being a late Wii-bloomer. (Still have yet to play Twilight Princess.) I thought it was brilliant both in terms of design and in how they used the Wiimote to interact with the world; for the most part you could trust your jumps and the cameras, which was totally unlike Super Mario Sunshine. Galaxy 2 seems to have fixed every complaint about Galaxy I didn’t know I had. For example, having to traipse through that space ship back to the galaxy entrance you wanted after collecting every star is gone. In it’s place is a New Super Mario Brothers-style world map, along which your ship snaps from level to level. So far there’s also a lot more variety– no levels have more than two visible stars to collect, so you finish them off quickly and move on. I don’t find myself getting bored while clearing stars out of a single map.

I think that’s enough for now… Good thing I can do drafts on my phone or I’d never have the time to blog any more!

returns

I had to make a difficult decision today: Looks like I’ll be returning my New Core i7 MacBook Pro.

I bought the in-store antiglare model because the antiglare screen was the only thing not on the standard build that I wanted, and I thought it was amazing to finally be able to pick it up in-store after the one month wait on my last laptop. But the current generation of laptops only offer the antiglare option on the higher-resolution screen.

At first I thought it wouldn’t be an issue, that I’d appreciate the extra screen real estate. But a week of using the machine has led me to the conclusion that the higher resolution screen at 15″ is too much of a strain on the eyes. At least, on my eyes.

I watched video tutorials all day today and it got to the point where I couldn’t focus on the windows on-screen. Three years on my previous laptop and I never had that problem; one week with the new one and I’m punch-drunk.

I argue all the time with people about why I get Mac laptops. I honestly do believe they’re of a higher calibre than their equivalently-priced PC counterparts, but between this issue, a bevy of issues I’ve had since iPhone OS update 3.1, and the fact that Apple still hasn’t gotten their shit together with regards to OpenGL standards on the Mac and I’m seriously considering a Windows laptop for my next work machine.

I wiped this one and I’m taking it back. I’ll replace it with a glossy-screen copy, and hopefully that helps my headaches. But I can’t help thinking that this could have been avoided had Apple offerred the antiglare option on the regular resolution screens, an option I’d have gotten had I bought a Dell.

Funnily enough I have a copy of Windows 7 Professional arriving in the mail in a week or two, so I’ll have plenty of time to get re-acclimated with that side of things if I do decide to make the switch back (after my 2001 switch to Mac). Really going to miss Quicksilver, though.

new paradigms

Part of working at anything, of being a craftsperson, is the constant search for new techniques that either aid you on your process or add something new to your process, making you better in the process.

Over the last few weeks I’ve heard about a number of rigging techniques that sounded counter-intuive at first, but the more I think about them the more interesting they become.

The one I’m most interested in trying out will be arriving soon as a very expensive DVD: the Mastering Maya: Developing Modular Rigging Systems with Python. The autorig itself is almost identical to something I’ve worked on in my spare time, but what’s crazy about it is that the autorigger works by layering on top of referenced FK skeletons in shot files.

I’ve never built a rig that was feature limited, or where an animator asked for something that I thought wouldn’t benefit everyone. (I do only IK limbs in my own work, but that’s a different story.) But before, the rig would be modified and the change would move downstream as part of the referencing system. The idea that you’d want to not reference characters as a whole, and allow animators to pick and choose their favorite controls, seemed ludicrous on first listen.

The pros are very compelling. You can always strip out the control rigs and put the keys on the FK rig; pure FK rigs are very compatible across all programs. Not to mention, feature-level control schemes could be applied to game characters as well (and moving forwards, I fully expect more and more projects in this industry to target all “three screens”). There’s also the ease of fixing issues on a single animator basis: once a fix is in the autorig, they can bake their keys down to the FK rig, remove the old controller, them reapply the rig in the scene with no need for the TD to come over and swap things around.

But what of multiple scenes? Does a script run on scene load and alert animators to updates controls as they become available? How are major changes propagated to all shots throughout the pipeline?

Right now the answer I’m coming up with is: the animators apply changes on their own. If they want the new rig with fixes, then they opt in by baking their keys to the base FK rig and blowing away the broken contol rig, replacing it with the fixed version. I can’t wait to see if that’s how the 3DBuzz tutorial solves this problem.

It also gets around a nasty issue: because broken rigs live in scene files, you don’t have to have multiple copies of fixed rigs that travel downstream for shots that used the respective broken rig iterations.

Then there’s the idea that this makes character referencing less important– in software that doesn’t support animated references like Lightwave and Cinema4D, you get the benefts of a tool that gets around the issues of rig updates. You still need to force tool updates on all artist machines, but that’s less of an problem for me.

Anyway, it’s been over a week and I’m still waiting on my purchase, so all I can do is speculate and look forward to what’s in store.

On the music front, I finally got something out of Live that did not suck. In fact, I just might like the drum beat. The weird part is that while nothing I have in my head comes out when I sit down to write music, what does come– however different it may be– still makes me happy.