Author Archives: Eric

Clearing the Queue

I’ve have a goal this week (it should be clear by now) of clearing my queue of stored-up RTR links by my birthday, today! (Hint: I want a pony.) So excuse the excessively-long list o’ links. Next task on my list, update the main RTR page itself.

  • StructureSynth. This looks pretty cool, and I love procedural models (my ancient SPD package was all about this, back in the days when downloading models was oppressively slow). I do wish they just provided an executable – building looks like a pain.
  • That previous link was on Meshula.net, which also blogs about Pixel Bender Fractals. Great stuff, sort of steampunk computer graphics: you must click this link, if no other on this page, and look on in awe.
  • Shapeways has a blog, and it’s not just dull company announcements. I’m glad they find people as pixels as interesting as I do. They also cover exporting Spore characters to Collada files (which is a great addition to Spore) and creating physical models from these.
  • In related news, The Economist has a reasonable summary of some trends in 3D printing. Their Technology Quarterly also has articles on Augmented Reality, 3D displays, and CAPTCHAs, among other topics.
  • This is one more reason the Internet is great: an in-depth article on normal compression techniques, weighing the pros and cons of each. This sort of article would probably not see the light of day in traditional publications, even Game Developer – too long for them, but all the info presented here is worthwhile for a developer making this decision. Aras’ blog has other nice bits such as packing a float into RGBA and SSAO blurring.
  • I need to add a link to the article itself to the object intersection page, but Morgan McGuire recently verified that he found this ray/box algorithm super-fast in SIMD. Code’s downloadable from that page, free version of article is downloadable here. Morgan uses this test in the ray tracer for his cool photon mapping paper at HPG 2009; if nothing else, you should at least see the video.
  • In related news, I am happy to see that AK Peters is beginning to put past journal of graphics tools articles online. At $15 each, the price of an article is quite high for individuals (or at least this individual), but current journal of graphics (gpu, & game) tools subscribers have full access to this archive for free. The mechanism to get access is a little clunky right now: if you’re a subscriber, you need to register with Metapress, then tell AK Peters your userid and they’ll provide you access.
  • Related to this, I hope Google Books conquers the world (or anyone else doing similar work, as long as it isn’t Apple or Amazon or other overcharging closed-box “we’re just protecting the authors, who get 10% or less for a purely digital sale with nil physical cost to us per unit” retailers – rant over, and I do understand there are fixed start-up costs for the retailer/publisher/etc., but really…). Google Books is so darn handy to look for short articles in books at Google’s repository, such as this one giving a clean way to build an orthonormal basis given a vector, from Graphics Tools: The JGT Editors’ Choice.
  • Humus provides a whole slew of new cubemaps he captured, if you’re getting tired of Grace Cathedral.
  • CUDA itself (vs. others) may or may not be a critical technology, but what it shows about the underlying GPU architecture is fascinating.
  • It should be mentioned: August 2009 DirectX SDK is available. Includes the first official release of DirectX 11.
  • This is hilarious, and possibly even useful!
  • I love seeing things like this: build your own multitouch display. Not that I’ll ever do it, but I hope others will.
  • You might be sick of Larrabee news (ship one, already!), but I found Phil Taylor’s article pleasantly hype-free and informative.
  • ATI’s Eyefinity (cute marketing name, I must admit – now I want to use the word everywhere) seems to me to solve a problem that rarely occurs: too much GPU for too few screens. Still, it’s nice to have the option. Eyefinity allows up to six monitors to be driven by a single GPU. I guess Eyefinity is useful when running older flight simulator programs on newer GPUs; otherwise, Eyefinity is pretty irrelevant. Eyefinity, eyefinity, eyefinity. At work I find two displays is plenty, one to run, one to debug. Anyway, the sweet spot for the monitor:GPU ratio is 13:1, as can be seen here:
    Flight Simulator - living the dream
  • There’s an article on instancing animated grass using DX10 on Gamasutra.
  • Humus’ summary of z interpolation is a good summary of the topic. He gives some of the key tricks, e.g., if you’re using floating point, use a near=1.0 and far=0.0 to help preserve precision.
  • Here’s a basic tutorial on different projection methods used in videogames, with lots of visual examples (add “Zaxxon” and it’s complete, for me). The one new tidbit I learnt from it was about reverse perspective, an effect I’ve made myself once every now and then when I screw up a projection matrix.
  • While I’ve been on break (one of the reasons I’ve been posting so much – Autodesk gives wonderful 6 week “sabbaticals”, aka “long vacations”, to U.S. employees every four years you’re there; it’s like being French or Swedish every fourth year), the rest of the company’s been busy: this new sketch application for the iPhone looks pretty cool, at the usual $2.99 “cup of coffee” type price.
  • Caustics can be dangerous. I can attest to this myself; a goofy award Andrew Glassner gave me long ago sat on my windowsill for years (I moved once, as you should discern from the picture), until I noticed what was happening to the base:
    caustics
  • I usually don’t have time to keep up with Slashdot, but SeenOnSlash, the funny bits of SlashDot, is sometimes entertaining. Graphics-related example: AMD’s latest chip.

