Showing posts with label example. Show all posts
Showing posts with label example. Show all posts

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.

Wednesday, 15 April 2009

Tris versus Textures

A long time ago, in a galaxy far, far away, someone made a post on the forums or in a blog which gave the memory useage for various texture sizes. I noted that useage did not double with size, but was on a much more aggressive scale. Thus 1024x gave a lot more of a kicking to Vram than two 512x.

So, town2 version (counts on fingers) er ... 4? is done. It's a mesh model, with all of the buildings enterable. No facades this time. The 2 storey facade textures (1024x) have been ditched in favour of standard 512x brickwork textures (which the facades were previously based on and had been used around the map for low walls). All doors and windows are now modeled, and are proper openings. All buildings are now fully enterable and made up of multiple rooms. Each building has at least one staircase, large buildings have two. Access to and from upstairs is granted. Access through all buildings now exists.


Prefab houses

There are currently 6 building types being used as prefabs, with a couple of custom ones (eg: church and chapel - church is still a facade, the only one left). All have at least one front and back external door, a minumum of 8 windows and 7 rooms. All have at least one staircase.

There are 50 buildings in the village. That's 641 windows, 180 external doors, 578 rooms, with 81 staircases, all linked, all useable, all explorable. I didn't count how many internal doors there were, but obviously they are what seperate the rooms so work it out (it might even be the same number as the rooms).

Needless to say this has affected the tris slightly. Tris now stands at around 48k up from 15k. And it's also affected performance - for the better.


From all closed facades to 1399-ish openings for view and movement.

Previously, with most of my Vcard (256mb 7900GS) settings on "performance" with x2 AA and Anisotropic OFF and display on x768, I was recording 165fps with the polysouped, facade mesh.

Dispensing of the services of the 1024x facade textures, and increasing the polysouped mesh by over 500%, I get the following results.

New Vcard settings are "quality" including x2 anistropic and AA. At x768 it gives a whopping 196fps, and at x1050 it gives an equally impressive 127fps.

I did have a few issues with exporting the model. I had to split the model into 6 seperate meshes, as together they exceeded the max vertices count. But as seperate meshes within the same model they exported fine.


There's lots more opportunites to worry about being ambushed. 1399 of them.

So, point proven on Vram and texture size against tris count. This was conducted on TGEA1.7.1, 1.8.1 would probably gain more of a performance boost (maybe 10%). How this will work with new tech remains to be seen, but I'd be quietly hopeful that all will be well.

In the meantime I have a Campaign for Real Ale Festival to go to, the last refuge of Saint George Flag waving, folk singing, Morris Dancing, sandal wearing, unkempt beardies who have a deep understanding of the different forms of droppings excreted by the monstrous badger of doom.

BADGER_OF_DOOM is also the current codename for my project.

God save England, 'arry and Saint George!

Monday, 6 April 2009

It's The Economy Stoopid

Actually, it's the lightmaps. Map crashes on export? Bets are it's the lightmaps. Funny dark cuts along the edges of the brushes visible from certain angles and certain distances? Not brush borders, but lightmap borders.

Why does this all happen? Because geometry scale is 32, small scale lightmaps (like 8) cause trauma on larger brushes when calculating the lightmap. Keep brushes smaller for less lightmap calculation map crash trauma. Compressed edges of lightmaps visible? Make lightmap scale the same as geometry to dispell (though to be honest you'll probably still see a few of the little critters lurking out in the far distance if you have a long, long surface like a road). There's also an occaisonal light bleed in some interiors with this.


What the world looks like immediately after it spawns from my id

So, with that finally realised, we set out to design Map2. Map1 (aka High Wold, the pics of an urban environment in my previous blogs) was created as a large test BSP using large facade blocks as the buildings. Rather urbanized, terrace streets. Map2 was designed for more individual buildings, detached, semi-detached housing. The idea being to create a series of prefabs which I can then drop into editor/modeling program, arrange and then export en mass as a single object (BSP or mesh model).

And it all seemed to go okay like that. I did attempt a new method of creating a mesh model in Blender and then exporting it as a mapfile, but Blender's map exporter isn't up to anything particularly complicated, and the end result looked like a mangled, disjointed mess on close inspection. Blender can export mapfiles fine - if you stick to the basic rules of being BSP friendly (build it using individual blocks - think lego).


Church tower is 400m away, just out of rifle range but not sniper or lmg

So, establishing that prefabbing really is the way to go, and with a BSP version knocked up, I recreated the whole thing as a mesh model. Whilst polysoup collision (what you see is what you bang into) has been available for a while, the lack of lightmaps has meant that it just didn't cast realistic shadows onto itself or other meshes. This can look a bit odd to say the least. However, there is new tech on the horizon which may well sort this problem out, and which includes scandulous mention (it's not really scandulous, I'm just using a random adjective for teh interwebz draaama) that BSP will be more performance friendly. With Map2 copied into both BSP and Polysouped Mesh versions, it'll be interesting to what the difference is in-game using said new tech.


BSP version, roofs are NULLed

To be honest I was having so much fun building the mesh version that I imbellished it quite a bit, so it's got 7k faces instead of 5k as the BSP version. Performance-wise in current tech (TGEA1.7.1 'cos I haven't transfered all of my custom scripts over to 1.8.1 yet) the meshed polysoup wins out with an FPS of 30% higher than BSP (based on 5 locations and views at 1280x768 resolution with 1700m visibility). That's an max-average fps of BSP 125 and Polysoup 165.


Polysouped Mesh version - Spot the Difference!

Apart from the mesh lighting issue there are also a couple of other problems, such as the model vanishing when the fog/maxvis hits the centre of the bounding box (problematic with large meshes in low visibility environments - but fine with a long maxvis like I'm currently using). I'm a great believer that in making large environments as a single object is better for performance than making hundreds of individual objects and then sticking them in-world together. No matter how many surfaces it has, it is still just one object for the processor to initialize and then worry about, instead of 50. Another issue I've noticed with current tech's polysoup is that the colour/tone/intensity of the textures aren't as vibrant as they are when applied to BSP, probably because of the lack of lightmaps.

Anyhow, it'll be interesting to see what the new tech brings. Roll on Beta.

Wednesday, 18 June 2008

Shader Play

Worked out how to get better looking and less over-the-top normal maps. Started having a quick mess with shaders like emissive and glow, giving some tracer which really traces.



Also think I've worked out a level/environment building solution that should look good without sacrificing performance.

Now to try and port over all my AI scripts.