Author Archives: Eric

NVIRT, a mini-blog, and “Creating Games”

I’m at I3D 2009; tonight at the dinner Austin Robison at NVIDIA announced NVIRT, which is NVIDIA’s ray-casting engine. I say “casting” as the idea is that you feed it objects, hand it a ray generator and it gives you back the ray intersections desired. Certainly it can be used for ray traced rendering, and the constructs presented make it clear they have thought through this aspect: rays can terminate on the first intersection found (useful for shadow rays), or can return the closest intersection point (eye/reflection/refraction rays). Rays can continue on when a fully transparent object is hit. Objects can be put in any efficiency structure you wish, and structures could be contained by other structures (Jim Arvo’s metahierachies idea). For example, you could put static geometry in a k-d tree, which is highly efficient but expensive to update, while placing dynamic objects in a bounding volume hierarchy, which usually can be updated more easily (though losing efficiency over time) by growing bounds. You have control over what efficiency methods are used.

They’re thinking of this SDK in more general ray-casting terms: collision detection, AI queries, and baking illumination or other characteristics onto surfaces. I can certainly imagine uses for engineering simulation. It runs on CUDA, but hides CUDA programming from the user. By the way, the switching time between CUDA and the graphics API will someday soon be a lot less that it is now.

This SDK will be released sometime this Spring (it will also be incorporated with NVIDIA’s NVSG scene graph SDK, as a separate release). The SDK will come with lots of samples, including source fo a basic ray-tracing renderer. All in all, an interesting development. The catch is, of course, that CUDA does not run on anything but NVIDIA hardware. Nonetheless, this is a fascinating first step. Austin says this effort is a serious attempt by NVIDIA to put this sort of engine in the hands of developers, not some “let’s see if this research sticks” half-baked release. Hearing him talk about the bits of inside information their group learnt about the operation of the GPU, and the corresponding boosts in performance, makes me wonder if other GPU-based ray tracers out there will be able to get near their performance.

I have a bunch of links saved up, which I’ll dump here someday soon, as well as more about I3D 2009 (see Jeremy Schopf’s blog in the meantime). For now I’ll just mention one quick link: Morgan McGuire’s twitter blog. No, it’s not a “I’m drinking a latte and using my iPhone” twitter blog. I like the idea a lot: it’s where he simply puts any great links he’s run across, with a quick description for each. Low maintenance, minimal effort, and useful & interesting, at least to me. It’s about game design and related topics (and unrelated ones) as much as graphics. This is one of those “everyone who finds cool stuff on the internet should do this” concepts, as far as I’m concerned. Sure, there’s del.icio.us and similar social bookmarking sites, but a blog lets me know when there’s something new from someone I respect.

Morgan is one of those uncommon people who has considerable industry experience (e.g. “Titan Quest”) while also being in the academic world. He’s a coauthor of the new book Creating Games, which I had been jumping around inside and sampling snippets, and am now sitting down and reading for real. It is aimed at being a book for teaching a college course on making games, both board- and video-, giving a number of schedules for 3 to 4 week projects and worksheets for these. However, these are appendices; the focus of the book is well-informed surveys of a wide range of game design and creation practices. The first chapter has a great startup project for small groups in a class: “here are some dice and pieces of different colors, some paper – go, make a game in 7 minutes.” Anyway, not graphics related per se, but there’s certainly a lot about the computer games industry inside, much of it technical and practical. My favorite illustration so far is the dependence graph amongst the art assets for Spiderman 3, Figure 3.8 – daunting. You can look inside at Amazon. Me, I’m an avid boardgamer (I was up too late last night playing Dominion with Morgan and Naty Hoffman – consider me entirely biased), so I’m enjoying reading it and thinking maybe I should try to design a game…

Graphics Gems Excerpts

I noticed (or maybe re-noticed) recently that 4 of the 5 Graphics Gems books are excerpted on Google Books. I’ve added links to the excerpts from the Graphics Gems repository. Which made me wonder, can you look inside these books on Amazon? Indeed you can. So I’ve also just added links to Amazon’s Look Inside pages. Between these two resources you can now pretty much read any article from these books online, one way or the other. Handy.

RT Quake Wars update

