I'm Morgan McGuire (@CasualEffects). I've been working on computer graphics and games for 20 years at great places including NVIDIA, Williams College, Brown University, and Activision.

See my home page for a full index of my blog posts, books, research, and projects.

Wednesday, August 26, 2015

How to Create a Graphics Research Paper

This article shares some strategy for creating computational graphics research publications, such as those found at SIGGRAPH, I3D, HPG, EG, and EGSR. It is inspired by the coming I3D'16 submission season as I reflect on process and offer advice to my junior collaborators.

I focus on process over specific writing tips, because there are already a lot of good resources for strong technical writing, such as:
Those primarily apply at the prose phase and don't in themselves help you to reach the prose phase, which is what I'm seeking to explain. The following advice also holds for class final projects, independent studies, and theses at varying time scales.

Sunday, June 28, 2015

Annecy Animation Festival 2015

Pixar's Inside Out, screened at the Cannes and Annecy festivals
before US release, is a return to the quality of the studio's
greatest hits such as Up and Toy Story 3.
For 55 years, the the Festival International du Film d'Animation d'Annecy (Annecy Animation Festival, @annecyfestival) has been the premiere international venue for animated films, with emphasis on short films. A majority of the work is intended for adult audiences, although children's and general audience films are represented.

I've attended the festival for over a decade and find it essential to my work on computer graphics for video games and film. The shorts in particular are packed with innovative techniques, visuals, and storytelling that continue to inspire my research and product development.

I usually teach from several films seen each year at Annecy (and from those seen in the SIGGRAPH Computer Animation Festival, which is the best venue for CG films). This article describes some of my favorite films from Annecy 2015. You can also read about my favorite shorts from Annecy 2013 and Annecy 2014.

Friday, June 5, 2015

McGuire House Rules for Cartegena

Cartagena is a board game for 2-5 players. With the simple McGuire house rules modifications described below, it works well as a strategic family game for players as young as five.

The game features teams of pirate markers racing through a random board depicting a tunnel. The pirate theme continues through the main commodities in the game: rum, guns, swords, hats, and flags.

The strategic decisions made by players are largely timing. The two main moves are pushing forward by playing cards, and dropping back to accumulate cards and establish tactical positions. There's no direct player vs. player conflict.

Friday, March 27, 2015

Fast Colored Transparency

This article extends my previous article on Implementing Weighted, Blended Order-Independent Transparency. I previously showed how to implement a fast and robust solution for both partial coverage and monochrome transmission. The speed of the method came from three sources: 1. being able to merge multiple transparent surfaces into a single draw call, 2. avoiding the overhead of pixel interlocks, and 3. minimizing bandwidth during blending. The robustness came from order independence, at a cost of some flattening of perceived depth between transmissive surfaces in the distance.

Update Feb 2016: Mike Mara and I published a paper at I3D'16 that fully-realizes the ideas originally sketched out in this blog post.

Thursday, March 26, 2015

Implementing Weighted, Blended Order-Independent Transparency

Why Transparency?

Result from the Weighted, Blended OIT method described
in this article. Everything gray in the top inset image has some
level of transmission or partial coverage transparency.
See also the new colored transmission method in my next article!

Partially transparent surfaces are important for computer graphics. Realistic materials such as fog, glass, and water as well as imaginary ones such as force-fields and magical spells appear frequently in video games and modeling programs. These all transmit light through their surfaces because of their chemical properties.

Even opaque materials can produce partially transparent surfaces within a computer graphics system. For example, when a fence is viewed from a great distance, an individual pixel may contain both fence posts and the holes between them. In that case, the "surface" of the opaque fence with holes is equivalent to a homogeneous, partly-transparent surface within the pixel. A similar situation arises at the edge of any opaque surface, where the silhouette cuts partly across a pixel. This is the classic partial coverage situation first described for graphics by Porter and Duff in 1986 and modeled with "alpha".

There are some interesting physics and technical details that I'm simplifying in this overview. To dig deeper, I recommend the discussion of the sources and relation between coverage and transmission for non-refractive transparency in the Colored Stochastic Shadow Maps paper that Eric Enderton and I wrote. I extended that discussion in the transparency section of Computer Graphics: Principles and Practice.

Friday, February 6, 2015

A Billion in Computer Graphics

The Bell Labs Transistor

The Transistor

In 1947, there was one transistor on the planet. It looked like a high school science project and could just barely fit in a large pocket. The research leading to it was expensive. The transistor itself was also expensive because it was made out of gold.