Seven Programs for September 16th, 2009

  • LLVM compiler. A number of people at the High Performance Graphics 2009 symposium were impressed, or even using, this new compiler. It’s new, based on recent research on compilers and optimization, and is supposed to be darn good. More here, with page 3 talking about Apple’s use of it for GLSL code optimization.
  • Very Sleepy CPU Profiler. Free, of course, and works directly on any Windows app with PDBs. Sounds pretty convenient if you don’t have access to a reasonable profiler, or just want to try a different one (I’ve found profilers sometimes have blind spots or peculiar biases). Bonus link at the same site: summaries and links to classic graphics papers. The first sentence on this page made me laugh.
  • Vista Gadgets. I use the NVIDIA temperature gadget, the memory monitor’s also handy. An alternate temperature gadget is here.
  • NVIDIA NEXUS. Debugging GPU code with PIX is flakey at best; I have high hopes that this product from NVIDIA will be much better. It’s something NVIDIA will charge for (a first for NVIDIA, I think), and that’s fine by me if it does a noticeably better job.
  • NVPP. A CUDA library of functions from NVIDIA. I haven’t tried CUDA, but this library looks worthwhile. To be honest, in the long-term OpenCL or compute shaders look like the popular future for commercial products vs. research, since those two are multi-platform. CUDA is much more developed at this point, however, and I’ve heard that whatever techniques you learn using CUDA can almost always be applied to the other two. So, I’m on the fence waiting for a winner, since I have no personal reason to use any of them at this point.
  • VMMap. A little free application that shows where all the memory went.
  • OverClock Checking Tool. I kinda forgot people still overclock. This utility is interesting even if you don’t, if nothing else than to check if things are working. It’s a bit exciting to hear my GPU’s fan kick into overdrive as the temperature climbs to 87 degrees Celsius (188.6 Fahrenheit). I also learnt a little more about my Intel Core 2 Quad CPU: it “idles” at 2.0 GHz, but jumps up to 2.66 GHz when running something serious. I wimped out on going ahead with the Power Supply test, as their warning kept me away.

Seven Things for September 15, 2009

  • RapidMind is now a part of Intel. Which I think is a good fit; RapidMind does some interesting multicore techniques. Anything that makes multicore programming easier for a larger group of people is all to the good.
  • I3D 2010 Call for Participation. October 23rd for papers, December 18th for posters – submit! I3D will be in Washington, DC, February 19-21.
  • Dirty Coding Tricks in Gamasutra. A reprint of a Game Developer article, I’m glad to see it online – it’s pretty amusing in places. The hack at the top of page 2 is my favorite.
  • Carmack on the iPhone 3GS. Now the iPhone begins to face the same problem PC developers have to deal with: different levels of GPU support. At least there will be only one line of Apple phones, vs. multiple IHVs with a wide range of offerings at different price points, etc.
  • Mendeley Bibliographic Database. Manny Ko mentioned this one to me, and it looks interesting: a number of tools to pull in PDFs, get their references, let you annotate them, etc.
  • O’Reilly’s author guide. A surprisingly open and honest guide to how you as an author deal with publishers, specifically O’Reilly. Many publishers consider their contracts and royalty terms to be trade secrets, so it’s refreshing to see this information given in a straightforward manner.
  • aM Laboratory ToneMatrix. Pretty fun, and it reminds me of an experimental device seen at SIGGRAPH a few years ago. To see the most elaborate (and beautiful) web app ever, click on the AudioTool link, Start AudioTool, then pick DrumNBass. Scroll around. Click the menu in the lower left corner. Amazing.

