Tag Archives: ray tracing

Seven Things for May 4th, 2011

Seven things:

  • There’s a post on speculative contacts by Paul Firth, a way of simplifying and stabilizing collision detection that has been used in Little Big Planet. Particularly nice is that demos are built into the page, so you can try the various methods out and see the problems and performance for yourself. This author has followed up with “Collision Detection for Dummies“, a great overview, and “Physics Engines for Dummies“, again with interactive demos.
  • The Gamedev Coder Diary has a worthwhile summary of the current state of deferred shading vs. deferred lighting (aka “light pre-pass”) techniques, discussing problems and strengths of each.
  • The CODE517E blog has had a number of good posts lately, including an article on deferred rendering myths, another on stable cascaded shadow maps, an accumulation-buffer-like way of making super-high resolution images for printing (with some worthwhile analysis of problems it engenders with mipmap sampling and with view shifting – fun to think about), an extensive rundown of programming languages for videogames, and a summary of tools he uses (quite the long list – I’m still working through those I hadn’t seen before).
  • On the topic of languages, Havok put together a page collecting the Lua tutorial talks at GDC 2011.
  • The Boeing 777 model (almost 400 million polygons) ray traced at interactive rates on a consumer-level PC, using CUDA. CentiLeo is an out-of-core GPU ray tracer, see this page for some of the slides from the (rather long) video. That said, don’t be fooled by the start of the video: those sequences are generated at 15 seconds a frame and played back at 60 FPS (so 500-1000x from being real-time). Still, the preview mode is indeed interactive, and the Boeing is a huge model. On the other end of things, here’s a fun demoscene ray trace. By the way, Ray Tracey’s blog is good for keeping up on new ray tracing videos and demos and other related topics.
  • A poster accepted to SIGGRAPH 2011 by Ohlarik and Cozzi gives a clever little method of properly drawing lines on surfaces for GIS applications. It converts lines to “walls”, then marks those pixels where there is a visibility change of the wall (i.e., one pixel of the wall is visible, a neighboring pixel is not), with a correction for terrain silhouette edges. One more trick for the bag.
  • More about the look and feel of games than the technical nerdy stuff I cover here, Topi Kauppinen’s blog pointed me to Susy Oliveira’s sculptures, which are pretty amusing (finally, perfect models for 3D web browsers). There have been similar works by other artists (e.g. Eric Testroete’s head), but the more the merrier.

GPU Ray Tracing BOF at SIGGRAPH 2010

There will be a Birds of a Feather gathering at SIGGRAPH 2010 about GPU Ray Tracing: Wednesday, 4:30-6 pm, Room 301 A.

A brief description from Austin Robison: We won’t have a projector or desktop machines set up, but please feel free to bring your laptops to show off what you’ve been working on! Additionally, I’ve created a Google Group mailing list that I hope we can use, as a community, to share insights and ask questions about ray tracing on GPUs not tied to any specific API or vendor. Please sign up and share your news, experiences and ideas: http://groups.google.com/group/gpu-ray-tracing.

Another Introduction to Ray Tracing

I was waiting around a bit for my younger son’s doctor’s appointment this morning, so I decided to edit a book. I finished it just now, it’s called Another Introduction to Ray Tracing. It’s 471 pages in book form. You can download it for free, or order a paperback copy from PediaPress for $22.84 plus shipping. I won’t earn a dime from it, but since it took me less than two hours to make, no problem.

So what’s happening here? Due to investigating Alphascript and Betascript publishing a month ago, reporting it on Slashdot, and following up on a lot of great comments, I learnt a number of interesting tidbits. Here’s a rundown.

First, VDM Publishing itself is sort of a vanity press, but with no cost to the author. It seeks out authors of PhD theses and similar, asking for permission to publish. This is not all that unreasonable: because the works are only published on demand, the authors do not have to pay anything, they even get a few hardcopies for free. Here’s an example from our field that I reported on in February. That said, it’s mostly a win for VDM Publishing, who charge steep prices for the resulting works. Such not-quite-books mix in with other books on Amazon. It takes a bit of searching to realize that the work is a thesis and likely could be downloaded for free. A bit misleading, perhaps, but not all that horrifying. Caveat Emptor.

VDM Publishing also has an imprint called LAP, Lambert Academic Press, which does the same thing, publishing theses such as this one by Nasim Sedaghat. With a little Googling you can find Nasim, and then find the related paper for free.

VDM’s imprints Alphascript and Betascript Publishing I’ve already described, they’re little more than random repackagers of Wikipedia articles. Here’s an example book. I posted one-star reviews for a few of these books on Amazon; what’s funny is that the owner of the firm actually responded to my criticism (with a one-size-fits-all response in slightly broken English).

