Highlights from GDC 2014 presentations

This page is my per­sonal col­lec­tion of high­lights from GDC 2014. I was not able to attend in per­son, so I had to rely on Twit­ter to get updated. The immer­sion was not per­fect, but some of the thrill was def­i­nitely car­ried over. So here it goes (in release order):

Math for Game Pro­gram­mers: Inverse Kinematics

Gino van den Bergen

Gino “dual num­bers” van den Bergen describes an alge­braic frame­work for kine­mat­ics, based on — you guessed it — dual num­bers. It is worth tak­ing seri­ously though. The approach is based on the fact that the group of rigid-​body trans­for­ma­tions is cov­ered by dual quater­nions (quater­nions made up from dual num­bers, as in typedef Quaternion<DualNumber> DualQuaternion, or equiv­a­lently \mathrm{C\el}l^+_{3,0,1}}), and so an IK-​chain is mod­eled alge­braically by a bunch of dual quater­nions mul­ti­plied together, which can be solved for more eas­ily than with matri­ces. Pretty clever.

Math for Game Pro­gram­mers: Grass­mann Alge­bra in Game Development

Eric Lengyel

This talk has back­ground infor­ma­tion about exte­rior alge­bra and the pro­jec­tive split, and some­what tan­gent (no pun intended) to the dual quater­nion talk men­tioned above, because it is all based on the same 19th cen­tury stuff (Grass­mann, Hamil­ton, Clif­ford) that is mak­ing a renais­sance these days. Lengyel first gives the mes­sage “know your vec­tors”, by dis­sect­ing ordi­nary vec­tors, bi-​vectors (aka. axial vec­tors), and co-​vectors (aka. pseudo-​vectors). The sec­ond part shows how to eas­ily carry con­cepts from 3-​D to homoge­nous 4-​D (for exam­ple, doing a 4-​D cross prod­uct, join and meet, etc).

Assassin’s Creed 4: Black Flag Road to next-​gen graphics

BART­lomiej WRONSKI

This talk dis­cusses 3 next-​gen tech­niques used in Black Flag: global illu­mi­na­tion, fog irra­di­ance vol­umes and screen space reflec­tions. For me, the fog vol­umes were the most inter­est­ing part, as the team has devised a clever compute-​based approach do solve the issue. The talk also has some prac­ti­cal details on the inner work­ings of AMD’s GCN graph­ics chips.

Approach­ing Zero Dri­ver Over­head (a.k.a. →0)

cass everitt et. al.

This pre­sen­ta­tion and a sim­i­lar one given at the Steam dev days show a con­certed effort of major graphic chip ven­dors to evolve OpenGL fur­ther and reduce dri­ver over­head to break the draw call bar­rier and enable a push in scene com­plex­ity. The impor­tant bits here are bindles tex­tures, per­sis­tently mapped buffers and Mul­tiDrawIndi­rect, together with the fact that you can fill mul­ti­ple buffers con­cur­rently from mul­ti­ple threads (mul­ti­thread­ing is in OpenGL since ver­sion 1, and buffers can be shared among contexts). This already works with exist­ing dri­vers using exist­ing exten­sions. I am a firm believer and prac­ti­tioner of Never Start Over, there­fore I wel­come a more evo­lu­tion­ary path in favor of rad­i­cal new designs like Man­tle or #DirectX12 (though com­pe­ti­tion is always healthy).

Ren­der­ing Bat­tle­field 4 with Mantle

johan ander­s­son

Nev­er­the­less it was inter­est­ing to see details on the pro­posed Man­tle API. I think it is no coin­ci­dence that they choose to pre­fix their entry points with “gr”, sim­i­lar to Glide (the only viable spir­i­tual pre­de­ces­sor to Man­tle if there should be any). Doing graph­ics the Man­tle way revolves around pipeline objects and descrip­tor tables. Both are larger hand have even coarser gran­u­lar­ity than the ren­der state objects intro­duced in DirectX 10 (the lat­ter ones turned out not to match actual hard­ware at all, so they’re not see­ing the perf boost that they thought they would bring). Inter­est­ing read overall.

Craft­ing a Next Gen Con­tent Pipeline for The Order 1886

David Neubelt and Matt Petineo

This pre­sen­ta­tion is sim­i­lar to the one they gave at SIGGRAPH last year (as part of the Phys­i­cally Based Shad­ing course). This time the focus is more on engi­neer­ing issues and less on PBS. The salient points are Tiled For­ward +, H-​basis, direc­tional AO maps, GGX dis­tri­b­u­tion (i have my gripes with this, I’d rather over­lay mul­ti­ple cosine-​power lobes and have a mate­r­ial with more than one glossi­ness para­me­ter to be able to flex­i­bly rep­re­sent NDF dis­tri­b­u­tions at dif­fer­ent length scales), Kajira-​Kay-​ish Hair, inverted gauss­ian for cloth, nor­mal map antialias­ing via reduc­tion of glossi­ness in mip lev­els, and a some­what cool hard­ware setup + edi­tor tools to acquire BRDFs and paint with them.