Visual Stuff

After all the heavy lifting Naty’s been doing in covering conferences, I thought I’d make a light posting of fun visual stuff.

The first one’s not particularly visual, I include it just because the cover and book description was put on the web just a few days ago:

GPU Pro cover

In short, the ShaderX series has moved publishers, from Charles River Media to A.K. Peters. Unfortunately for everyone else in the world, CRM retains the rights to the ShaderX name, hence the confusing rename. This book is ShaderX8, under a new title.

This resource is possibly handy: a map of game studios and educational institutions, searchable by state, city, etc. That said, it’s a bit funky: search by “Massachusetts” and you get a few reasonable hits, plus the Bermuda Triangle. Search on “MA” for State and you get lots of additional hits, mostly mall stores. But, major developers like Harmonix (in Cambridge) don’t show up. So, take it with a grain of salt, but it might be handy in turning up a place or two you might not have found otherwise.

A few weeks back I passed on a link from Morgan McGuire’s worthwhile Twitter blog (the only good use I’ve seen for Twitter so far) for a business-card sized ray tracer created by Andrew Kensler. In case you were too busy to actually compile and run this tiny piece of code, here’s the answer, computed in about a minute, sent on to me by Mauricio Vives. Note the depth of field and soft shadows:

Andrew Kensler's ray tracer

Speaking of ray tracing, I noticed some GPU-side ray tracers are available for iPhone 3GS from Angisoft:

Julia Set ray traced

With the recent posting on Morphological Antialiasing, Matt Pharr pointed me at this cool Wikipedia page on scaling up pixel art. To whet your appetite, here’s an example from that page, the left side being the original image used to generate the right:

Wikipedia pixel art scaling example

In a similar vein, I was highly impressed by the examples created by Potrace, a free, GPL’ed package for deriving Bézier curves from raster images. Here’s an example:

Original, raster head Smoothed head with Potrace

See more examples on Peter Selinger’s Potrace examples page. Doubly impressive is that Peter also carefully describes the algorithms used in the process.

I enjoy collecting images of reality that look like they have rendering artifacts. Here’s one from photos by Morgan McGuire, from the Seattle public library. The ground shadow look undersampled and banded, like someone was trying to get soft shadows by just adding a bunch of point light sources. What’s great is that reality is allowed to get away with artifacts – if this effect was seen in a synthetic image it would come across as unconvincing.

Seattle Public Library by Morgan McGuire

The best thing about reality is that it’s real, not photoshopped. I also enjoy photos where reality looks like computer graphics. Here’s a fine example by Benedict Radcliffe from this entertaining collection:

Wireframe Toyota by Benedict Radcliffe

My one non-visual link for this posting is to Jos Stam’s essay on how photography and photorealism is not necessarily the best way to portray reality.

There are tons of visual toys on the web, a few in true 3D. Some (sent on by John McCormack) I played with for up to a whole minute or more: ECO ZOO – click on everything and know it’s all 3D, don’t forget to rotate around; the author’s bio and info is at ROXIK – needs more polygons, but click and drag on the face. In the end, give your eyes a rest with this instant screen saver (actually, it’s also a bit interactive). This last was done using Papervision3D, an open source library which controls 3D in Flash. More demos here. Maybe there’s actually something to this idea of 3D on the web after all… nah, crazy dream.

