Tuesday, April 28, 2009

Frustating frustum. Finally working!

Phew... frustum culling took a while to get it working properly, even though it's actually not that hard to implement. But now it's finally working!

Frustum culling is a technique that allows culling away objects which lay outside of the the cameras perspective (frustum). For example: I'm now able to put like 200 trees and houses or some other stuff into the scene without any great loss of performance!

High five!

Wednesday, April 8, 2009

Video

I said last screenshot, not video ;P

Tuesday, April 7, 2009

What do you think?



Last Screenshot for today, but in my opinion it's looking pretty nice so far, though there is soo much left to do and so much bugs to fix.

I guess I have to rewrite the entire scene graph due to its bugs and (bad) architecture.

Polygons have to be sorted in real-time too, I'm not sure how to find a FAST solution. I tried using GL_SAMPLE_ALPHA_TO_COVERAGE_ARB to save coding time, but the result is way too ugly.

Triangle collision detection has to be implemented too. The terrain needs to be patched and there's no LOD algorithm yet...

...I wonder if I ever get finished.

Lighting Problem


I really don't know why all Objects/Meshes that doesn't use a shader appear to have some lighting problems. As you can see on the picture above, those objects are too dark and have a green undertone, which is definitely not supposed to be! Graaaar!

So I decided to use shaders to light and texture all objects, until I solved the problem:

















Another screenie with improved lighting:

Monday, April 6, 2009

Is it me or..

.. is my coding style not one of the nicest?

Thursday, April 2, 2009

Didn't work on it for a while, but now there's news! I rewrote parts of code to use vertex buffers and index arrays for almost any geometry.
Rendering is super smooth and fast now :)

PLUS: Thanks to some awesome little library I've found, I wrote a model converter for my engine, which is able to convert 3DS, Obj, Collada, Quake, Doom3, HL2 files etc. to the engines own model format.