Daniel Pohl has a new article at his site about his efforts to ray trace the game Quake Wars at interactive rates. This article is not heavy-duty, and has some interesting tidbits and visualizations. For example, it turns out that cut-out textures (used for making trees, for example) are pretty expensive for his ray tracer. The problem is that a new ray must be spawned after each intersection is detected. The headache for ray tracing (at least in this system) is that the texture itself is not accessed at the time of intersection – deferred shading, essentially. So the ray tracer does not know that the ray has, in fact, not hit anything (i.e., hit a fully-transparent texel) and could continue unaffected. He also talks about other optimizations that have helped and might help in the future.

What I find exciting about Daniel’s work is that he’s working with data that was optimized for rasterization, not for ray tracing. If ray tracing was suddenly 10x faster than GPU rasterization with existing hardware in, say, DirectX 11 (keep dreaming), it wouldn’t matter that much in the short-term. For most companies there’s a lot of investment in training, workflows, and tools for producing games. For example, look how long it took normal mapping to become a mainstream feature, well after all new GPUs could support it (around 2002 with SM 2.0). So, ray tracing existing models I see as useful for determining whether ray tracing is feasible for current games, while also finding pain-points (such as cutout textures) that will be present in artist-generated content for some time to come.

This, That, and the Other

Time to clear the collection of links and tidbits.

First, two new graphics books have come to my attention: Essentials of Interactive Computer Graphics and Computer Facial Animation, Second Edition. The first is an introductory textbook for teaching, well, just that. Real-Time Rendering was never meant as an introduction to the field of interactive graphics, we’ve always seen it as the book to hit after you know the basics. The Essentials book is squarely focused on these basics, and is more event-oriented and application-driven: GUIs and MFC, instancing and scene graphs, the transformation pipeline. It’s truly aimed at computer graphics in general, not 3D lit scenes. Shading is barely mentioned, for example. The book comes with a CD of software libraries developed in the latter half of the book. See the book’s website for much more information and supplemental materials (e.g. Powerpoint slidesets for teaching from the book!).

Computer Facial Animation is an area I know little about. Which makes this book intriguing to page through -how much there is to know! The first few chapters are dedicated to anatomy and early ways of recording facial expressions. The rest covers all sorts of areas: speech synchronization, hair modeling, face tracking, muscle simulation, skin textures, even photographic lighting techniques. This is one I’ll leave on my desk and hope to pick up at lunch now and again (along with those other books on my desk that beg to be read, like Color Imaging – I need more lunches).

Which reminds me of this nice talk by Kevin Bjorke: Beautiful Women of the Future. The first half is more aesthetic with some interesting fact nuggets, the last half is a worthwhile overview of interactive skin and hair rendering techniques.

It’s worth noting that there are many computer graphics books excerpted on Google Books. Our portal page, item #6, lists a few good ones.

Game Developer Magazine’s Front-Line Award Winners have been announced. Our book was nominated, but to be honest I’m not terribly upset it didn’t win (our second edition won it before); instead, a new book on (video)game design got the honors in the book category, The Art of Game Design. The rest of the award winners are (almost) no doubt deserving, but the winner list provides little new information. It’s the usual suspects: Photoshop CS3, Havok, Torque, Visual Studio 2008 (really? I’d go with Visual Assist X, which adds a bunch of useful bits to VS 2008 to make it more usable). I haven’t seen the Game Developer article itself, which should be more interesting to see the list of runner-ups.

Update: it’s a day later, and the Front Line awards article is available online. Good deal!

I just noticed that Jeremy Birn has been having lighting contests for synthetic scenes. Meant more for the mental ray users of the world, I like it just because there are some nice models to load up in my test applications.

We mentioned SIGGRAPH Asia before; see the papers collection here and some GPU-specific presentations here.

A fair bit going on in the blogosphere:

  • Christer Ericson has an article on optimizing particle system display. I hadn’t considered some of these techniques before.
  • Bill Mill has a worthwhile rant on publishing code along with research results. This often isn’t done, because there’s little benefit to the author. Some researchers will do it anyway, for various reasons (altruism, fame, etc.), but I wish the research system was structured to require such code. It’s certainly encouraged for the journal of graphics tools, for example, but even then the frequency is not that high.
  • Wolfgang Engel has lots of posts about programming for the iPhone & Touch; I was more interested in his comments about caching shadow maps.

Everyone should know about the Steam Hardware Survey. The cool thing is that they recently started adding a history for some stats and, dare I dream it?, pie charts to the site. Much easier to grok at a glance.

Tutorials galore:

Need a huge (or medium, or small), free texture of the whole earth? Go here.