OK, I’m done with things that are in some way vaguely, almost educational. Here’s a video, 8 Bit Trip, that’s been making the rounds; a little more info here. Not fantastically entertaining, but I admire the amazing dedication to stop motion animation. 1500 hours?!

Art: Xia Xiaowan makes sculptures by a method reminiscent of volume rendering techniques:

Xia Xiaowan sculpture

More at Google Images.

The Mighty Optical Illusions blog is a great place to get a feed of new illusions. Here are two posts I particularly liked: spinning man (sorry, you’ll actually have to click that link to see it) and more from Kitaoka, e.g.

Kitaoka's rotating snake planets

I love that new illusions are being developed all the time nowadays. I found this next one here; unfortunately, to quote Tom Parmenter, “digital technology is the universal solvent of intellectual property rights” (Copyright 1995). No credit is given at that site, so I don’t know who actually made this one, but it’s lovely:

4 perfectly round circles

One last illusion, from here (again, author unknown), included since it’s such a retina-burner:

Flying City

If you hanker for something real and physical after all these, you might consider making a pseudoscope (instructions here). To be honest, I tried, and I’ll tell you that mirrors from the local craft store are truly bad for this project. So, I can’t say I’ve seen the effect desired yet. Next step for me is finding a good, cheap store for front surface mirrors (the link in the article is broken) – if anyone has suggestions, please let me know.

ShaderX^2 Code Available for Download

With Wolfgang Engel’s blessing, I’ve added the ShaderX2 books’ (both of them) CD-ROM code samples as zip files and put links in the ShaderX guide. The code is hardly bleeding edge at this point, of course, but code doesn’t rot – there are many bits that are still useful. I’ve also folded in most of the code addenda into the distributions themselves. The only exception at this point is Thomas Rued’s stereographic rendering shaders; in reality, more up-to-date information (and SDK) is available from the company he works with, ColorCode 3-D.

Our book’s figures now downloadable for fair use

A professor contacted us about whether we had digital copies of our figures available for use on her course web pages for students. Well, we certainly should (and our publisher agrees), and would have done this awhile ago if we had thought of it. So, after a few hours of copying and saving with MWSnap, I’ve made an archive of most of the figures in Real-Time Rendering, 3rd edition. It’s a 34 Mb download:

http://www.realtimerendering.com/downloads/RTR3figures.zip

Update: preview and download individual figures on Flickr

Update: figures for the Fourth Edition are here.

This archive should make preparation a lot more pleasant and less time-consuming for instructors, vs. scanning in pages of our book or redrawing figures from scratch. Here’s the top of the README.html file in this archive:

These figures and tables from the book are copyright A.K. Peters Ltd. We have provided these images for use under United States Fair Use doctrine (or similar laws of other countries), e.g., by professors for use in their classes. All figures in the book are not included; only those created by the authors (directly, or by use of free demonstration programs, as listed below) or from public sources (e.g., NASA) are available here. Other images in the book may be reused under Fair Use, but are not part of this collection. It is good practice to acknowledge the sources of any images reused – a link to http://www.realtimerendering.com we suspect would be useful to students, and we have listed relevant primary sources below for citation. If you have questions about reuse, please contact A.K. Peters at service@akpeters.com.

I’ve added a link to this archive at the top of our main page. I should also mention that Tomas’ Powerpoint slidesets for a course he taught based on the second edition of our book are still available for download. The slides are a bit dated in spots, but are a good place to start. If you have made a relevant teaching aid available, please do comment and let others know.

HPG and SIGGRAPH: pix and links

