Visual effects provide an important role to making the game more exciting and enjoyable for the players. Visual effects can generally be categorized into 2 main parts namely, Environmental and Special effects. Since all of the game play sequences takes place in the dungeons, sewers and rooms, we will take into considerations these scenes for our visual effects planning.
Environmental Effects:
- Ceilings / Walls
- Fog / Mist
- Shadows
Special Effects:
- Explosions
- Smoke / Steam
- Others (to be implemented)
Environmental Effects – Ceilings & Walls
The ceilings of the underground military facility and dungeons can be done using similar techniques to creating a sky environment, but less complicated. A box or a ceiling plane can be used for the ceilings in all the three locations. Additionally, a hemisphere/dome can be used as an approach for hallways or corridors. This is to create an illusion that the path is long.
Environmental Effects – Fog & Mist
Creating fogs and mists in the dungeon intensify the atmosphere the players will go through. Mist can also be implemented using Particle Systems, which is explained in the later section. There are basically 2 types of fog: Distance-based fog and Vertex-based fog (also known as volumetric fog).
Distance-based Fog:
- Based on viewpoint, giving the starting depth and ending depth to the hardware API. Might not be the best method for implementing fog but it’s simple to use
- Can reduce polygon count by eliminating objects in distance, but using the fog to cover them
Vertex-based Fog (volumetric fog):
- Not view-dependent
- Uses starting and ending depth but applied to Y-axis (for height), instead of Distance-based fog which applies to Z-axis. Coordinates of the fog are also to be provided for current vertices that are being rendered. These can be done through OpenGL extension
- Fogs will stay in the positions we allocate throughout the entire game play
Environmental Effects – Shadows
Shadowing gives the perception of depth of the objects, which increase the realism. There are various types of shadowing such as shadow volumes, light maps, projected planar shadows and hybrid approaches. We will be implementing projected planar shadows as our major technique for shadowing. If time permits, shadow mapping using light will also be implemented.
Projected Planar Shadows:
- Uses geometry to cast a shadow from an object
- ‘Flatten’ the 3D model and cast it in black onto the ground plane
- Shadow effects only applicable to planes
- Ability to support positional or directional lightings
A simple trick we can use to implement projected planar shadow is:
- Get ground equation, Ax + By + Cz + D = 0
- Get light position (x,y,z,w)
- Use projective transformation to obtain a ‘flatten’ image of the object model
- Change color to black and concatenate with the object model
Special Effects – Smoke, Steam and Explosion
These visual effects can be implemented using sprites, a 2D/3D image or animation used to integrate into a larger scene. Sprites are usually used for moving objects and can create an effective illusion when the animation changes, or exist for a short period of time, or has similar appearance from many viewing angles – which fits well for creating smoke and steam, and other effects such as fire or special symbols.
Particle system, which is also commonly used to create these special effects and others abstract visual effects such as glowing trails and spells casting effects, can also be used.
A particle system’s position and motion in 3D is typically controlled by an emitter, which is the source of the particles. Its location will determine where the particles generate and how they proceed. A particle system’s update loop can be split into 2 parts:
Simulation Stage:
- Each particle spawned in specific 3D space based on assigned values
- At each update, check if lifetime of particle has exceeded. If so remove particle, else particle will move to new position
Rendering Stage:
- After update is completed, each particle is rendered, also known as billboarding
- 3D mesh objects can then be used to replace the particles, giving the end result of the visual effects
Recent Comments