Wednesday, January 28, 2015

Learning to Create Games

Why should you learn about game development? How and where should you learn? Most important, what do you need to learn? This article captures my current thoughts for those hoping to enter the industry, new indie developers, and games students as I refine my Creating Games course for next semester at Williams College.

Hive
There are many ways to think about games and inspire learning. One that excites me is the theme of the course: how quantifiable design elements give rise to meaningful player experiences. I assume that everyone is going to primarily make video games, but should learn about game design through board games.


I emphasize in this article and my course a combination of elegant strategic games, such as Hive and Dominion, and those with emotional impact, such as Gone Home and This War of Mine. The combination showcases games as an artistic medium, which is why I teach in both the studio art and computer science departments. While we also must study visual art and computer programming as tools for creating games, I think people interested in games should begin with the computational art of game design. As game developers, we create machines from mechanics, and these machines then create experiences with the players.


Tuesday, January 27, 2015

Adapting a Camera Entity for Virtual Reality

Classic rendering systems have a virtual "camera" that is active in the scene during rendering. These systems produce the image seen from that camera.

But head-mounted displays like the Oculus Rift, Samsung Gear VR, and Microsoft HoloLens need to render two views every frame, one for each eye. They also incorporate tracking of the body in a way that traditional rendering systems don't model.

Some of the problems with tracking arise even on a single-view tracking display, and some of the problems with multiple views are increased for parallax-barrier and other passive 3D systems that might require four or eight projections.

Extending a rendering system to support these devices is more complex than just "adding a second camera" because of the way that the modeling system and post processing need to maintain state and the way that tracking information is integrated. This article describes how Michael Mara and I are extending the open source G3D Innovation Engine to support head-mounted and other multiview displays.

Monday, December 22, 2014

3ds Max for Graphics Programmers

This post is a draft of new content for The Graphics Codex app. Please e-mail suggestions and corrections to morgan@casual-effects.com. I'll update this article in response to that feedback.

Graphics programmers often need to use a 3D modeling tool. Just as in any other domain, data in 3D graphics often contain errors. Excel and Photoshop are a better tools than a text editor for editing spreadsheets and images. 3ds Max is a common tool that is faster and easier than a text editor for editing 3D models once one understands a bit of its complicated interface.

Key Elements of the 3DS Max GUI 

Monday, December 1, 2014

9 Years Later

The minimalist 9 title card
At the time of its premiere in 2005, Shane Acker's 9 (11 min, USA. dir: Shane Acker) was one of the the greatest student animated films yet produced. Student films and other low-budget computer animations often do not age well. Yet, Acker's film remains in rare company in 2014. With a few others such as Miss Todd (13 min, UK, 2013. dir: Kristina Yee), today it stands at the acme of short-form representational animation, with no "student film" qualification needed. This article analyzes why.

Wednesday, November 19, 2014

You Can Play Video Games

Journey
There are video games that you'll enjoy and be good at playing. They address your gender, sexual, religious, and ethnic identity. They have worlds where you'll feel comfortable and engaged. You can find what you're looking for, whether it is non-violent play, strong narratives and characters, complex decisions, freedom, or emotional highs and lows. Most games are not very expensive and many run on computing platforms that you already own, such as your old PC, your Mac laptop, or your mobile phone.

Wednesday, November 5, 2014

McGuire House Rules for 2-Player Uno

Uno is a card game for "2 to 10" players that is currently owned by Mattel. Like other games that appeal to small children, the challenge is in learning to follow rules and recognize appropriate play and not in executing a strategy. The game appeals to its core audience because the rules are simple, play is fast, and a lack of strategy means that there really are no "good" or "bad" players. The first two properties are desirable in any game. The shallowness enforced by the third may limit the sting of losing for children, but also limits the audience.

Monday, October 13, 2014

Game Design as a Science for Public Policy

Screen shot of the action role-playing game Titan Quest
by Iron Lore Entertainment © (THQ Inc., 2006)
This is the first in a series of posts defining and motivating a game design research agenda.

What do a presidential election, a sporting event, government spending bills, and a video game have in common? They are all subject to analysis as games: scenarios where intelligent agents (players) seek to maximize their payoff (win) under a set of rules. Although some seem like fun and others like work, an understanding of each instance informs the others, and insights for any improve how we both work and play.