Some seven links to keep you busy while we digest HPG and SIGGRAPH:

  • Pictures of HPG and SIGGRAPH – even though just about everyone at these conferences has a camera in some form on them, we just about never take pictures. I decided to try to photograph anyone I recognized this year.
  • Tim Sweeney’s HPG keynote slides – I didn’t attend the keynote, unfortunately, but heard about it. Main takeaway for me is that programming these highly parallel machines is hard, and the more that IHVs can do to ease the burden and remove limitations the more successful they will be.
  • While waiting for our HPG reports, read Steve Worley’s.
  • The course notes for “Advances in Real-Time Rendering in 3D Graphics and Games” will be up in a few weeks, if not sooner. Crytek’s presentation is available at their website.
  • The “Beyond Programmable Shading” course notes are available now. I particularly liked Johan Andersson’s talk, partially for the sheer complexity of it all. The various factors that affect making a game engine fast are a bit mind-boggling.
  • The place to go for interactive ray tracing development information is the ompf.org forum.
  • This was the first year ever that I didn’t attend the Electronic Theater. Well, I did attend the first half-hour (live real-time demos), but then found myself looking at my watch as colorful but meaningless things occurred on the screen. I think the fact that we could attend the E.T. without needing a ticket meant that I could keep putting it off and also wouldn’t feel I lost anything if I missed it. If SIGGRAPH had issued me a ticket for a specific night, I suspect I would have willingly stayed for all of it, not wanting to lose the value of the ticket. Psychology. All that said, the best colorful but meaningless real-time demo I saw was “DT4 Identity SA“, freeware which runs on a Mac and is quite charming.

Morphological Antialiasing

An Intel research group has put their papers and code up for download. I had asked Alexander Reshetov about his morphological antialiasing scheme (MLAA), as it sounded interesting – it was! He generously sent a preprint, answered my many questions, and even provided source code for a demo of the method. What I find most interesting about the algorithm is that it is entirely a post-process. Given an image full of jagged edges, it searches for such edges and blends these accordingly. There are limits to such reconstruction, of course, but the idea is fascinating and most of the time the resulting image looks much better. Anyway, read the paper.

As an example, I took a public domain image from the web, converted it to a bitonal image so it would be jaggy, then applied MLAA to see how the reconstruction looked. The method works on full color images (though has to deal with more challenges when detecting edges). I’m showing a black and white version so that the effect is obvious. So, here’s a zoom in of the jaggy version:

zoomed, no antialiasing (B&W)

And here are the two smoothed versions:

zoomed, original zoomed, MLAA

Which is which? It’s actually pretty easy to figure: the original, on the left, has some JPEG artifacts around the edges; the MLAA version, to the right, doesn’t, since it was derived from the “clean” bitonal image. All in all, they both look good.

Here’s the original image, unzoomed:

original

The MLAA version:

MLAA

For comparison, here’s a 3×3 Gaussian blur of the jaggy image; blurring helps smooth edges (at a loss of overall crispness), but does not get rid of jaggies. Note the horizontal vines in particular show poor quality:

3x3 Gaussian blur

Here’s the jaggy version derived from the original, before applying MLAA or the blur:

jaggy B&W version

