Words Have Power

'If you want to be an artist, do it. If you want to direct, or act, or write, don't think about it, do it. Take a chance and jump off the cliff. You can build your wings on the way down. As long as you love what you do and do what you love, you won't fail. Love is the key to everything.
 --Ray Bradbury, 2009

'To all who come to this happy place ... Welcome!'
 --Walt Disney, July of 1955

'If you can possibly afford it, always buy the best. You'll rarely be disappointed.'
 --Alex Sherman, 1994

'Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover.'
  --Samuel Clemens

'Once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return. '
  --Leonard da Vinci

Done with Galactica

I’ve recently finished a short contract doing preproduction work on SciFi Channel’s new “Battlestar Galactica” mini-series, and now I’m working on some web development with PHP and MySQL, some Lightwave animation for a car commercial and an OpenGL game demo. Man, when it rains it pours.

nGene

The nGENE Here’s the source code and compiled binaries for my little OpenGL engine, which I have named the “nGene” after a suggestion by a coworker.

It’s a little odd as engines go in that it loads Lightwave 6.x (or greater) scene and model files and renders them, and then lets you fly a camera around and look at them. It lights the scene according to whatever lights you put in the scene, but all lights are translated as point lights. I never got spotlights or area lights working. It does respect global ambience settings in the scene, though, as well as maintain the hierarchical relationship between all the scene elements (i.e., parenting of scene elements is preserved at runtime.

To clarify the copyright status of the nGene, it’s open source and licensed under the LGPL, meaning you can use this code for your commercial projects if you wish, without having to worry about having to release the code for it or your own project along with the compiled form. By all means, steal the parts you like and toss them into your project if you think it’ll help. It’s why I wrote it in the first place. Note that I’m not responsible for the results, i.e, if it breaks, you get to keep all the pieces. If you do download it, note that you’ll be in good company – the nGene has been downloaded over a quarter million times since I originally posted it.

Special thanks to gifted artist and animator Eric Estrada, currently a lighter at Dreamworks, for the 3D scan of his head.

It texture maps, but only UV textures, and there are a few ways to apply the textures in Lightwave that don’t actually work. The best approach seems to be to convert whatever conventional texture mapping you might have on your models into UV maps using the “Make UVs” tool in the “Map” toolset in modeler. Since the loader doesn’t handle DMAP chunks, models using cylindrical or spherical mapping need to have the vertices split at the seam, or you’ll get mapping errors. Also, I never got around to writing the polygon smoothing algorithm, so for now it’s flat shaded only. The source code will compile under either Windows, using Microsoft Visual C++ 6.x or greater, or under Linux using GCC. Yup, it’s cross-platform code! Download the source code, binaries and sample data here. It’s about 3 megs because of all the model files and textures and whatnot that you get with it. I wouldn’t get too excited if I were you – once I got the object and scene loaders working, the rest of the engine was done in about five days. It does give some good example code for reading objects in native Lightwave LWO2 format, though. By the way, in the ‘credit where credit is due’ department, I started with the example ‘C’ loader code written by Yoshiaki Tazaki at D-Storm.

UPDATE: I’ve only just now gotten around to fixing a problem . . . → Read More: nGene

Sydney the Rat

I’ve just finished a couple of contracts for the U.S. Government, of all things! A lab rat and a bald eagle, both animated talking spokespersons for two different branches of the government (the National Institutes of Health and the Air Mobility Warfare Center at Fort Dix). You take your jobs where you find them, but how odd that I would find these.

The rat’s name was Sydney, and I understand it was some sort of inside joke at the National Institute of Health. And yeah, Sydney was a girl rat. Go figure.

Oh, and I’ve started learning Maya, now, too. It turns out that as fun as Lightwave is, 99.9% of the jobs out there want strong Maya skills. I love Lightwave, but I also like to eat and live in a house.

Writing Plugins for Lightwave

I am nearing completion of a small suite of plugins for a commercial client – what an adventure that’s been! I was writing Lightwave plugins to translate STL object model format into Lightwave model format, while preserving the materials attributes (raw STL doesn’t support materials). Then I had to write a new shader to render them that took into account the surface smoothing errors that the STL models tend to have in them (because of the strange tesselation choices the exporting software that creates STL files tend to make). I got it all working, finally. But boy was that stuff hard. I decided I’d never do another Lightwave plugin after that.