Windows in games is a huge problem. They are always done by using a flat texture on facade meshes. This results in flat looking facades which break the credibility of the world. The Drag[en]gine provides an interesting solution to this problem to spice up your game world without adding extra geometry or making things complicated. But first things first...
Besides bug fixing tickets one topic has been texture preloading. Loading textures is one of the most time consuming processes and different drivers can yield vastly different results. The most simple solution is to upload a texture base level and let the driver compress and mip-map the texture while uploading. This happens synchronously and can take from a second up to a lot of seconds with large textures. Also the quality of drivers compressing texture varies a lot. One of the tasks had been to solve this speed and quality problem. The mip map calculation and texture compressing has been moved now into CPU land. While loading textures asynchronously they are now mip mapped and compressed on the CPU before being uploading synchronously to the GPU. The performance is totally something else. Previously loading the game world took up to half a minute on certain drivers. With the new loading routine the loading of the game world takes only a few seconds now. Furthermore texture compression quality is now stable and fast no matter what GPU and driver you are using.
In between I took also a couple of days off to tackle a proof of concept side project. I use this to test certain engine features I can not test with the main game project. In this case I took a stab on that Shield Liger model I had around. I create the project files from scratch and whipped up a first working prototype in a couple of days. While working well this showed me where I still have to apply changes before the first engine version is released and I found bugs I fixed I didn't come across in the main game project. Last but not least this gives a little off-topic video to look at: YouTube Video.
No, I'm not going to end up like those wannabe game-devs filling up their news posts with totally irrelevant videos of their dog, bed room and weather outside just to rake in PR although there is nothing worthwhile to talk about to begin with. I'm talking about rooms behind flat walls.
As mentioned in the intro this update deals with the problem of flat windows. Some years ago I came across a nice article on the Internet of a clever guy who had a clever idea. For some strange reason I've not seen a single AAA game-dev picking up that idea although it's cooler than a polar bear in a freezer. In short he replaced the flat texture with a cube map. Taking that basic idea I wrapped up a working solution which is as simple to use as anything else in the Drag[en]gine.
For this purpose new texture properties had been added:
The next tickets to work off are a bit more technical so the next news post most likely will take a bit longer since technical stuff doesn't show much with videos or images. The close goal is still the first engine release. Working off tickets is still coming along nicely.
Using plugins usually ends up with limited engine access. This is not what I wanted for the Drag[en]gine. Thus I've implemented a plugin system which does not only place the engine in the website but gives you control over it.
Load installed Drag[en]gine , modules and installed games
Sets up the engine using found launcher configurations on your computer
Checks all game requirements are fulfilled
Provides support to launch an installed game
Cleaning up the engine after exiting a game
The provided launcher functionality works similar to the console and GUI launcher installed by the Drag[en]gine. You can thus use the plugin to simply play games through your browser window or (and this is more interesting) to play games straight from the web. You can simply fill the engine with resources from the web and start it up with a Web-Game profile. This way you can make a game with web-content but using the installed Drag[en]gine for maximum performance and compatibility. The same platform independence holds true for the Drag[en]gine between the Web and PC like between PCs.
Creating a game for PC makes it automatically work on the Web and vice-versa with NO extra work, NO recompilation, NO repacking and NO second versions to manage.
Now is time for some more remaining ticket reduction work. Let's see what the next news post holds in store for you.
In the last news post AniCator asked for ambient occlusion for the cloudy day system. First things first the Drag[en]gine knows already texture defined ambient occlusion using the ambient.occlusion texture property. You can generate these using Blender3D for example. Since he asked though if dynamic ambient occlusion would be possible I took a little side-step to plug this into the engine.
Dynamic ambient occlusion is something game developers like to use since some time. You can plug those in as a post-processing effect and get done with it. Unfortunately most implementations found so far in games are crappy. I do not wanted to have crappy SSAO in the game. Better no SSAO than crappy one. So I dug around recent implementations evaluating their usefullness (and/or crapiness) with my own modification idea in mind. As it turns out somebody else had a similar idea just recently which is usually a good sign if two minds come up with the same idea. The implementation sails under the name of Scalable Ambient Occlusion or SAO for short. The basic implementation is nice and is screen resolution and depth resistent with constant cost but suffers from some math which likes to produce the dark halos as mentioned in the article above. Altering the math a bit though with a more "sane" mathematical background helps to reduce the problem. Removing black halos though tends to introduce white halos but these should be less problematic.
Cheap implementations plug SSAO in as a post-processing effect messing with all lighting. This is utterly wrong and is another source of bad results. In the Drag[en]gine the ambient occlusion (both texture and dynamic) affects only the ambient lighting. The direct lighting is not "directly" affected but more about this later.
So here first some images of the SAO in action. The shadow areas receive subtle occlusion effects. Over-done SSAO looks crap so the goal has been to have physically plausible ambient oclcusion instead.
And here a test video showing first the pure ambient occlusion texture and then some sample location s with SSAO enbled and disabled. At the end you can also see how the effect does not affect geometry in plain sun light but only in shadows.
With a little extra line of code in the shader the ambient occlusion can be used also to provide a form of limited self-shadow casting. The Drag[en]gine limits this to texture ambient occlusion only since this AO is of higher quality and of smaller scale. This shows the result.
And here a video with a turning light source. The self-shadowed version is a subtle enhancement of the shape perception with the advantage of having no additional cost (no cone-stepping required). As such though the method has it's limits.
There's room for improvements with this entire SSAO stuff but right now it is more important to work off more of the remaining tickets for the first release.
This year everything went somehow different than planed in the first place, for the worse or the better. Besides hardware issues some tasks had been so large and intertwined that making a news post earlier had been tricky. Besides that I also didn't feel like making a news post in the last couple of month. Whatever the reasons out of the work done these tasks had been the most time consuming and important ones.
The main focus had been on reworking the shader system to lift it up to the next level. This had been unfortunately required to get all the bells and whistles done I've planed for this project. This included skin and lighting shaders. This took quite some time since the shader system in the Drag[en]gine is deeply integrated for versatility and performance reasons. Also decal rendering masks have been improved to allow more natural decals (see puddle image).
Another focus had been on optimizing rendering and lighting on various ends to increase performance where possible. This took also longer than expected.
An unfortunate focus had been on upgrading my entire PC leaving me with nearly 2 month of no chance to work on the project. Never before an upgrade went so TARFU. At last the HD7970 is now humming alongside the QuadCore as it should except I'm only running at 75% possible performance but the upcoming driver upgrade should fix this (hopefully).
The last huge task involved redesigning the reflection system. I've evaluated and test-implemented various reflection approaches from simple env-map blending to local reflections to find a good system which actually works with Physically Based Rendering. The system in place now works with a combination of global and local reflections with distance roughness, optional projection boxes and optional mask boxes. This all works across all geometry types in the engine without any additional work by the developer.
Eventually a first version of a weather system has been added to the game to test the reflection system.
This is only the most important part of all the work done. The rest is included as the typical bullet list at the end of the news post to not scare away people with a huge text wall. To counter the text here a few images and some test videos. To not spam only the first of the images in both profiles are linked. Find the rest in the respective gallery going to the left ([u]15 images in total[/u]).
Here a small video of the reflection system in action. I think images work better but sometimes people like more something that moves. So here all put together (video-grab messed up the colors).
And here something for the lovers of details. The new weather system also includes cloudy weather code. You all know how lighting conditions change quickly if clouds pass by the sun on a cloudy day. This code uses the Drag[en]gine Sky System to simulate this effect. Since in a detective game locations (sets) are important I would like to add some effects to them like this one here. Watch the entire video to see it. Other weather conditions will be added like foggy or soft/heavy rain to make revisiting locations more interesting.
Although during this year work has been slower than anticipated the number of task tickets left for the first release got less. The end is not far away if nothing else breaks right before the end. With these interwined tasks out of the door news posts will be more frequent than they have been up to now.
Here the very short list of what happened during all this time. You can stop reading here if you don't want to know all the lengthy details.
A very long time passed since the last news. One reason had been me moving to a new place which took longer than expect. Then there had been lots of work too correlated to show by its own. And finaly but not least there had been some nasty incidents at ModDB where somebody with site moderator power (as it seems) vandalizing the profile of my project which I restored. Due to this incidents though I put a news ban on ModDB which had been in effect since somewhere the beginning of this year. In the mean time though a couple of people asked me to lift the ban. When I found a way to protect my work by reworking the Wiki to host the articles I decided to lift the ban as on my wiki my work is safe. I don't want to warm up this story more than I just did. Important now is only that ban is lifted. For me this incident is now a matter of the past and shall stay there. Let's move on to what is really important.
The Drag[en]gine Wiki has been completely overhauled. To help prepare for a future release of the game engine this wiki is turned into the SDK and first source of information. Hence it is made for the developers wishing to work with the game engine. Especially in light of the incidents that happened the wiki has been modified to hold also all the articles from now on. I'll now only make short bullet lists of what has happened linking to the wiki pages. No articles will be posted anymore on ModDB (on my wiki they can't be vandelized). The articles contain in depth details. It's really worth reading them if you want to know all over the Drag[en]gine.
Here the list of what happened during all these month. Click on the links for detailed articles about the topic:
It's time now for an overdue all important addition to the shader system to allow for even more power and versatility that I need to get that performance punch to crank up frame rates. My Radeon 4870 HD is not the youngest and most powerful graphic card anymore but I have the will to get the most punch out of it with my engine. Besides this I want to get the first mission into a playable state with first investigation work going on. A lot of the required engine work is done already. And that is the most time consuming part so far. Furthermore more articles will be moved one by one to the safety of the Wiki.