Cuboid Engine – Sample Scene

Here’s a scene made in Cuboid Engine, just to show some features:

SSAO is present in the scenes, but it’s not done yet.


Cuboid Engine – Shadow Mapping

Alright, today I have successfully implemented shadow mapping. The Mesh can choose if it wants to cast shadows and receive shadows for performance control. As if you had e.g. 5000 instances of grass, you may not want all instances to cast shadows, or something like that. The previews are probably gonna come up soon as it’s almost done, a screenshot or a small video.

My next goal is going to be Ambient Occlusion or something like that, as my post processing shader is set up.

See you next time!

Two Headers Using Each Other

One of my early frustrations  was when I couldn’t make two headers include each other, but after a while, I actually figured out that you can ‘trick’ the compiler to do so! Heres how:

You have two headers, Mesh and Shader, and the Mesh uses some of Shader’s stuff, and Shader uses a reference of Mesh. In Mesh you include Shader.h, and use it from there, but in Shader.h, you don’t include Mesh.h, instead you make a Class Prototype so you can use the class name freely, and then in Mesh.cpp, you then include Mesh.h and do stuff with it. Now the code version:

#include "Shader.h"

class Mesh
    void Create(ShaderProperty *a);


#include "Mesh.h"

Mesh::Create(ShaderProperty *a)


class Mesh;
class Shader
 Mesh* stored;

 void SetStored(Mesh* ref);


#include "Shader.h"

#include "Mesh.h"

Shader::SetStored(Mesh* ref)
 stored = ref;;

I just though I would share this tip to you guys, as it could become useful!

Cuboid Engine Editor – Saving Feature

Now the Editor for Cuboid Engine has the feature to save the map/level/scene, and ALL properties are saved.

Now this was actually quite a challenge as I’ve never actually dealt with large string management, but it actually turned out okay. So what I did is basically to export all the information into strings, and then convert them back on load of scene. Now I didn’t use any framework to put the data, I just used the strings from ::std, so a lot of work wen’t into this, but it’s finally done (when more features arrive, more has to be done), and it took about a day to make it.

Ocean Rendering and Skybox

I’ve implemented a very neat feature today, OCEAN RENDERING! It’s actually pretty cool, and it’s animated, though there’s still some work I have to do on the shaders…

Another feature I’ve implemented today is Skybox rendering, I don’t have a screenshot right now as it’s incompatible with the ocean rendering, I’ll post it later.