Real-Time Rendering and Animation
Description
This was a University assignment that focussed on Real-Time application programming and optimisation of algorithms . The application was adapted from the ppf Engine as there was many areas that could be improved. A heavy overlap was developed between the engine and all of the techniques listed below to make it as efficient as possible, such as if an object has a physics bounding this will then be checked against the frustum. A large focus was on the data structures involved with the rendering and the update loop.
Testing showed a 3x performance increase with the changes that were made.
Features
- Frustum Culling
This is integrated with the physics world if a physics scene is enabled, if an object has a physics bounding this will be checked against the frustum. The camera class was adapted to add the frustum which will only be updated if the view matrices are modified rather than every update loop. Features of the frustum include checks on a convex hull, sphere, point and cube.
- Level of Detail
The level of detail in this application focuses on two aspects, the lighting and rendering different meshes. Depending on the range from the viewer different models will be used along with different shaders and lighting effects.
- Spatial Subdivision
The world is split up into rooms, each room contains its own physics scene, this heavily reduces the physics checks as checks will only be carried out on objects in a particular room. A system was developed to automatically move objects between rooms using a rooms physics bounding itself. The room also references other rooms that can be seen from the room as well using portals. It also features a a list of objects which can be forced to be drawn such as an orbiting spacecraft.
- Coarse to Fine Visibility Culling
The structure of the application means whole rooms and extremely large areas of a "Game World" can be culled.
Technologies
- C#
- XNA 2.0
- Subversion
Video (Youtube)