7 Things for July 26th

  • Books, books, and more books: I received review copies of two books. Best of Game Programming Gems is as it sounds, certainly cheaper than buying the seven books in this series, no real review needed (look inside). Game Engine Architecture is about just that, how to make a professional-grade game rendering system, from soup to nuts (you can look inside). Eberly’s two books are the previous notable works in this area, but are quite different than this new volume. While they focus almost exclusively on algorithms, this book attempts to cover the whole task of developing an engine: what to use for source control, dealing with memory management and in-game profiling, input devices, SIMD, and many other practical topics. There is also algorithmic coverage of rendering, animation, collision detection and physics, among other areas. Naturally, the amount of information on each area is limited by page count (the book’s a solid 860 pages), but in my brief skim it looks like most of the critical areas and concepts are touched on. You won’t become an expert in any one area from this volume, but it looks like you’ll have some reasonably deep understanding of the elements that go into making a game engine. Quite an impressive work, and I know of nothing else in this area that is so detailed. I hope I get a chance to read it (who am I fooling? Though I do wish I had the time…) – well, at the least, it’s a place I’ll first go if I want to learn about a topic in game development that I know little about. If you’d rather wax nostalgic about great game engines you have known, as well as what the state of the are is, this article is for you (oh, yeah, the author of this new book works at the company that made #3).
  • Looking around for titles I’d like to look over at SIGGRAPH, I found these: Game Graphics ProgrammingProgramming the Cell Processor: For Games, Graphics, and ComputationIntroduction to 3D Game Programming with DirectX 10Ultimate Game Programming with DirectX, 2nd Ed., Advanced Game ProgrammingGame Coding Complete. Which all sort of sound the same (except for the Cell book), but I’d be happy to page through each and see if it looks promising.
  • There’s a worthwhile comparison of average vertex normal computation methods on the MeshLab blog. He gives the nod to Thürmer and Wüthrich’s method. You can try each of the three using MeshLab itself.
  • Sure, Spore didn’t light the world on fire as many of us hoped, but a lot of cool technology was explored. Chris Hecker has a worthwhile rundown of some of the great stuff they worked on.
  • There are some surprisingly affordable 3D stereolithography objects available on Shapeways. I bought Spiral Cage (tiny, but impressive, and so cheap), Clematis (looks delicate, but is quite springy), and Gyroid (pricier, but more sizeable and a fun form). It’s great to see so many people exploring such areas; here’s a detailed summary of resources. Even if you never plan on getting involved, the Flickr area dedicated to such techniques is worth a browse.
  • This one amused me: a cloud computing company had a contest that was meant to show off Ruby and cloud computing strengths. It was won by people brute-forcing the problem with GPUs: 16 used by the first-place winner (plus 117 CPU cores, which had less performance total than the 16 GPUs), 4 by the second. Steve Worley and others talk about the GPU approach on the CUDA forum (his program, shared with the community there, was used to win second place).
  • I admire the dedication.

7 Things for July 20th

While at SIGGRAPH I like to look at new books at the booths. One you may wish to check out is Graphics Shaders: Theory and Practice, from AK Peters (or just use “Look Inside” on Amazon). I received a review copy and skimmed through it. If you’re interested in programming in GLSL 1.2 (part of OpenGL 2.1), consider looking at this one. A minor problem is that it’s not quite as up-to-date as the Orange Book (now on OpenGL 3.1), but the difference in core concepts between language versions is not large. The Graphics Shaders book is full color and comes with a lot of GLSL code examples. It has a bias towards scientific visualization, though not so much that it neglects the basics. I particularly enjoyed the chapter on noise, as it gave one of the clearest explanations I’ve seen on the differences between various types of basic interactive noise functions. One or two elements in the book are a little weak – the flowcharts for pipelines are often too small and difficult to read, for example – but all in all this looks like a solid contribution to the field. Don’t expect more elaborate effects, e.g., shadows are not touched upon. It does cover the basics, plus some additional topics like image post-processing (not normally covered in texts I’ve seen). One of the authors wrote a nice learning tool for GLSL, glman, free for download. If you find you like this tool, definitely consider the book.

Another book I noticed recently is Fluid Simulation for Computer Graphics. This is a topic I know little about, I was just interested to see that there’s any book at all. It looks pretty equation-filled, so is definitely for the serious practitioner.

Speaking of fluid simulation, Intel has an article on this topic for games. One of the chief strengths of any publication is that its staff makes a decision based on merit as to what is published and what is culled. So, I have to admit to being leery of anything that says, “Sponsored Feature”, as that means editorial review and decision-making are gone. I tend to err on the side of ignoring such articles (there’s plenty to read already). That said, Intel’s had quite a number of these articles recently, including such topics as instancing, ocean fog, FFT’s for image processing, and quite a few on parallelism.

In the “clearing the queue” category of links, I don’t think I ever pointed out this handy page, which presents all AMD/ATI and NVIDIA presentations at GDC 2009.

There’s now a (not very active, but at least it exists) Microsoft DirectX blog.

On the OpenGL front, NVIDIA has introduced bindless graphics to help avoid L2 cache misses. I will be interested to see how APIs evolve, as the elements in the current APIs that are bottlenecks are not so much CPU or GPU limitations as due to the API constructs themselves.

Thing for the day: an advertisement with interesting stippling.