After installing SunBurn, create a new SunBurn Project from the SunBurn Game – Starter Kit.
The SunBurn Game Engine
After the new project has been created – press F5 and run the game as is. A brownish game window is displayed explaining that you are now running the SunBurn Engine.
As there is nothing in the scene (we haven’t done anything and it starts fairly empty), we can’t really see anything. Press F11 to open up the SunBurn editor.
The SunBurn Editor
It really is where the whole engine comes in to its own. At the moment it’s empty, so lets add some basic content to the Scene so that we can explore some of the features.
It’s best to add content that’s located in the content folder (or one of the sub folders) of your game project. You can do this while the Game Editor is running.
I’ll add a basic Box to begin with; the box has been created in Blender and was exported as an FBX file.
Go back to the SunBurn Editor, Right Click on the Content option and Select Import Model
Add the Model from the Content Directory (Default directory that the Import Dialog references)
The Model is then imported with a bunch of things happening but summarised with a green progress bar.
Once the model has been imported, it can be selected under the content folder. Notice that a box.fbx folder has been created, it will contain all of the objects in the fbx file; in this instance, there is only one mesh which is called Cube.
Click, hold and Drag the box.fbx folder across to the Scene.
A manipulation point has now been added and is visible in the scene when the Cube is selected.
The Default type of Object Editing Mode is translation (Movement within the X,Y,Z world space).
This can be changed through the Object Editing Mode Toggle (Displayed as the four arrow cross)
Clicking on it once goes to Rotation
Clicking on it once more goes to Scale
We can now scale the box by clicking on the Green box and pulling up. Depending on the exported scale of the model this may need to be done a number of times for it to get to an appropriate size.
Notice that the box isn’t a single colour, that’s because the default scene comes with some ambient and sunlight added.
I’ll add another model to the scene following the same steps again, which we will use as a floor plane.
The scene can be navigated using the W,A,S,D key combinations. Holding the right mouse button down enables the mouse look mode.
Here’s the same scene from another angle. A couple of things to notice already, the Cube itself is receiving lighting and has one side in shadow and the other brighter.
We have a shadow being cast from the cube on to the floor plane.
The floor fades off in to the background of the yellowish brown background, this is enabled by default using a fog effect.
Although white and black can be a powerful combination, it’s nice to be able to add some colour. Click on the Material tab.
The materials in this example a just straight colours, no texture map has been defined. Because the materials have been named in the models we can control each of the models materials from here. Note: If you add the same model to the scene twice, the material values are universal changes. E.g. we couldn’t have one box blue and the other green etc. To do this, we would need to define different material names in the model and load them as different models.
Changing the Diffuse Colour, changes the colour of the object itself.
Changing the Emissive Colour, can be used to project and highlight the displayed colour.
Now we have a blue cube on a lush green floor, time to change the environment background. (Yes the cube’s emissive colour has been made darker than the last image)
As Fog is enabled, we want to change the Fog Colour to see a different background colour.
Adding a few more cubes to the scene gets the following. Notice the shadows from each cube casting shadows on to the other cubes.
Can change the whole dynamic of a scene. Click on the lights tab at the top of the editor.
Ambient lighting is non directional and applies to all the objects in the scene.
Reducing the Intensity makes everything darker (Zero intensity is the same as the light not being enabled).
The Sun is directional; selecting it superimposes as light object that can be used to change the direction.
Lowering the intensity, still keeps the shadows but can be used to provide a dusk like environment (Notice the background colour provided in the fog is not affected by either set of lights & as such should be adjusted separately for it to be some what reflective of the atmosphere that you are targeting.)
These are the only lighting effects we can use; adding a point light allows for closer proximity lighting.
We will firstly add a light group; Right Click on the Scene node and chose Add Light Group To Scene.
Then, with the new Light Group Selected; click on the new light button (The light with a + sign):
By Default, a new point light will be added to the scene. It’s position will be depicted as below:
The light can then be moved in the same way that the meshes could be moved when they were added to the scene:
In This instance, the point light is not being constrained, it’s lighting the whole scene from that point.
If we turn on a Shadowing type of All Objects, the point light is then prevented if there is an object in the way:
The cast distance can be increased to make the effect more pronounced:
A spot light is a directional light, that can then be added to give the scene a location specific highlight of an area. The cone angle can be changed and target to a specific area.
That’s the end of the introduction to the editor. The next iteration will explore some of the engine features such as the basic physics implementation and collisions.