And an end to said fluppin' testing of Drawcalls. I was going to use fluffin' but after a quick check on the interwebz, it turns out "fluffer" has a rude conotation --- I mean, who would of thought it? So flup it is.
No pics. Just the facts, ma'am.
I had a quick test --- read that as far too much time --- ripping the whole drawcall/performance thing to bits and seeing what I could get it down to.
In previously mutterings on the whole performance thang I'd made it clear "why" I'd done things in a certain way previously, older tech, older hardware, a paranoia of >512px.
First off I amalgamated a few of 512 and few 256 non-tiling textures into larger 1024s. And drawcalls fell, fps went up by a bit.
I'd also extended the fixation with 512 to my lightmaps, splitting up meshes into ever smaller pieces to get the texture size down, so next up was to stitch all those meshes back together into larger ones to reduce instancing.
This meant realising that I'd forgot how to use pureLight ... and after a fair bit of jiggery-pokery, remembered that I had to delete the object in PL before replacing it if I'd changed materials or UVs (or it'd import with mixed by UVs), and if the mesh-object in Blender wasn't at 0 0 0 then the object/node it's parented to bloody had better be - even though that thing isn't getting exported - such as price to pay for using Open Source apps for these sorts of things. Oh, and collada doesn't do curvy and thus ase is needed. And ase needs materials and UVs, and collada sorts it's materials from it's UVs so time saver there ... as long as you don't want soft edges...
*note to self: write this stuff down on more than post-it notes sometime*
And finally, I took a look at what renders and what occludes. Previously I'd used zoning to split my corridor-crawler of a level into 3 main areas, and kept to the same principle with scripting, just dropping the zoning (though they might come back, at the moment there's a bit of an issue with portals at certain acute angles and things suddenly not rendering that should).
And so the up shot was this.
(GTS250 - Advanced Lighting @ 1024px without shadows / with shadows)
old drawcall average = 783 / 1076
new drawcall average = 410 /602
And the biggy - busy scene @ 1080p with everything maxed out
old drawcalls / minfps = 2295 / 57
new drawcalls / minfps = 869 / 80
So, as a total average of all my recordings, drawcalls were reduced by a third, and fps increased by a fifth. Which was nice...
In other news I saw ... well, heard some music I liked, and had to approach the guy on spec for commercial licensing (same chap I used on my lightmap video under CC). He appeared reasonable, so we'll see how that goes once this Easter break thing is out of the way.
Also, I redid my weapons with first person hands and reloading animations, and dug out an old (deactivated - don't call teh Fedz!) lever-action rifle for the metal scraping audio. At which point I discovered nearClip and the fact that it defaults to 10cm, which causes all kindsa hassle with camera penetration on aim-down-sight animations. If only I'd realized that before. I set it to 1cm and things are better. Still need to do a couple more bangsticks for my proposed demo, and so video of all of this later.
End of rambling stream of conciousness...
Tuesday, 6 April 2010
Sunday, 7 March 2010
Raging Texture Terror Usurped By Drawcall Delerium!
February flew ... fled ... or fffffff .... apparently ... or at least I didn't get a blog done anyhow. This may or may not be the same thing.
But we've been busy, 'cos ... well ... we're always busy ... and not just with talking about myself in 3rd person.
Having had a good read through some resources, I appropriated all the bits I liked into a custom weapon->clip->inventory system. Figured it'd take a good effort, say 16 hours, so settled in for a mammoth stint. And I did then iron out all the bugs after around 60 hours ... not quite what I'd planned on and hard to say how much of that time was actually spent rewriting the same thing from scratch after various mess ups as it's all a bit hazy but it did all get done in that week, and every possible way that the player could try to break the cycle and cause a bug has been covered. It's really all about logical arguements ... and me not considering all of them before starting. What happens if you have auto-reload and the player hits manual reload? Or tries to change weapons? Or aims down sights in mid reload? Or ... any of a number of things which cropped up as bugs and had to be squashed.

Still have to sort out my first person weapon, arm animations, and it will have to be a seperate arm attached to the weapon model in first person, as expanding on my previous synchronize aim-down-sight with 3rd person model hasn't proved successful.

Ripples - Automatic weapon fire - the perfect skipping stone?
And whilst messing with the whole weapon stuff, we've also had a good go at particle effects in general. Redoing all my weapon impact particles, ditching muzzle flashes in favour of mesh ones, and sorting out the impacts. I also "pooled" as many datablocks as possible for both particles and sounds, rather than having all individual ones listed in the individual weapons' cs files.
After browsing around I found that Indy Games company "Sickhead" had mentioned about the incompatibility of dogs and particle effect sources, and it hadn't occured to me to use actual effects like water or smoke for source material for particles before, as opposed to just trying to draw them, which I had done previously. And it all appeared much better.

Fire and Smoke particles made with real smoke
I also knocked up a little script to loadup specific datablocks for specific missions/levels in an attempt to keep preloading overhead down. I worked out a bit of info on audio and mainmenu music, as well as started to build the basis for my final play GUI. This involved a certain amount of umm/ah about how much GUI to actually have and especially the fate of the dreaded "crosshair". In the end I settle on a fair bit of GUI clutter on-screen, as I'm not after supposed realism. Most of it will be achieved as pop-ups - think inventory system akin to HL2, and I decided on an empty circular reticle as opposed to crosshair/no crosshair, which can be toggled and faded through 4 iterations or turned off completely. I've still a few more design decisions to make on the whole GUI thing ... but most of it is sketched into the cunning plan.

I also started to think about terrains and environments more, knocking up some terrain textures and fiddling with various settings. In the end I decided against parallax and continued to err on the side of numbers of stuff rather than eyecandy. I came up with a painterly style for skyboxes ... all very artistic and not half as difficult to make the sides join up seamlessly as I had initally feared. Also found out/had forgotten that relfection maps need to be rotated 180 degrees from the skybox, so you can't just use the same thing.

Did I mention textures?
As a remnant of TGE/A, when I found my texture memory being devoured by large textures, I've had a bit of paranoia about texture sizes, and had always tried to use as small an image size as I could (max 512) and split UV maps between multiple small textures. Of course this doesn't take into account drawcalls, and so I had a bit of a rearrange, merging a number of UVmaps into single textures. Most noticeably in my AI/Player models, which I had previously split into boots/trousers/jacket/armour/hands/headgear/face/extras - and that all produces a fair few extra drawcalls. Amalgamting all of that into a single UVmap (still only x1024) gives me a reduction of around 1500 drawcalls per 25 Ai characters, and a mild boost to fps on my current GTS250. So, texture memory paranoia has been vanquished! Or at least replaced with drawcall paranoia ...
And I did the same on a number of props which use several textures.

Groundcover is currently placeholder I knocked up quickly
Also did some general tweaking, made more models, messed around with my AI scripts a little, and started to contemplate how best to create an in-game save/load system. And some other stuff ... which I can't remember. Did I mention doubling up weapon selection on the 0-9 buttons a la HL2 so you can choose 20 weapons with 10 keys in a previous blog? If not, that's done too and bug squashed.
The engine I'm using (Torque3D) is another beta and it is shaping up nicely, and I've already been modding how the quality options of the new OptionsGUI works, to make some of the changes more noticeable in both terms of performance/eyecandy gain/loss.
Still on my list of not yet accomplished, are to redo the weapons (for the ump-frickin-teenth time) and have them work with animated 1st person arms which render/no render on 1st/3rd person camera, sort out clip/ammo reloading animations for all of this (12 weapons so far - 20 planned), make some more AI models (say 2 distinct types). After that it's tweaking AI scripts, and then soem actual gameplay making! Which has been so long I might have actually forgetton how to do it!
So ... not too much in February which was planned but didn't get done, and plenty that didn't get planned that did get done --- but that's the adhoc production nature of being one bloke, in his bedroom, trying to make computer games.

If I actually manage to get my proposed demo out by April ... it'll be exactly 2 years since my last demo.
But we've been busy, 'cos ... well ... we're always busy ... and not just with talking about myself in 3rd person.
Having had a good read through some resources, I appropriated all the bits I liked into a custom weapon->clip->inventory system. Figured it'd take a good effort, say 16 hours, so settled in for a mammoth stint. And I did then iron out all the bugs after around 60 hours ... not quite what I'd planned on and hard to say how much of that time was actually spent rewriting the same thing from scratch after various mess ups as it's all a bit hazy but it did all get done in that week, and every possible way that the player could try to break the cycle and cause a bug has been covered. It's really all about logical arguements ... and me not considering all of them before starting. What happens if you have auto-reload and the player hits manual reload? Or tries to change weapons? Or aims down sights in mid reload? Or ... any of a number of things which cropped up as bugs and had to be squashed.
Still have to sort out my first person weapon, arm animations, and it will have to be a seperate arm attached to the weapon model in first person, as expanding on my previous synchronize aim-down-sight with 3rd person model hasn't proved successful.
Ripples - Automatic weapon fire - the perfect skipping stone?
And whilst messing with the whole weapon stuff, we've also had a good go at particle effects in general. Redoing all my weapon impact particles, ditching muzzle flashes in favour of mesh ones, and sorting out the impacts. I also "pooled" as many datablocks as possible for both particles and sounds, rather than having all individual ones listed in the individual weapons' cs files.
After browsing around I found that Indy Games company "Sickhead" had mentioned about the incompatibility of dogs and particle effect sources, and it hadn't occured to me to use actual effects like water or smoke for source material for particles before, as opposed to just trying to draw them, which I had done previously. And it all appeared much better.
Fire and Smoke particles made with real smoke
I also knocked up a little script to loadup specific datablocks for specific missions/levels in an attempt to keep preloading overhead down. I worked out a bit of info on audio and mainmenu music, as well as started to build the basis for my final play GUI. This involved a certain amount of umm/ah about how much GUI to actually have and especially the fate of the dreaded "crosshair". In the end I settle on a fair bit of GUI clutter on-screen, as I'm not after supposed realism. Most of it will be achieved as pop-ups - think inventory system akin to HL2, and I decided on an empty circular reticle as opposed to crosshair/no crosshair, which can be toggled and faded through 4 iterations or turned off completely. I've still a few more design decisions to make on the whole GUI thing ... but most of it is sketched into the cunning plan.
I also started to think about terrains and environments more, knocking up some terrain textures and fiddling with various settings. In the end I decided against parallax and continued to err on the side of numbers of stuff rather than eyecandy. I came up with a painterly style for skyboxes ... all very artistic and not half as difficult to make the sides join up seamlessly as I had initally feared. Also found out/had forgotten that relfection maps need to be rotated 180 degrees from the skybox, so you can't just use the same thing.
Did I mention textures?
As a remnant of TGE/A, when I found my texture memory being devoured by large textures, I've had a bit of paranoia about texture sizes, and had always tried to use as small an image size as I could (max 512) and split UV maps between multiple small textures. Of course this doesn't take into account drawcalls, and so I had a bit of a rearrange, merging a number of UVmaps into single textures. Most noticeably in my AI/Player models, which I had previously split into boots/trousers/jacket/armour/hands/headgear/face/extras - and that all produces a fair few extra drawcalls. Amalgamting all of that into a single UVmap (still only x1024) gives me a reduction of around 1500 drawcalls per 25 Ai characters, and a mild boost to fps on my current GTS250. So, texture memory paranoia has been vanquished! Or at least replaced with drawcall paranoia ...
And I did the same on a number of props which use several textures.
Groundcover is currently placeholder I knocked up quickly
Also did some general tweaking, made more models, messed around with my AI scripts a little, and started to contemplate how best to create an in-game save/load system. And some other stuff ... which I can't remember. Did I mention doubling up weapon selection on the 0-9 buttons a la HL2 so you can choose 20 weapons with 10 keys in a previous blog? If not, that's done too and bug squashed.
The engine I'm using (Torque3D) is another beta and it is shaping up nicely, and I've already been modding how the quality options of the new OptionsGUI works, to make some of the changes more noticeable in both terms of performance/eyecandy gain/loss.
Still on my list of not yet accomplished, are to redo the weapons (for the ump-frickin-teenth time) and have them work with animated 1st person arms which render/no render on 1st/3rd person camera, sort out clip/ammo reloading animations for all of this (12 weapons so far - 20 planned), make some more AI models (say 2 distinct types). After that it's tweaking AI scripts, and then soem actual gameplay making! Which has been so long I might have actually forgetton how to do it!
So ... not too much in February which was planned but didn't get done, and plenty that didn't get planned that did get done --- but that's the adhoc production nature of being one bloke, in his bedroom, trying to make computer games.
If I actually manage to get my proposed demo out by April ... it'll be exactly 2 years since my last demo.
Wednesday, 20 January 2010
Cliche versus unCliche! Also Less Squinting and Forget How to Draw
I decided to take advantage of the New Year Sales - also getting in before VAT was going to go back up to 17.5% - to rid myself of the constantly malfunctioning Dell RAID setup which I've spent 3 years complaining about ... but not done anything decisive to stop complaining about it. Well I have now, getting a single Western Digital with more cache than the RAID, and also the new working copy of Vista ... I think it's called Windows7 ... but basically it's Vista without the bugs.
Also, whilst my folks had spent a month in the States jamming with 1950s rock stars, I'd swiped their digital TV to use as a monitor. I had quite liked this on the grounds that previously, on my old 20inch monitor I couldn't read text on the internet at full resolution and modeling in Blender was a pain. So I invested in some screen real estate and bought a 1080p TV to replace my monitor, and I can now see what I'm doing in full resolution without squinting. Or drop a resolution and everything is HUGE.
After a bit of "faffing", I got the brightness, contrast, colour to be the same as my monitor.

I feel a sudden need to explain that I don't really have the illustrated desktop background ...
Right, that's my budget for the next decade blown - back to deving.
I'd needed to come up with some sort of bad guys of a scary humanoid nature. So, I started on the Cliche. Scary Humanoid Monsters come in a variety of cliched forms ... they're cliches because they're humanoid and thus familiar, they look a bit like "us" because that's basically what they're based on (not to mention often in film they actually are a guy in a sweaty rubber suit), they are familiar and yet alien.
They are most often slow moving hunters, stalking their prey, creeping out of the background to eat/maul/shag the stupid human who is centre screen, waving a flashlight around to draw attention to themselves (apparently it all adds tension). They do come in sub-sections, zombie, Nosferatu (as opposed to sparkling vampires ... bawwwww!), and the humanoid alien monster aka guy sweating in a rubber suit.
Mostly I just plan the visual stuff in my head and then model/texture it stream-of-consciousness style. However I decided to do a bit of pre-planning.

Which is when I forgot how to draw ...
The problem with the humanoid alien is that there is no way of avoiding the cliche of a certain HR Giger designed humanoid alien. It's either that or Blue Space Furries --- or a guy with pointy ears and blue blood.
At first I wanted a fairly smooth mix of grey bone and pink skin - and tried to swipe the mouth shape from the "pink thing" in Pan's Labyrinth. I didn't quite manage to get the same "choked look", but never mind (probably should have bloated the tongue out more).
Anyhow, this all caused plenty of frustration and I just couldn't get something that I liked --- so instead I decided to do something that was bearable, ditched the smooth bone/skin idea (the whole "grey" thing stank too much of cliche for this particular cliche) in favour of a rough, almost oxidized look with a hefty metal shine. Animations seemed okayish, I wanted a it to sort of strut or "mince" -- yes, "mince" -- as it lopes slowly(<--cliche) torwards at it's prey.

It's got big hands ... all the better for flailing around and battering the player ... like a zombie ... Giger's alien ... the rest of the slow moving humanoid monster cliches. So I decided to throw in an unCliche ... which might actually be a cliche in itself ... or ... something ...
Anyhow, the slightly glowing bits are the hint, and they wash around the model's body. Fade isn't currently functioning, so it's a bit on/off when it happens.
The initial tests were just based on collision events, and then redone so that it attacks via a raycast based on range from target (only about 4 metres). Purple Swirlyness, some damage via a smartbomb effect (doesn't hit teammates) that goes out to an area of around 8 metres rather than just hitting it's target, lots of impulse, no clawing. And as an added cliche - ondeath, it goes out with a bang! Energy Explosion Audio provided by my GPU fan running Torque - and then flanged in Audacity (if it sounded like that normally I think that there would be something very wrong!).
All-in-all, not as bad as it could have turned out, and the colourful explosion effect is quite nice, distracting and I think can generally cause some confusion in-game. Guess I need a variation on the theme, players love variety, and some sort of fast-moving-but-easier-to-kill-hunter-cliche is probably on the cards, some more humanoid aliens that can use guns, and then the really awkward task of making some scary starfish aliens which really look alien (pulls out the Lovecraft books) --- hope I remember how to draw by then ... I'm really out of practise.
And what they look like in action against a conventional army.
Also, whilst my folks had spent a month in the States jamming with 1950s rock stars, I'd swiped their digital TV to use as a monitor. I had quite liked this on the grounds that previously, on my old 20inch monitor I couldn't read text on the internet at full resolution and modeling in Blender was a pain. So I invested in some screen real estate and bought a 1080p TV to replace my monitor, and I can now see what I'm doing in full resolution without squinting. Or drop a resolution and everything is HUGE.
After a bit of "faffing", I got the brightness, contrast, colour to be the same as my monitor.
I feel a sudden need to explain that I don't really have the illustrated desktop background ...
Right, that's my budget for the next decade blown - back to deving.
I'd needed to come up with some sort of bad guys of a scary humanoid nature. So, I started on the Cliche. Scary Humanoid Monsters come in a variety of cliched forms ... they're cliches because they're humanoid and thus familiar, they look a bit like "us" because that's basically what they're based on (not to mention often in film they actually are a guy in a sweaty rubber suit), they are familiar and yet alien.
They are most often slow moving hunters, stalking their prey, creeping out of the background to eat/maul/shag the stupid human who is centre screen, waving a flashlight around to draw attention to themselves (apparently it all adds tension). They do come in sub-sections, zombie, Nosferatu (as opposed to sparkling vampires ... bawwwww!), and the humanoid alien monster aka guy sweating in a rubber suit.
Mostly I just plan the visual stuff in my head and then model/texture it stream-of-consciousness style. However I decided to do a bit of pre-planning.
Which is when I forgot how to draw ...
The problem with the humanoid alien is that there is no way of avoiding the cliche of a certain HR Giger designed humanoid alien. It's either that or Blue Space Furries --- or a guy with pointy ears and blue blood.
At first I wanted a fairly smooth mix of grey bone and pink skin - and tried to swipe the mouth shape from the "pink thing" in Pan's Labyrinth. I didn't quite manage to get the same "choked look", but never mind (probably should have bloated the tongue out more).
Anyhow, this all caused plenty of frustration and I just couldn't get something that I liked --- so instead I decided to do something that was bearable, ditched the smooth bone/skin idea (the whole "grey" thing stank too much of cliche for this particular cliche) in favour of a rough, almost oxidized look with a hefty metal shine. Animations seemed okayish, I wanted a it to sort of strut or "mince" -- yes, "mince" -- as it lopes slowly(<--cliche) torwards at it's prey.
It's got big hands ... all the better for flailing around and battering the player ... like a zombie ... Giger's alien ... the rest of the slow moving humanoid monster cliches. So I decided to throw in an unCliche ... which might actually be a cliche in itself ... or ... something ...
Anyhow, the slightly glowing bits are the hint, and they wash around the model's body. Fade isn't currently functioning, so it's a bit on/off when it happens.
The initial tests were just based on collision events, and then redone so that it attacks via a raycast based on range from target (only about 4 metres). Purple Swirlyness, some damage via a smartbomb effect (doesn't hit teammates) that goes out to an area of around 8 metres rather than just hitting it's target, lots of impulse, no clawing. And as an added cliche - ondeath, it goes out with a bang! Energy Explosion Audio provided by my GPU fan running Torque - and then flanged in Audacity (if it sounded like that normally I think that there would be something very wrong!).
All-in-all, not as bad as it could have turned out, and the colourful explosion effect is quite nice, distracting and I think can generally cause some confusion in-game. Guess I need a variation on the theme, players love variety, and some sort of fast-moving-but-easier-to-kill-hunter-cliche is probably on the cards, some more humanoid aliens that can use guns, and then the really awkward task of making some scary starfish aliens which really look alien (pulls out the Lovecraft books) --- hope I remember how to draw by then ... I'm really out of practise.
And what they look like in action against a conventional army.
Subscribe to:
Posts (Atom)