Games are about decisions, and decisions matter. Computer science, mathematics, psychology, economics, and political science have explored decisions in formal games for several decades. Their classic problem is to find the best strategy under a set of rules. A new, more important problem reverses this: design a rule system that drives players to desirable behaviors. In the real world, we want the rules in our tax code and laws to be fair and encourage strategies that benefit society as well as the individuals. In virtual worlds, choices must also entertain the agents. Sometimes the line between these is blurry: Ebay's auction rules intentionally trade market efficiency with the thrill of last-minute deals ("sniping"). The short-lived "entertainment shopping" introduced by the Swoopo company took this one step further, in a form that we're likely to see more in the future.

Saturday, August 9, 2014

Screen Space Ray Tracing

Pretty good reflections computed by our
screen space ray tracer in ripply water
This post describes a screen space ray tracing implementation that I wrote with Mike Mara for use in our indie games and graphics research. A full paper is freely available at the Journal of Computer Graphics Techniques. The properties of this method match those sketched out by other developers for some of the latest game effects. We found it tricky to understand and get exactly right from their presentations, so we're sharing our full code and the derivation in the paper to help others implement it.

Games march 3D rays across the height field defined by a depth buffer to create very approximate screen-space reflections. You can see this technique in action in Crysis 3 and Just Cause 2. When the point where the 3D ray hits the 3D surface in camera space is discovered, the game projects that point back to 2D and uses the color of the pixel for the color of the reflection. This is obviously limited to reflections of objects that are on the screen, so most games fall back to an environment cube map when no hit point is found in the depth buffer because the ray went off screen or behind an object (see Bart Wronski's detailed explanation of failure cases).

Although it is primarily used for reflections today, this technique can do much more. Many computer graphics algorithms are based on casting rays. For example, we experimented with screen space rays for approximate reflection, refraction, glossy reflection, ambient occlusion, and even global illumination (much more efficient approximations are available for the last two).

Different effects computed by our screen-space ray tracer. The rightmost two are not real-time.

Sunday, July 27, 2014

McGuire House Rules for Settlers of Catan

The Settlers of Catan is perhaps the most widely-played modern board game, easy to learn, deep
enough to be interesting for everyone, and playable by anyone old enough to add small numbers. The game was designed by Klaus Teuber and first published in 1995 by Kosmos and other companies. It has since been revised and expanded many times.

The basic gameplay is similar to Monopoly: players gain resources through random events, build small and large buildings to increase their income, and trade resources.  Unlike Monopoly, Settlers grants players significant control over the randomness, expands from a single resource to a five-commodity economy, separates points from resources, and keeps all players in the game until the end (which usually arrives after about 45 minutes). These elements are the hallmarks of Eurogames and were popularized by Settlers, which initiated the current board game Renaissance.

Sunday, July 20, 2014

McGuire House Rules for Carcassonne

Carcassonne is a family-friendly Eurogame (modern board game) that, with appropriate expansions and modifications, scales well from two to six players and admits serious competition at any age from five up. It allows players to chose a game length from about 20 minutes up to hours (with multiple sets). The game was designed by Klaus-Jürgen Wrede and was first published in 2000 by Rio Grande and others. This post describes our house rules for Carcassonne. For simplicity when learning the game, I give a nearly complete rulebook rather than differences from printed rules.

We've been playing Carcassonne for over a decade (most recently with small children). The McGuire house rules arose from that play experience, some in-depth game theory analysis, and analysis of rule differences in different regional editions and printings. We believe that compared to the American printed rules, these increase fairness and balance, extend the game to meaningful two-player play, manage game length, and increase strategy, while avoiding unnecessary complexity and staying true to the core mechanics that made Carcassonne great originally. I wrote an analysis of the original rules a few years ago for my game design course that explains the motivation for many of these changes.

For various reasons, including marketing and a desire to not reprint even when errors are discovered, the box that you buy of a game doesn't always have the best version of the rules. I encourage everyone to experiment with the rules of games that they play, and if you're playing Carcassonne, here are some to start with. Lots of folks will disagree with our rule set, and that's great too. The best part of playing a game is often changing the rules and finding where the lead you, and everyone has their own taste for what makes the game ideal.

The Joy of Modern Board Games

Depiction of the ancient Egyptian game of Senet
Board games have been enjoyed for thousands of years. This category includes card and dice games, as well as table-top games with proper boards. In the 19th and 20th century, standardized commercial games began to appear, with Milton Bradley, Parker Brothers, and Hasbro dominating the themed "American board games" market into the late 20th century. This includes popular titles such as Monopoly, Risk, Trivial Pursuit, and Chutes & Ladders. These are the games that many current young parents grew up playing at home.

The Settlers of Catan
In the late 1990's, board games experienced a revolution. New games emerged in Europe (especially Germany) such as The Settlers of CatanThese games combined the accessibility of Monopoly with a level of strategy previously found only in hardcore wargames and role playing games. These quickly became popular around the world. They scaled from family board game sessions to college game nights. This accessibility was due to relatively short play times (compared to wargames and role playing games), strong themes attractive to a wide audience (compared to chess), and the crucial ability to accommodate many players who are not eliminated during play. Many entries in this new genre of "Eurogames" drew on advances in design from video games and from mathematical principles such as set theory.

Monday, July 14, 2014

Favorite Short Films from Annecy 2014

The 2014 Annecy International Film Festival  screened 500 new films in the beautiful resort town of Annecy, France. Since 1960, the best animated films have been shown here, with emphasis on experimental short films. I've attended since 2004, and each year been amazed--and often overwhelmed--by the quality and diversity of ideas. Last year I began posting summaries of my favorite films.

My 2014 favorites films are here. I'm partial to representational; uplifting, humorous, or sexy; narrative shorts. From recalling the previous years' award winners, this is the festival audience's preference as well. That bias is perhaps partly because it is hard to present a new aspect of important but well-explored topics such as abuse, genocide, and aging; and also because it is very easy to make overwrought films on those topics.

Yet, this year many of my favorites were atypical. In those cases, they took on difficult subjects with maturity and grace. My favorites usually overlap heavily with the festival award winners, however this year only two appeared on that list and my (tied) top two choices won no awards in competition at all.

The Best Film of Annecy 2014

These two radically different films impressed me greatly. Both displayed mastery of the medium, expert pacing, and bent in unexpected directions. I consider them tied for "best short".

Hipopotamy () - A beautifully executed film for its animation, music, pacing, and maturity, with deeply disturbing content: human forms applied to animal (titually hippotamus, but most likely elephant seal) behaviors, which are deplorably not so implausible on human forms.  It is important and an intelligent combination of beauty and ugliness directed with enough space for the audience to draw their own conclusions and parallels. http://www.fumistudio.com/

Moulton og meg (Torill Kove) - Three girls raised by modernist architects. A killer concept with ready-made art humor, nice coming-of-age elements, and heartwarming comments on families. The clean modernist-meets-children's style of black lines and solid, marker color fits the material perfectly. The narration is top-notch, as is the script and timing. Trailer



Monday, May 12, 2014

A Computer Science Book Reading List

This is a list of good books on computer science.
Most are accessible to anyone with programming experience equivalent to an introduction to computer science course. Of course, everyone in the field has his or her own favorite books. There isn't a universally accepted list of "best", but I think all would agree that these are at least pretty good in both writing quality and technical content, and that you would not go wrong by reading them.

Monday, April 14, 2014

Fast Terrain Rendering with Continuous Detail on a Modern GPU

Terrain rendering is challenging. It requires both high detail close to the camera and a large extent. There must be less detail per square meter in the distance to render this efficiently (and ideally, the amount of detail per pixel would be about the same), but the transitions from high to low detail should be imperceptible.

There's been a lot of research and development on terrain rendering systems. The best systems today can render worlds in which the viewer can pull back continuously from individual stones and flowers to observing entire planets from space, and when looking at the flowers can still see mountains in the distance. The underlying perception, art, and geometric issues of course remain unchanged over time, but hardware architectures and available resources change dramatically. So, terrain rendering methods that were preferred even a few years ago (e.g., ROAMgeomipmapping, projective grid) may be obsolete today. (Today's methods will likely be obsolete in a few more years). Fortunately, the last few hardware generations have moved in a direction where the currently-preferred implementations are more simple to implement than the previously-preferred ones.



In this post I describe a terrain renderer that I built with some current best practices. It draws on a lot of other blog posts and research articles that I'll mention in passing. My implementation renders in 3.4 ms at 1680x1050 resolution on NVIDIA GeForce 650M under Windows 7 (i.e., on a MacBook 2012 Pro under boot camp), and supports both forward and deferred shading. It is written in OpenGL using the G3D Innovation Engine 10.0 beta (SVN revision 4283) and I provide the full source code. I don't expect anyone to compile and run that code directly, however. I'm releasing it without support (i.e., I'm always happy to discuss algorithms, but please don't ask me for help dealing with your compiler/library/installation) to help others with their own implementations and as a case study in GPU optimization of large mesh rendering.