Showing posts with label bsp. Show all posts
Showing posts with label bsp. Show all posts

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.

Thursday, 8 January 2009

Dark Night Soul Hammy Melodrama

The ever decreasing list of things to do is .... ever decreasing. In fact we (that's the royal we or the Gollum we, whichever we prefer) are not only down to a single yellow, sticky, Post-It note (which is what passes for design docs around here), but are now just down to the tiny scrawled print at the bottom corner. And after that, we'll have a full, big-old environment completed. At last.


Low Poly FTW!

It's mostly a matter of detailing those little things which would look amiss if they were not there. Sign posts to give the locale a place in a world beyond it's own existence, a public street map saying "you are here" and then no arrow to go with it, a closed down Post Office because of government funding cuts. And a walkway bridge which I forgot to do in the beginning and have just realised that there's an electrified railway track with no way to get from one side to the other. And a few other bits.


"Bits" are allowed to have humour

And it's bits which have preoccupied the last 2 or 3 or so months. Warning signs just to make sure that people know that the bit of railway track which does not have a barrier blocking it is electrified - and thus is blocked (until I stick the footbridge over it anyway). Benches, tables, timetables, waiting lists, telephone kiosks, a baker's dozen worth of signage, parked vehicles, and all the base, texture, normal, specular mapping and multi-level_of_detail modelling which goes with it all. It's all bits, and not the most fun bits. It's not the intellectual stimulation of writing AI scripts or scripting gameplay sequences which is my real forte. It's all a bit like donkey work.

And as a creative, we hit "The Dark Night of The Soul" (cue stabby-shower-scene-from-Psycho-music!). It's when fatigue sets in, morale plummets and rum intake goes through the roof. It's probably what pro's call burn-out. I've been blogging/in full dev mode since March, and I don't do holidays.

Of course there's an easy solution to this - keep going. Don't stop and do something else because it's more interesting/fulfilling/entertaining, putting off the enivatable and the neccessary is the worst thing to do. Get the horror over with now and look forward to the fun stuff later - infinitely better than having the horror constantly lurking on the horizon, brooding at you. Just slog through. As an obese, chain-smoking, alcoholic, former opium-user once said; "If you're going through hell, keep going".


PUB!

The slog continues, but is nearing the end. A new year has dawned, rum consumption has dropped off, morale leveled out, fatigue is ... well, pretty much where it always is, so no great shock to the system there. The one good thing about donkey-work is that it doesn't take up all your creativity, thus allowing the mind to quietly handle future ideas and plots on it's own, allowing them to ferment and evolve with no actual help from oneself, 'cos oneself is busy doing something frustrating and long-winded. And my hard-drive blowing up in the middle of all this wasn't exactly helpful.


It might not look much but it imparts plot - and helps cover a bare wall

So 89 textures currently finished (multiply that by 3 for normals and specular mapping), 49 completed models (multiply that by 3 to 5 for level_of_detail), and one huge .map/bsp with 9752 surfaces (which still needs a bit of tweaking here and there), and one considerably smaller low poly church and chapel. A bit more work (mostly texturing) and this environment will be completed, along with most of my core models, and just as importantly, a methodology for working efficiently and effectively designed from our trials-and-errors.


DRL for shininess, Normal for performance (or to combat migrane)

261 individual models in use, an extra 300 in replicated trees, the enormous bsp of the town itself and excellent fps with visibility set to draw all, and it's still good with a load of AI running through their raycasting routines for targets in a little shoot-through test I conducted.

And Torque Game Engine Advanced was voted best engine of '08. Linkage

[/end_of_stream_of_what_passes_for_consciouness]

Saturday, 12 July 2008

8 million shades of brown

My first developed game was a text adventure on the Spectrum 48k, way back in the early-to-mid-1980s (history's greatest decade!). The humble Specky, brainchild of boffin Sir Clive Sinclair (when inventors wore white coats and still looked like mad scientists), had a range of 10 colours. My text adventure was black and white.


There's Colour in Them There Rolling Hills

Then came the Amstrad 64k, initially with a green screen, but then a colour one. Little more than a glorified Specky, but those extra 18k gave a whole new world of colour.

The appearance of the Amiga was a big boost to colour (1-2meg memory!). I remember a graphics/art package with 4096 colours!


UV mapped characters are on the to-do list - which is piggin' huge

And finally the PC (with good old DOS), and future -- or rather the present -- was here. My first PC had a 25mhz processor and whopping 4megs of RAM - my current has a dual 2.3ghz chips with 2gigs of RAM. And the games are more visually realistic than ever. Call of Duty 4 has 2 million shades of grey whilst Gears of War 2 promises to break new boundaries in the shade of brown. HDR lighting means every glance to a virtual sky burns out the player's retina as the screen fills with the burning brilliance of a supernova - which is odd, 'cos I look up at the sky all the time and it doesn't seem to damage my sight. Nor do I see lense flare from every angle.

So what is the Indie Dev to do with this march of monotone progress?


Base Painted Texture

Well, the Indie Dev could play along with hyper-real world of grey and brown psuedo-photorealism. I've got a pretty decent digital camera, I know how to edit images and understand colour (I should do, I got a degree and post-grad and then spent X years bumming around the arse-end of the Mediteranean as a Bohemian artist type).

And then get lost in the haze? I expect the brownness of GOW2 is costing the outstanding national debt of a small impoverished country - Hallo3 certainly did. Then there's the team numbers - which is pretty much the same thing as cost. One bloke in his bedroom, furiously hammering away at a graphics tablet and keyboard, is not a 100-300 strong development team spread across multiple studios (a la GTA4).


And with Normal Mapping

So, back to that tablet and digital painting for textures, and tile and reduce detail in photos to make normal maps for brickwork and surfaces. My first attempts at striking a balance between artistic paint style (textures) and realism (normals) is pretty okay ..... ish. Though I might like them to be a tad rougher.


After further practise/messing I worked out a technique to make a painted skybox by hand.

Colour - and only 2 shades of brown!


Roads and foliage next me thinks, and the creation of an actual environment.

Friday, 16 May 2008

More Fun With Clone Stamp Than Is Decent



After sorting out my workflow and best practise for building ...er, buildings - taking into account the nuances/pain-in-arses of multi portaled old-gen Binary Space Partitions (modding the CoD series was more forgiving) - I've been work on textures and the problems associated with getting them to tile correctly (hence clone stamp).



There are some good, free, lgpl base-textures (base as in non-tiling) available on the interweb, and I've also got my own trusty, fake-SLR Fuji for getting more custom stuff. The finished results are basic seamless-textures - no normal mapping or anything fancy, though I did a bit of freehand editing for light and shadow.

No windows or doors as such yet - just the appropriately sized holes, I'm gonna model them (Blender - it's free) rather than opt for more BSP (it's actually easier for me to differentiate collision detection that way). Buildings still need LODing.

And I got some decent feedback after releasing my "Dubious Demo v.02".

Tuesday, 6 May 2008

Content Creation



Building Buildings. With garish placeholder textures.
Back to Binary Space Partitions - portal and detail the hell out of it, but remember those Old School 90 degree angles.

After much messing, I sorted the best practise for workflow, finally got those textures to align easily.