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:
Mesh.h

#include "Shader.h"

class Mesh
{
    void Create(ShaderProperty *a);
};

Mesh.cpp

#include "Mesh.h"

Mesh::Create(ShaderProperty *a)
{
 ...
}

Shader.h

class Mesh;
class Shader
{
 Mesh* stored;

 void SetStored(Mesh* ref);
}

Shader.cpp

#include "Shader.h"

#include "Mesh.h"

Shader::SetStored(Mesh* ref)
{
 stored = ref;
 stored.foo(10);
}

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.

Screenshot:

ocean

Internet Down! +QT GUI

It’s been quite a time arond in my area, as my internet has been down. I think it had something to do with some lightning recently, but it’s been quite a problematic time without the internet! On sunday I had to finish my chemistry report as it was due to tomorrow, and I only missed some few pictures, but then I realised that the internet was down, so I did it quickly in the morning :).

While the internet was down, i’ve been working on the editor, and before it was quite a mess, and i switched from MFC to WPF and now to Qt. But the code behind the interface is much cleaner now. For 2 3 days I was trying to figure out why Qt wouldn’t compile( I needed to compile to Visual Studio 2012 for QT5 ), and then i figured out that my antivirus (norton) was somehow blocking it, so I had to compile in safe-mode, which took at least 3-4 hours!

Other than that the engine has been optimized more and I have rewritten a few pieces of code, but in the past Sunday I also created a Beta GUI (screenshot below), with the following features:

-Meshes
-Terrain
-Textures (+bump+opacity mapping)
-Fog (new)
-Wind (new)
-Global Light
-Object Managment (100% bug tested, took a long time to test :))

And that’s more or less it, please be aware that I’m only 1 day into the gui.

Quote: More code doesn’t equal better, less code with the same result is normally better.

gui

Cuboid Engine – Bump mapping and Specular

Hi guys!

Today I’m quite happy as i finally got both specular shading and bump mapping implemented, screenshots:

bm

 

Now there’s also been some few improvements around the engine but most of them are uninteresting :).
Btw for dubstep/glitch&hop lovers: http://www.youtube.com/watch?v=nX_X0O0jrMI