Ogre Demos        

The Ogre package comes with around 20 demo programs. Each demo emphasize a particular functionality of the Ogre Engine. This section explains which effect is used in every demo, and which files are used for this.

The Demos sources-files

All the demos come with sources, and media files (material, particles, etc).
All the demos use common files:

  • ExampleApplication.h
  • ExampleApplication.cpp
  • ExampleListenerApplication.h
  • ExampleListenerApplication.cpp

which manage the initialisation of the ogre Engine, the creation of the scene, the keys (ARROWS to move, ESC to exit the demo, ...) and the mouse.

The functions that are specific to a demo, are in a dedicated file. For instance, for the demo "skybox", look in skybox.h.

Skybox Demo

This demo shows how to set a skybox, which is a box surrounding the camera, and moving with it. This is used to represent a far landscape or sky, visible in every direction (not only upward), for instance to represent the far stars in space.

The material used for this demo is Examples/SpaceSkyBox

Lighting Demo

This demo shows :

  • The creation of different colored lights.
  • A billboard (2D picture) mapped to each light to make them visible.
  • How to make the lights move.
  • Dynamic lighting of an object (Ogre head).

Texture FX Demo

This demo shows special effects you can do with textures:

  • Rotation of a texture
  • Scrolling two semi-transparent textures (like a water effect)
  • ?

Water Demo

This is a very realistic water, with:

  • Reflection on the water
  • Waves made by a moving object on the surface.
  • Waves made by raindrops
  • Normal waves

Cube Mapping Demo

Cube maps are used to render the reflection of environment on a shiny object. They are easy to render during runtime. The object is textured with what is "seen" from the center of the object, in every direction. The texture is represented by a cube (6 faces) and applied on the object.

In the demo, you can change the environment and see the reflection change on the object.
The same cubic texture is used for the skybox and for the object.

The demo also shows how to transform a mesh during runtime, by moving its vertices.

The demo show also how to implement the Perlin Algorithm to add noise (bumps) on a mesh (but you can also use it to add hills on a terrain)...

The materials used for this demo are Examples/SceneCubeMap1 and Examples/SceneCubeMap2

Dynamic Texture Demo

Texture are created and applied on objects (static mesh and animated mesh) during runtime.
These textures look a little bit like "amibs" but it depends on the algorithm you use.

Environment Mapping Demo

This technique does not necessarily render the reflection of the environnement surrounding the object. (Therefore the background in the demo is black). This technique is view-dependent, and is used for curvature effects, and dull surfaces.

Shadows Demo

This Demo show how to get shadows of different type (stencil shadows, texture shadows) with different techniques (additives or modulative) and different types of lights (directional, etc).
It also shows how to create an animation during runtime, by creating keyframes. Here, it is used to make the lights moving along a specific curve.

Fresnel Demo

This demonstate the Fresnel Law applied on a water (Augustin Fresnel french scientist from Caen around 1800).
The reflection depends on the angle between your eyes direction and the surface of the water.

  • when you look from above in the water (ie: look at your feet), you see the bottom of the sea.
  • when you look something far (ie: look at the pier), you cannot see the bottom of the pier.

Grass Demo

Specialisation of OGRE's framework application to show the use of the StaticGeometry class to create 'baked' instances of many meshes, to create effects like grass efficiently.

This demo draws a series of static billboards (in the configuration of an asterisk (*)) representing grass. These billboards sway gently back and forth in a sinusoidal pattern to simulate a gentle breeze.

A non-static billboarded light source moves through the scene to show off dynamic lighting.

Cellshading Demo

This rendering technique gives your models and graphics a cartoon-like appearance. This is a powerful form of rendering. An example is the commercial game "XIII" based on a famous comic strip.