Phys­i­cally Based Shad­ing in Unity

Aras Pranck­e­vičius

This caught my atten­tion, because on a side note buried deep inside the paper, they men­tion they’re using my rusty old shad­ing model from ShaderX7 (which I later dubbed as “Min­i­mal­ist Cook Tor­rance”) on mobile tar­gets. Back then I really had to squeeze out every arith­metic oper­a­tion I could. And now the his­tory of yesterday’s desk­top repeats in the form of today’s mobile. Check out their demo for iPad and also the pic­tures on their blog it’s look­ing really nice.

Intro­duc­tion to Pow­erVR Raytracing

James A. McCombe

In a bold move, Imag­i­na­tion Tech­nolo­gies intro­duces hard­ware sup­port for ray-​tracing in their lat­est Pow­erVR graph­ics chips. This evo­lu­tion­ary step mostly uses the already exist­ing com­pute units to process rays in par­al­lel, but also adds ded­i­cated fixed func­tion hard­ware for ray-​box inter­sec­tion tests and scene tra­ver­sal. They adver­tise this tech to accel­er­ate sec­ondary rays emit­ted from the posi­tions of ras­ter­ized pix­els to allow bet­ter reflec­tions, refrac­tion, order-​independent trans­parency, high qual­ity shad­ows and gen­er­ally any­thing that ras­ter­i­za­tion sucks at. (Yes, this means you need to “upload” your scene to the graph­ics chip and keep 2 rep­re­sen­ta­tions.) In the off-​line domain, the Unity engine ships with sup­port for this hard­ware to pre­view light map bak­ing. I find this inno­va­tion highly refresh­ing. Ray trac­ing is no longer the eter­nal “tech­nol­ogy of the future”, it’s com­ing now.

Ego mecum conjungi …

… Twit­ter!

Twitter_logo_blue

So out of a whim I just embar­rassed myself and tried to write in (prob­a­bly wrong) latin that I joined twit­ter. You can fol­low me under: @aries_code.

If you won­der how this came about, this was my train of thought:

  • Twit­ter has some­thing to do with birds
  • Birds have fancy latin species names
  • The species name for Spar­row is Spasser domes­ti­cus
  • This doesn’t sound too fancy …
  • How do you say ‘I joined twit­ter’ in latin anyway?

But then I dis­cov­ered that I am onto something: According to one argu­ment, the brand name of Twit­ter should have been ‘Titi­a­tio’, had it existed in antiquity. And accord­ing to another argu­ment, latin should be an ideal twit­ter lan­guage, because it is both short and expressive.

But I digress. If you are into com­puter graph­ics, then you know of Johann Hein­rich Lam­bert, the eponym of our beloved Lam­bert­ian ref­electance law. The book where he estab­lished this law, Pho­tome­tria, is writ­ten entirely in latin — now this is hardcore!

So, now you know what to do if you want to stand out in your next SIGGRAPH paper …

Yes, sRGB is like µ-law encoding

I vaguely remem­ber some­one mak­ing a com­ment in a dis­cus­sion about sRGB, that ran along the lines of

So then, is sRGB like µ-law encoding?

This com­ment was not about the color space itself but about the spe­cific pixel for­mats nowa­days branded as ‘sRGB’. In this case, the answer should be yes. And while the tech­ni­cal details are not exactly the same, that anal­ogy with the µ-law very much nails it.

When you think of sRGB pixel for­mats as noth­ing but a spe­cial encod­ing, it becomes clear that using such a for­mat does not make you auto­mat­i­cally “very picky of color repro­duc­tion”. This assump­tion was used by hard­ware ven­dors to ratio­nal­ize the deci­sion to limit the sup­port of sRGB pixel for­mats to 8-​bit pre­ci­sion, because peo­ple “would never want” to have sRGB sup­port for any­thing less. Not true!Screen Shot 2014-03-06 at 19.02.54I’m going to make a case for this later. But first things first.

Con­tinue read­ing

Spellforce 2 Demons of the Past

Spell­force 2 was released in 2006 and will be 8 years old by april. Nev­er­the­less, the third add-​on of the series shipped a month ago. Talk about a long seller!

