As much as Tuesday was fun and productive, Wednesday was muddy and slow in the world of terrain coding. I had a few missions today, mainly to improve the shape of the lower LODs so they don't change shape too much on the horizon line, add multi texture support and improve the distant LOD level as it was too low polygon.
I started the day well and completed the first task, which increased my polygon count from 8800 to 13500 for the terrain geometry and dropped my frame rate from 850 to more like 450 fps.
At this point I decided to apply the brakes as there is no point continuing with texturing if I'm already loosing a significant amount of performance at the first hurdle. The third task was entirely academic as the solution 'was' to add more polygons but this clearly was not the direction I needed to go in.
Calling In The Blitz
As a point of comparison, I decided to bring in one of the newer DBP modules from the massive library of extra-features of the Dark Basic language has at it's disposal. This one was called Blitzwerks Terrain and with it, I created a terrain 500x500 with two levels of LOD. When run, the geometry shapes where very well retained across all LOD levels, it already has basic texturing support and the best news of all, it was weighing in at over 3500 fps.
Clearly, my own initial effort was not even holding a torch to the terrain system already available via Blitzwerks Terrain. Perhaps this is not surprising given my one day effort was being compared to a highly optimised module that took months to create.
I have thus fired off an email to the author of Blitzwerks Terrain in the hope that the source code survived. If possible, I would like to add some extra features to it including a more sophisticated texturing system which will allow me to shade grasses, apply shader effects and other nice touches.
Character Meets Code
Another task I added to my daily list was the creation of a quick character prototype for Reloaded. The final character model and animation came through last night and I was itching to get it in code to see what it could do.
As I expected, the character performed really great in code and each time I wanted an animation it was documented and ready for to call up. I added some nice touches to the prototype while I was in there such as automatic smoothing from different animation loops, two modes so I could switch seamlessly between patrol and combat stance, eight directional walking in both modes and a few other subtle tricks to make it all feel natural.
I also had a quick play with transitioning the background music sound based on the character mode, so when patrolling the sound is calm and when the character is in combat mode, the sound gets more racy. Proper sounds will be sourced and used for the final product, but the video should give you an idea what it might feel like. I especially like now the combat sound fades out slowly as the heart rate falls after the high octane adrenaline rush.
Signing Off
It's about half eleven now which gives me a few more hours before I have to turn in. Even though my terrain geometry stuff is a little 'off' there is no reason why I cannot code up the real-time texture transition stuff for the terrain as this is quite separate from the polygons that shape the ground. I can also experiment with some other ideas I had too once my terrain texture prototype is up and running.
AGK V2 Kickstarter
Taking a look at the latest score, we have pushed past £21K, hurray! It's great to see people pledging on this project, and my new goal is to see the 570 climb up to 600 pledger's :) If you have any coder friends who don't know about the AGK kickstarter, send them this link if you think they might be interested: http://www.kickstarter.com/projects/tgc/app-game-kit-v2
Lee, the grand total so far for AGK V2 is £23,039. This is Kickstarter pledges + direct paypal pledges. You can see the latest pledge level which is update daily in this thread;
ReplyDeletehttp://bit.ly/14gIWtW
I was just thinking of something quite important about models and the editor... if for some odd reason a model has been moved and the editor is attempting to load a level with that model in it and cant find it... is there a way in FPSC-R we could have a window that pops up saying missing asset, and have it allow for us to browse for the missing file?
ReplyDeleteYou wouldn't believe how relieved I was to read that you're using BlitzTerrain. It's a custom renderer attached to DBPro's and it's lightning fast terrain. Like, _the best_. Perfect LOD, no holes between LOD levels, exclusion mapping (could be really useful in a segment-based editor), very customisable, realtime modification, etc. And then you'll probably get access to the source code too, so I can't wait to see what Reloaded terrain is like :D
ReplyDelete