Remembering rendering on FIFA 10 Wii

Quirks and features of lighting in FIFA 10 Wii.

timmie

For FIFA 10 on the Wii we rebuilt the rendering engine from the ground up and it enabled us to do some kind of interesting things. I'm not talking about supporting lightmaps for the first time on the platform, but more allowing us to more effectively utilize the hardware. Most of these revolved around lighting.

We've come a long way in only 10 years.

Per-Pixel Lighting

The Wii supported per-vertex hardware lighting, which was pretty common at the time. But we came up with a somewhat unique solution that allowed almost per-pixel lighting on the hardware at the cost of some flexibility. The hardware also supported spherical environment maps, which is really just using the view-space normals as texture coordinates. So to capitalize on this, we decided to draw a highly tesselated lit sphere (roughly one triangle per pixel) from the point of view of the light each frame and sample that as an environment map. This allowed better gradiation between vertices, you could actually get a nice cutoff that was otherwise impossible with vertex lighting. For the game, we actually had two environment maps: one authored map for the ambient term and one dynamic one for the key light. We could multiply the dynamic portion by the shadow amount to simulate shadowing without it affecting the ambient light. Combining those together would give the final diffuse lighting term and it looked pretty good in our tests.

The tradeoff was a complete lack of specular, which wasn't a big deal for our art style. On FIFA 11 we changed the ambient map to a constant color and rendered a second map for the specular and that gave a bit more richness to the lighting. The tradeoff there was flatter looking ambient and only one specular response for everything. Again, it wasn't too big a deal and we managed to hide that a bit with a specular map on the characters.

I believe we also experimented with a negative rim map as well (slight darkening around the rim rather than brightening), which gave really nice looking depth to the lighting but I'm not sure if we ever shipped with that.

HDR-ish Lighting

A quirk of the Wii texture combiners (TexEnv) was that certain operations gave back results that were 10 bits per channel (I think one bit was technically the sign bit). Specifically, the add and subtract operations. What this meant was we could actually have 10 bit lighting if we were able to preserve the values over 1.0. TexEnv supported some scratch registers you could store temporary values in, so we would add the ambient and key lights together into a scratch register and then subtract 1.0 from that and store that into another scratch register. When lighting, we'd multiply the texture by the combined lighting (which would clamp the lighting values to the 0..1 range) and then do it again with the "over 1.0" value and add the results together. This would make parts of the characters in direct sunlight to desaturate slightly, just like you'd expect from HDR values mapped back to the 0..1 range. Ultimately this was removed for FIFA11 in favour of supporting the specular maps (as seen below).

The combination of the two tricks actually gave us pretty nice lighting in the game, we actually did one test where we brought over some assets from the 360/PS3 version of the game and it really held up. Ignoring the lack of normal map, anyway.

Overall, it was a fun time working on those titles. I'm still proud of them, despite them being somewhat panned. I think it would have been interesting to see the tech we built used for a game more like FIFA 09 on the Wii, which followed a more traditional art style, but I also still appreciate what the vision was. It was actually my first dedicated rendering role and I learned a lot in a very short time and worked with some great people.

From The Chatty
  • reply
    November 17, 2020 3:04 PM

    timmie wrote a thing!

    Read more: Remembering rendering on FIFA 10 Wii

    • reply
      November 17, 2020 5:33 PM

      I love hearing smart programmers deal creatively with system limitations. The technicalities of this are just a bit over my head, but I can feel the excitement in the history.

      Got any more stories?

      • reply
        November 18, 2020 12:52 AM

        Some, haha. Hopefully I'll be able to tell a few about the project I'm on now, it's been a pretty awesome ride so far.

    • reply
      November 17, 2020 6:07 PM

      Interesting stuff!

    • reply
      November 17, 2020 7:33 PM

      Cool! You sound smart Tim. ;-)

    • reply
      November 18, 2020 1:13 AM

      Huh, interesting! Thanks for writing this.

    • reply
      November 18, 2020 1:43 AM

      Thanks for sharing!

    • reply
      November 18, 2020 3:31 PM

      [deleted]

Hello, Meet Lola