Google’s knol project collects short articles on various topics. Here’s a reasonable sample: a short history of theories of vision. To be honest, though, the site overall seems a bit of a dumping ground. This sort of lameness is proof why editorial supervision (either a single person or a wiki community) is a good thing.

DirectX 10 corrects a long-standing “feature” of previous versions of DirectX: the half-pixel offset. OpenGL’s always had it right (and there really is a right answer, as far as I’m concerned). I was happy to find this full explanation of the DirectX 9 problem on Microsoft’s website.

Our book had a little review in the February 2009 issue of PC-Gamer, by Logan Decker, executive editor, on page 80. I liked the first sentence: “I don’t know why I didn’t immediately set fire to this reference for graphics professionals the moment I saw all the equations. But I actually read it, and if you skip the math bits as I did, you’ll get brilliantly lucid explanations of concepts like vertex morphing and variance shadow mapping—as well as a new respect for the incredible craftsmanship that goes into today’s PC games.”

This one’s made the rounds, but just in case: the Mona Lisa with 50 semi-transparent polygons, evolved (sort-of). Here’s a little eye candy (two links). Plus, panoramas galore.

Finally, guard your dreams.

Yet Another Free Book

So I had such plans for all the things I’d get done during the holiday break. Well, at least I fixed our bathtub faucet, and kept the world safe from/for zombies in Left4Dead versus mode.

In contrast, Wolfgang Engel, Jack Hoxley, Ralf Kornmann, Niko Suni, and Jason Zink did something nice for the world: gave us a DirectX 10 book for free online. There’s more information about it at the site hosting it, gamedev.net. To quote Jack Hoxley, “It’s more of a hands-on guide to the API at a fairly introductory/intermediate level so doesn’t really break any new ground or introduce any never-seen-before cool new tricks, but it should bump up the amount of D3D10 content is available for free online.”

There are some great topics covered, including a thorough treatment of shading models, lots about post-processing effects, and an SSAO implementation (which I disagree with their specific implementation a bit in theory – convex objects shouldn’t really have self-shadowing ever, that’s why you usually ignore half the samples that are obscured, as a start – but SSAO is so hacky that it should be considered an artistic effect as much as photorealistic one). Lots of chewy stuff here.

Don’t be fooled because the book is only on the web, by the way. This is a high-quality effort: well-illustrated, the sections I sampled were readable and worthwhile, and there are solid code snippets throughout. The authors didn’t work out a print deal that they liked, so released the book to the web. You can see its original listing on Amazon. To quote Jack again, “We’re all glad it’s now out … for everyone to use.”

If you find errors or problems in the book, please let the authors know – the whole book is on a wiki, so you can add discussion notes (note: I found the wiki doesn’t work well with Chrome, but Internet Explorer worked fine). As the gamedev.net article notes, this release may form the basis of a book on DirectX 11, so could be considered something of a free beta. Please do reward the authors for their hard work by contributing feedback to them.

Update: Do keep in mind that this is a first draft (i.e., cut them some slack). Reading more bits, quality varies by section. I trust the authors will read and fix each others’ work as time goes on. I do like the wiki element. For example, there are some comments from Greg Ward in the corresponding discussion page for the implementation of the Ward shading model that should help improve their text.

I3D 2009 Papers Listed

I3D 2009, the ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games, will be in Boston on February 27 to March 1. Along with Morgan McGuire I’m a papers cochair this year. Naty served on the papers committee along with 81 others, plus external reviewers; over 300 reviewers were written. We were happy to see a large number of submissions: 87, up from 57 last year. 28 papers were accepted. The papers to be presented are now listed at http://kesen.huang.googlepages.com/i3d2009Papers.htm.

Heh, I just noticed Naty also posted this site; well, a little duplication won’t kill you. Amazing to me, Ke-Sen had already tracked down 9 of the papers accepted at I3D – acceptance notices went out on the 5th. I sent the list of all papers accepted to Ke-Sen, as this became open knowledge on the 15th. Ke-Sen’s listing is about as official as it will get until the final program is published at the I3D site.

I should also note that the Posters deadline is just a few days away, on December 19. Posters are a great way to present an idea or a demo and get feedback from the community, without having to spend the time and effort of writing a full formal paper.

Gift Books

