Wednesday, 8 June 2016

Source Example 6 - Fog SM 1.1 to 2

This example shows the use of shader model 1.1 - 2 methodology for fog by using the render states.

Mouse to rotate camera.
Arrow Keys to translate camera.
F1 Switch Fog On.
F2 Switch Fog Off.

Source Example 4 - Terrain

So onto terrain, this example uses a height map 128X128 and is configured to use Riemers origional terrain shader (modified for the engine). Also included in this example are my terrain shaders along with the modified bump maped versions of these shaders and the associated textures.

It also gives an example of the terrain picking and collision, again this is quite basic.

Mouse to rotate the camera.
Arrow keys to translate the camera.
Right click to drop the terrains height and left to raise it.
Keys 1-4 select a terrain shader

  • 1 - Reimers Terrain Shader
  • 2 - My Terrain Shader
  • 3 - Reimers Terrain Shader with Bump Mapping
  • 4 - My Terrain Shader with Bump Mapping
  • Escape to exit.

    Source Example 2 - Scene Picking & Targets

    Moving on from example 1 but sticking with the Model and Scene class, this example shows how to apply picking objects from the scene and also how to apply a targeting reticle to a model using the Get2DCoors method.

    For this to be done I have added the RandomchaosContentPipelineManager to the project, this gives the model class the ability to use the bounding box data.

    You will see in the example screen above that the target reticle is not in the center of the model, this is because the skullocc.x file has it's center at the bottom of the model. I have also noticed a bug with the targeting code, if you target a model then rotate the camera 180 degrees away, you get the target reticle behind you.

    Again to ensure the download works, you will have to reference the Randomchaos3Engine.dll and the RandomchaosContentPipelineManager.dll, the later is done by right clicking the project name in the project explorer, select properties, select the Content Pipeline tab remove the current setting and replace with the path you have for the dll on your system.

    If you have any comments or issues with this example, please post them here :)