Well It’s been pretty slow for a while, but the few things that I have been getting into are pretty tedious matters so there’s all the reasons in the world for it to be slow.
First off. I’m just re-structuring the engine a little, and putting in some new things.
I’m going to start working on scene-management pretty soon and get that out of the way.
But mostly I should invest time in getting the rendering part fully working, and maybe include Deferred Shading as an option for it. But I’m still very much on the fence about the high GPU memory requirements of the GBuffer, even though this is likely to be less prominent in future cards.
But this is all in the cooking pot, and I’m still also considering using a mostly static environment.
I’ve stumbled upon a little thing that I’ve been researching regarding DirectX and I’m considering writing a renderer for it, but I’m right now just comparing the different versions that I can choose from, DirectX9 and 10 (or 10.1, I forget) which are the two I’m interested in, or physically bound to by my graphics card.
Making the rendering part of my engine API independent would be very nice.
So, now onto something else that I thought I would share:
I’ve been working with cubemaps for a few days now and I’ve always found them a little troublesome to create.
Now there are several good software out there that can be used to produce cubemaps, like Terragen and a few other, I’m sure.
But I figured that there has to be a way to do this in any 3d program, and the solution I found is pretty weird, but useful.
NOTE: Now I haven’t seen this solution anywhere else but I won’t claim this idea to be mine.
TIPS: Cubemap makin’ 101
Anyway, the idea is to build a small, simple scene in any 3d program that looks like something, whatever you want really, urban environment, jungle, whatever, doesn’t matter.
The more effort one puts into the scene, the better the cubemap will look, obviously.
But the idea is that this scene has to be enclosed, meaning there can’t be any leaks into the “void” 3d space or whatever one wants to call it.
The reason for this isn’t some technical one, it’s just that we rarely want to have pixels in the cubemap that match the color of the 3d void (usually black in most programs by default).
So after this scene is complete and it’s ready to be rendered you can unwrap a cube like such:
(Chances are you have seen a cube unwrapped like this before)
And this cube needs to be situated somewhere inside the scene you created earlier, I may add. All sides need to “see” the inside of the scene.
So what’s left is you add a 100% reflective material to this cube and omit things such as specular highlights and things from the material so that it’s just a perfect mirror and nothing else.
Now you can bake the results of this material onto a texture, using the UV unwrap that the cube has. The result is a cubemap like this:
There are a few things to note here.
* When baking the result to the texture, padding should be 0 pixels, we don’t want any pixel-bleeding to occur, chances are it will just make it harder to extract the different sides from the rendered textures.
* Also note that you could just as easily separate the six sides of the cube to render to six different textures instead, that would make it easier to remember which side the textures belong to.
* You can’t blur this image in a program like photoshop to create a so called “diffuse” cubemap, you would get seams to embarrass the very gods.
* If you really do need to blur it, most 3d programs have the option to blur the reflection, so just render the blurred reflection instead of the crystal clear one.
That’s pretty much it. I use it and it works pretty good I must admit. Given I mostly use it for diffuse cubemaps for image based effects and such, but none-the-less. 🙂
Now I’m back to whatever it was I was doing. Bye~!