What effects are being used in this game?

Started by
1 comment, last by MJP 11 years, 2 months ago

I'm trying to go for the cartoony look in my game and I'm trying to reverse engineer various titles that have successfully managed this style. Mario Galaxy is a great example of this. Here's another I've stumbled upon:

http://uk.ign.com/images/games/jett-rocket-wii-59878/4fa6cb45cdc388ed13f49aaa

The first thing I can see (that I'm not using myself) is something like ambient occlusion going on. Given that it's a wii title, and that most of the models are stationary, I'm guessing it's not being done in real time and is using lightmaps of some kind. So my question on this is how do you bake ambient occlusion into a scene that's using tileable textures? Surely a lot of the ground textures are just being tiled across the maps? But you would need none-overlapping uvw mapping coordinates to properly use a lightmap wouldn't you?

Hope someone can help me out!?

Advertisement

Take a look at Screen-Space Ambient Occlusion (SSAO), it's a relatively cheap way to achieve AO.

I'm not sure what effect you're referring to in particular, as there are a lot of things going on in those screenshots.. specular maps, reflections, lens flares, to name a few

Any AO is surely going to be pre-computed in a Wii title. Baking AO doesn't have to be terribly complicated...basically you just need a set of sample points that are laid out across the surface of your geometry where you will bake AO. These sample points can just be the vertices of your geo, or you can use a texture like you would for light mapping. For texturing you need to UV your geometry so that each surface is unique and doesn't overlap any other surfaces in UV space, which is typically stored as a second UV set seperate from the primary UV set that you'd use for normal material textures. Generating these UV's can done manually or automatically, either using tools in DCC packages like Maya or by writing code to do it. The old DirectX SDK comes with a UVAtlas utility that can actually handle generation of UV's and packing the the resulting charts tightly into an atlas, although I'll warn you the documentation isn't great which can make it a bit tricky to use. I would recommend starting by just baking per-vertex, since it's a lot easier to start with. Once you have have your sample points, you bake AO by integrating visibility about a hemisphere surrounding the normal of your sample point. The two common ways to do this is to use a ray-tracer to shoot rays about the hemisphere, or to rasterize a hemicube. Either way you figure out whether the sky is visible for a bunch of directions around the normal, and integrate that visibility to get a single float representing your AO value.

From the looks of that game, it's using the same trick as Super Mario Galaxy to get that "rim-lighting" look on everything. The Wii GPU supports a fixed-function feature called Environment Mapped Bump Mapping, which basically lets you look up a cube map using a view vector that's reflected off of a bump-mapped surface. By using a cubemap that contains big, soft highlights they can approximate the look of the fresnel effect that occurs as specular reflections get brighter for grazing angles. If your GPU supports shaders you can get the same look pretty easily, either by doing a cubemap lookup or by just using a straight-up rim lighting shader.

This topic is closed to new replies.

Advertisement