Four weeks ago Alphascript had 38,909 and Betascript 18,289 books listed on Amazon. To my surprise they now have 39,817 and 18,295 books, a total increase of only (only!) 914 new books – looks like they’re slowing down. They’ll have to work hard to catch up with Philip M. Parker’s 107,182 books or his publishing firm ICON Group International, with 473,668 books. The New York Times has an interesting article about this guy.

Betascript Publishing has two books found on Amazon related to ray tracing: Ray Tracing (Graphics) and Rasterization (which includes a section on ray tracing). The ray tracing book is 88 pages long and $46, more than 50 cents a page. My book, at $22.84 for 471 pages, is less than a nickel a page. So my new book’s better per pound. I actually worked a little compiling my book, making logical groupings, picking relevant articles, creating chapter headings, the whole nine yards (never did figure out how to make a cover from an existing Wikipedia image, though). The exercise showed me the limits of Wikipedia as a book-making resource: the individual articles are fine for what they are, some are wonderful, and editing them in a somewhat logical flow has some merit. However, there’s no coherence to the final product and there are large gaps between one article and the next. How to generate rays for a given camera? Sorry, not in my book.

Still, it was great to learn of PediaPress and the ability to make my own Wikipedia book for free. Poking around their site, I even found a book on 3D computer graphics, called 3D Computer Graphics (catchy, neh?). Seeing others making books, I decided to share my own, so now it’s official. Mind you, I haven’t actually read through my book, nor even really checked the flow of articles – no time for that. I mostly grouped by subject and title after identifying likely pages. That said, I do like having a PDF file of all these articles that I can search through.

Obviously authors are not about to be replaced by Betascript books any time soon. If you want to read a real introduction to the topic, a book like Ray Tracing from the Ground Up might serve you better, even if it is a whole dime a page. This cost/benefit ratio for a good book is something I’ll never get over, that books are sold at prices that are equivalent to the cost for just an hour or two for a computer programmer’s time and yet yield so much in the right hands.

7 Things for February 7

Comin’ at ya, lots of one-liners, vs. yesterday’s verbose posting.

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.

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.

7 Things for July 19th

Seven more:

  • Michael Abrash has an in-depth article on rasterization on Larrabee. Perhaps a little too in-depth at times; just skim past the assembly instructions. I also found myself asking, “why do that?” – the key is to just keep reading. He tries to make his examples simple and comprehensible, but at the cost of sometimes feeling like they’re oversolving the problem. They aren’t, it’s just that the solution is in fact used in different circumstances in order to be efficient.
  • SIGGRAPH has an interactive rendering event summary page. This page is more for the art production side of things, though; Naty’s coursetalks, and production sessions summaries are more comprehensive and more useful for programmer attendees.
  • NVIDIA has a number of events they’re involved in at SIGGRAPH 2009. Here’s the list.
  • I love this sort of madness: a business-card ray tracer that does depth of field.
  • Accumulated SSAO: the idea of reprojection, of using previous results by finding where they lie on this frame’s view, is one that seems a tad expensive for interactive rendering. It’s hard to know anything about performance and quality from this page, but I thought it was interesting to see.
  • I mentioned Processing in the last post. Another language-related resource for graphics and game programming is pygame, a set of Python modules for writing games. A friend said he found this system to be pretty great, that he could whip up a fairly involved game idea in a few hours.
  • Scribblenauts sounds like the coolest game that will ever come out, period. Even if it’s only 1/10th as good as the previews read, it looks to be pretty darn entertaining.

Interactive Ray Tracing BOF at SIGGRAPH 2009

Pete Shirley’s organizing an interactive ray tracing Birds of a Feather meeting at SIGGRAPH 2009. The details, as copied from here:

Interactive Ray Tracing
A variety of academic and industry leaders provide presentations and demos, with questions and discussions encouraged.

Tuesday, 5 – 6 pm
Sheraton New Orleans
Waterbury Ballroom
Peter Shirley
pshirley (at) nvidia.com

I’ll be there to help out. Pete’s already lined up demos from NVIDIA, Intel, Mental, an Imageworks affiliate, Breda University (Arauna), and Caustic. Right now we’re searching out academic groups or anyone else that want to show what they’re doing in the area. If you’ve got something to show or know someone that does, please contact Pete and me.

More With the Links

I love the movie sequel title “2 Fast 2 Furious”. How clever, and a great way to guarantee there will never be a third movie. Well, there was, but they had to go the colon route, “… : Tokyo Drift”.

Which is indicative of nothing, as I don’t think I’ve ever actually seen any of these movies. I was reminded of the title as my goal today is to whip through the backlog of 72 potential blog resource links I’ve been gathering on del.icio.us. [Well, as it turns out, I got through 39 of them (the fresher ones), 33 to go…]

