Talk:GSoC Graphical Improvements

Graphical improvements for SuperTuxKart are quite important to make the game more attractive. The work of this project does not include actual work on the 3D models (though of course you are welcome to do so), but only to code the actual features in STK, so that artists can use them.

There will be some work involving improving shader support in STK, Blender Python scripting for improving the exporters and GLSL shaders implementation.

We split the list of features/tasks into required and optional items, although this can be subject to change. The items are arranged in priority order, considering the impact on STK and the amount of work required to implement the feature.

Required tasks

Screen-space effects
  • SSAO (Screen-Space Ambient Occlusion). This needs the normals buffer and the depth buffer as input, so an additional rendering pass might be needed.
  • Glow for specific objects (e.g crystals in the mine). Samuncle has a preliminary implementation for this effect in a separate demo program.
  • Improved motion blur (camera-based movement) -> http://http.developer.nvidia.com/GPUGems3/gpugems3_ch27.html We also need a way to avoid blurring the player's kart (this can be done using the alpha channel of the screen-space render target when rendering the karts).

Note that the screen-space effects should be implemented while taking into account the particular case of split-screen.

Object-specific effects
  • Improving the water shader
    • the main thing to fix in our current shader is to fix the light direction to come from the sun, instead of coming from the camera as is the case now
    • adding some reflections could improve the effect. Simple environment mapping with a cube map could already enhance the effect.
    • if you want to go even deeper, refraction/etc. can be added
Kart-specific effects

Preliminary work for these items is to have all karts drawn using shaders. This implies re-coding simple lighting and texture mapping in a fragment shader. Once this is done, the following improvements are possible:

  • Making the kart colors customizable. Some parts of the karts would be marked as "colored" in the texture. That would be useful for soccer mode, to separate the teams.
  • (other features are in the "optional" section as they are either to be discussed or require a lot of work to be implemented)
Track-specific effects
  • Adding dynamic lights in Blender and getting them back in the tracks. This lighting would be added to the already existing directional, sun lighting.

Optional tasks

Screen-space effects
  • High Dynamic Range lighting (exposure, gamma correction). Samuncle has a preliminary implementation for this.
  • Shader-based antialiasing (one of FXAA, DLAA, MLAA, GBAA, SMAA...FXAA is simple to do as the code is freely available and it's quite efficient -> http://developer.download.nvidia.com/assets/gamedev/files/sdk/11/FXAA_WhitePaper.pdf )
  • Godrays: to be discussed. (example here: [1]). This could improve visual quality when going under a tunnel that has holes in it, when racing under the water, or when looking at the sky and Thunderbird goes in front of the sun (ideally for soccer mode, when a goal is scored, Thunderbird would grab the ball and move it back to the center of the field).
  • Color grading
  • Underwater wobbling effect
Kart-specific effects
  • GPU skinning. CPU Skinning (bone animation) is the performance bottleneck in STK. Note that it's currently unknown whether this can be done without modifying irrlicht to include more information per vertex. However, this could probably be done (in a somewhat "hacky" way) using the vertex formats that have more than one UV channel. There is a preliminary implementation done by funto.
  • Super Mario Galaxy-style backlighting (to be discussed) (example here: [2]) (that's the light in the borders of the characters)
Other
  • Shadow mapping (although that needs to be done in conjunction with the Irrlicht project) and all its possible improvements