Of course I’m attached to SF2 because I wrote many parts of its engine back then. This time I was briefly involved to help the devel­op­ers include my attribute-​less nor­mal map algorithm. The orig­i­nal SF2 did not have any nor­mal maps, and there­fore none of the orig­i­nal art assets comes with tan­gent space infor­ma­tion. This is an ideal sce­nario to pimp up the visu­als with­out touch­ing the geom­e­try, sim­ply by mak­ing a shader change and adding nor­mal maps. Con­tinue read­ing

Slides of my FMX 2013 presentation on Physically Based Shading

I was kindly invited by Wolf­gang from Con­fetti FX to speak at the FMX 2013 con­fer­ence about phys­i­cally based shad­ing (within the scope of the Real Time Ren­der­ing day). Since I remem­bered the FMX as a con­fer­ence for visual arts, I made the pre­sen­ta­tion inten­tion­ally non-​technical, for fear of alien­at­ing the lis­ten­ers. In ret­ro­spect, my guess was a bit too con­ser­v­a­tive, as there were quite a num­ber of pro­gram­mers in the audience.

Screen Shot 2013-04-24 at 14.53.58

Nev­er­the­less, here are the slides for down­load (with all notes included). The Keynote for­mat is the orig­i­nal and the Pow­er­point for­mat was exported from that and is a lit­tle bro­ken, so you should use the Keynote ver­sion if you can read it.

FMX2013 (Keynote for­mat) (1378)
FMX2013 (Pow­er­point for­mat) (2174)

Followup: Normal Mapping Without Precomputed Tangents

This post is a follow-​up to my 2006 ShaderX5 arti­cle [4] about nor­mal map­ping with­out a pre-​computed tan­gent basis. In the time since then I have refined this tech­nique with lessons learned in real life. For those unfa­mil­iar with the topic, the moti­va­tion was to con­struct the tan­gent frame on the fly in the pixel shader, which iron­i­cally is the exact oppo­site of the moti­va­tion from [2]:

Since it is not 1997 any­more, doing the tan­gent space on-​the-​fly has some poten­tial ben­e­fits, such as reduced com­plex­ity of asset tools, per-​vertex band­width and stor­age, attribute inter­po­la­tors, trans­form work for skinned meshes and last but not least, the pos­si­bil­ity to apply nor­mal maps to any pro­ce­du­rally gen­er­ated tex­ture coor­di­nates or non-​linear defor­ma­tions. Con­tinue read­ing

Velvet Assassin on Mac (Patch)

I just got news that Vel­vet Assas­sin has been ported over to the Mac and is avail­able on the App Store! However, I was not at all involved in the Mac port and I don’t know the devel­op­ers who did — it came as a sur­prise to me as to any­one else in the for­mer team. Here is a direct iTunes link: http://itunes.apple.com/app/id586878367.

Shader Bug on ATI graphic cards

Unfor­tu­nately there is a shader bug with ATI graph­ics chips. It hap­pened to me while try­ing it out on a 2011 iMac with an ATI Radeon HD 5670. I got reports from friends that this is not a prob­lem of the Mac port itself but it hap­pens on PC too. The prob­lem is related to ATI chips with dri­vers that are newer than 2010 or so. Here is a screenshot:

Screen shot 2013-01-11 at 04.09.06

Con­tinue read­ing

FlipCode is back

Kurt has taken steps to revive Flip­Code.

Flip­code was a place to dis­cuss gamedev + algo­rithms with a unique flair and an out­stand­ing audi­ence, some­thing IMHO gamedev.net never matched. I, too, was a reg­u­lar vis­i­tor, poster, and also con­tributed the odd arti­cle and an IOTD. Ter­rain engines bor­der­ing on 100k polys with­out HW T&L will be for­ever in the past, but the spirit will live on.

Branchless Matrix to Quaternion Conversion

(EDIT: This arti­cle is a more in-​depth writeup of an algo­rithm that I devel­oped around 2005, and first posted to Mar­tin Baker’s Euclid­ean Space web­site. That time was the height of the Intel Net­Burst archi­tec­ture, which was noto­ri­ous for its deep pipeline and high branch mis­pre­dic­tion penalty. Hence the moti­va­tion to develop a branch-​free matrix to quater­nion con­ver­sion rou­tine. What fol­lows is the com­plete deriva­tion and analy­sis of this idea.)

The orig­i­nal rou­tine to con­vert a matrix to a quater­nion was given by Ken Shoe­make [1] and is very branchy, as is tests for 4 dif­fer­ent cases. There is a way to elim­i­nate these branches and arrive at a com­pletely branch-​free code and highly par­al­leliz­able code. The trade off is the intro­duc­tion of 3 addi­tional square roots. Jump the analy­sis sec­tion and the end of this arti­cle, or con­tinue fist with the math bits.

Con­tinue read­ing