ShaderX^7 has been published. We hope to give it an overview sometime soon (mine’s on backorder from Amazon.com).

From various source I heard that OnLive got a bit of notice at GDC. Think: pure server-side computation of all graphics for a game, i.e., a cloud computing model. Now even your grandma’s computer or even a rigged-out TV can play Crysis, assuming the net bandwidth is there. Which of course makes me think: what about latency? Lag for how other players see your action is always there, and causes mismatches (“how did I instantly die?”). But increasing lag for you seeing the consequences of your own actions seems like a non-starter for shooters, at least.

Mark DeLoura has a great two-part article on what game engines are licensed for titles. First part is a general survey, second is about the technology involved. I found it interesting to see what people cared about, e.g. multicore is on people’s minds. Nothing too shocking here, but it’s fantastic to see what is getting used, and why, in this marketplace.

Related to this, I happened across a list of game engines on wikipedia. Not massively useful (e.g. no sense of what’s popular), but a starting place.

John Ratcliff has a graphics math library available for download with an unrestrictive reuse license. He recently added best fit methods for AABB’s and OBB’s.

I was interested to look at the open source, cross-platform (!) model viewer GLC. I’ve wanted something like this for doing some experiments with mesh manipulation. Not a bad viewer, but that’s all it is at this point, unfortunately: you can’t even export to a different 3D format. The search continues… If you know a reasonable open source 3D file viewer/converter out there, please tell me. I should probably bite the bullet and just use Blender, but this application is way overkill.

CUDA voxel rendering – pretty impressive!

I liked this post on optimization mainly because of the line “I went in and found out that some title bar was getting rendered 140 times every time you refreshed the screen”. I can entirely relate (though 140 must be some kind of record): too many times I’ve put output debugging statements showing updates, only to see 2,3,6 updates happening. I once started on a project and in the first few weeks increased performance by 100%, simply by noting the main draw path was being executed twice each frame.

Speaking of performance, there’s an article on volume rendering optimizations when using a ray-casting approach on the GPU.

Wolfenstein source code for the free iPhone version, along with Carmack’s documentation on the project, is available.

Software patents are only slightly dumber than business method patents, which are patently absurd. I hadn’t noticed until now, but there was recently a ruling on a business method patent, In re Bilski, which has been used to strike down software patents.

A detailed data and execution flow diagram for the new DirectX 11 pipeline front-end is available from Jolly Jeffers.

People are still making ray-tracing specific hardware; witness Caustic Graphics. They have a rather amazing claim: “The CausticOne, however, thrives in incoherent raytracing situations: encouraging the use of multiple secondary rays per pixel. Its level of performance is not affected by the degree of incoherence.” Good trick. That said, I can’t say I see any large customer base for such a product. This seems like a company designed for acquisition, similar to Ageia. Fine by me, best of luck to them.

I’m happy to learn that the Humus site now has a news blog. This is a great site for demos of advanced techniques, and for honest comments about strengths and limitations of various approaches.

Another blog: The Geeks of 3D. Tracks demos, APIs, SDKs, and graphics card releases. Handy – some of the links here I found there.

There was a nice little article on data alignment on Gamasutra. Proper alignment is a key element in getting high performance.

I was trying to find the name of the projection of equidistant latitude and longitude lines for a surrounding spherical environment. From this interesting page (click on the “Wall Maps of the World” text) I found it: Plate Carrée.

Predicting the future is so much more interesting than predicting the past. I love this: MIPS per $1000. It’s entertaining to equate raw computing power with structured processing. By the same equivalence, I should be able to hook up 1700 mice in parallel to get a human brain.

A great line from a GPU review: “Nvidia’s new line of unbelievably expensive cards will block out the sun, and ray-trace its own shadow in real time.”

Faber College’s motto is “Knowledge is Good”. Learning about the idea of metamers would have saved this article from confusion. Coming back to this article now, I see all the comments have been removed, and an apologia trying to convert confusion into enlightenment added, but I think this still misses the point. Sure, there is a color associated with a single wavelength of light. But, my guess is that 99.99% of the colors we perceive arrive at any location on the eye as light with a spectral mix of wavelengths, not a single wavelength (Naty will correct me if I’m wrong). Unless you’re Dr. Evil and deal with sharks with frickin’ laser beams on their heads on a daily basis. Hmmm, I’m probably forgetting some other single-wavelength phenomena, like fluorescence. Anyway, the article did lead me to look up more information on metamers on Wikipedia, where I learnt about metameric failure, a term I hadn’t heard before. One more reason a simple RGB representation of color isn’t sufficient.

Cute thing: Snapily lets you turn some set of images or video into lenticular prints.

I don’t have a lot to say about what I do at Autodesk. Here’s a tidbit.

Art for the day, crayons as pixels.