What with Saturnalia and Festivus coming up, I’ve been buying books. Here are some of the more visually-related titles I’ve found:

  • Mars 3-D – a book of 3D red/blue stereograms of pictures of Mars. I like the way that you cannot lose the glasses: they’re built into the cover of the book.
  • ABC3D – Officially a kid’s alphabet book, it’s actually a well-crafted (and relatively inexpensive) pop-out book with clever little mechanisms and visual tricks throughout.
  • Gallop – This one really is a kid’s book, but the animation mechanism is fun. You can also get a set of greeting cards of the book. Swing is another by the same author.
The main reason GPUs are so numerous and so cheap is games, of course. My current addiction is Left4Dead, but I hope to play a lot of good board games during the holiday break. Some books I’m passing out this year:
  • Game Design Workshop – My older son hopes to do a class project of designing a board game, and this looks like a book that will help. I wish Game Developer magazine would gather its game design articles into book form.
  • The Game Maker’s Apprentice – I hope to lure my younger son into making simple videogames with this, a good book of tutorials for the Gamemaker software, which itself is free to download.
  • One Jump Ahead – About a computer program to play checkers and so much more, by the person who eventually solved checkers. Longer review here. I just love this book on so many levels. I don’t know what the new edition adds; the older edition is noticeably cheaper on half.com.
OK, enough diversion from the main topic of this blog; I’ll get back to that next post.

More Free Books

GPU Gems 3NVIDIA’s done it again, they’re releasing GPU Gems 3 to the web. It’s being done in the installment plan, I expect so that there’s something to announce every few weeks, which is fine. Eventually the whole book will be available, so much better to have this “section a month” scheme than not at all. NVIDIA’s to be complimented on their progressive attitude. GPU Gems 3 is less than a year and a half old, so could still make a few dollars, but NVIDIA’s goal is to get the information out there.


ShaderXThis summer Wolfgang Engel and I tracked down authors of the ShaderX and ShaderX^2 books and secured releases. The ShaderX^2 books quickly found a home at gamedev.net, but Wolfgang had to dig around for the PDF for the first ShaderX book, then find a place to host it, plus the dog ate my homework, etc. Long and short, the original ShaderX book is now free for download here: http://tog.acm.org/resources/shaderx/ – I decided to host it on the ACM TOG site, as it’s a valuable resource, despite its hoary old age. Just ignore the first chunk about using 1.x shaders and enjoy the rest.

I do wish the GPU Gems books were available as PDFs (hint, hint, NVIDIA), as they would be much easier to search for those “I know I saw this in one of these books” moments.

This and That

I’ll someday run out of titles for these occasional summaries of new(ish) resources, but in the meantime, this one’s “This and That”.

Christer Ericson’s article on dealing with grouping and sorting objects for rendering is excellent. It mostly depends on input latency, but has concepts that can be applied in immediate mode.

An element that continues to renew the field of computer graphics is that the rules change. This article is about taking Quake 2 (from 1997) and moving it to a modern GPU.

If you haven’t seen it yet, Farbrausch’s demo “debris” is truly impressive. It’s only 183,462 bytes, and is absolutely packed with procedural content. Download here (last link works). Or be lazy and watch on YouTube.

NVIDIA’s pulled together its resources for shadow generation and ambient occlusion all onto one handy page (plus ray tracing – just one entry so far, but it’s a good one).

How to deal with various rendering paradigms on multiple platforms? GRAMPS looks intriguing.

Gamasutra put a useful Game Developer article online, all about commercial middleware game engines currently available.

OpenGL will always exist, since Macs and Linux need it. It’s easier to use in college courses because of its clarity and readability. But otherwise the pendulum’s swung far towards DirectX. Phil Taylor comments on and gives some historical context to the controversy around the latest release, OpenGL 3.0.

A nice trend for OpenGL is that people continue to write useful bits, such as GLee, which manages extensions.

New info on older effects: blur and glow, volumetric clouds, and particle systems.

The glorious teapot. I like “a wireframe view”. Yes, the real thing is taller than the synthetic model, as the model makers were compensating for non-square pixels.

“What’s the future hold?” is always a fun topic, one we’ve used each edition to end our book. I liked this presentation on SlideShare for its sheer “here are a hundred things that hurtle us towards the Singularity” feel, though I don’t buy it for a minute. SlideShare, where it is hosted, is a pleasant medium-attention-span kind of place, with all sorts of random and fun slidesets.

Finally, I am pleased to find that LittleBIGPlanet is just as gorgeous as it looked like it would be. I’ve played myself for only a bit, but walking by when my kids are playing I find I have to stop and stare.