Thursday 28 June 2012

Source Example 1 - Basic Model






Here is the first source code example, all it is is a simple model, skybox and camera implementation. This example comes with the model, two shaders, the skybox textures and the environment cubemap. The zip comes out at about 1.7M

The two shaders are:
A basic Texture shader, this is taken straight from the HM tutorial.
An Environment map shader, this is taken from the MS HLSL workshop.

The example shows the basics of loading shaders into the manager, creating a skybox and a model, passing shaders to these objects and adding them to the scene. It also has an implementation of getting an object back out of the scene. It also gives basic input, the mouse being used to rotate the camera, the arrow keys to translate the camera (move it left right and in and out of the scene) and the Escape key to exit.

If you want to create this project from scratch:
Open up a WindowsGame project, remove the Program.cs file as it is not needed, from the Game1.cs in the definition of the Game1 class remove the inherited class, you will need to add a static Main to the class. Reference the Randomchaos3DEngine.dll. Add the required using statements for the engine components you will use. Declare a variable of type RCGame. In the new static Main,wire up the engine events you want, add your objects to the scene and then run the game object.

To use the download example you may have to redirect the reference to the engine in the project to get it to work.

RC3DEModelExample1.zip

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


Posted Mon, Oct 15 2007 9:29 PM by Charles Humphrey | Add post to favorites | Add blog to favorites
Filed under: Randomchaos 3D Engine, Source, XNA 1.0 [Edit Tags]

No comments:

Post a Comment