If it's not one thing ...
by Steve Acaster · 10/13/2008 (1:59 pm) · 12 comments
... then it's err ... more than one thing.
So exporting a road system or town enmass (or either in fairly large sections) came to a juddering halt, or more, the model being DTS was the juddering halt.
DTS meshes don't fog correctly (I knew that anyhow), they fog along total model size rather than individual plane, but I wasn't too concerned about that or the lack of lightmaps (in hindsight I was probably looking to create too much work for myself). But when the far side of the bounding box hits the max visibility - *piff*paff*poof* - the whole model vanishes. It's called pop-up, bane of games since 3D appeared - or in this case pop-off.
How much trouble can a square mile of town cause? Errr ... loads.
Pop-up occurs when things suddenly come into view, out in the distance. Unless you want a fairly low visible draw distance. Like fog or night, anything other than a clear day. It's all the more noticeable then, especially if your models are fairly large.
So, back to Binary Space Partition. It fogs correctly (or at least by per plane), it has lightmaps (yay, correct shadowing), per plane collision, and to be honest it's not that much of a processor load, especially for the new Map2DIF_plus_TGEA, which despite it's problems (I know it's on it's first version working release) gives a fantabulous performace, much better than the old M2DP. But it is an Old School (no, I'm not spelling it with a K) BSP, and it likes it's straight polygons (tweaking vertexes annoys it) and there's no bezzier meshes - which essentailly was what I was using the DTS model mesh idea for (nice curves).
BSP FTW!
It's a bit temperamental --- or more the exporter is a bit temperatmental (*crash*bang*wallop* emphasis on crash). Like all things the exporter is a WIP (apart from human evolution allegedly, which I read somewhere might have stopped - that means this is as good as it gets, folks! I want a refund! And the prehensile tail back!)
But the good news is that Blender can export as an old Quake3 dotmap, so all the work done in modelling roads is not lost. A bit of tinkering (with a reduction in scale to 34% for some reason) to make my meshes a little more BSP friendly (initially I just converted it as was, it worked but gave me loads more surfaces than required) and then pass it on to Constructor for exporting (fingers crossed whilst it takes it time to work out lightmaps for 8000 surfaces without crashing) to DIF format. And it all seems to work fairly nicely.
'Ave it! My weapons have a realistic(ish) range
And the framerate is good. For one huge DIF it runs at well over 200+ frame per second --- with a whopping visible distance of 1000 metres. And of course it self culls when visibility is reduced, thus eliminating unseen surfaces and improving performance. With it being so large (1600 metres - count 'em), LODing seeming rather pointless as the player will always be inside the area, and thus it will always show LOD_0.
With a road network sorted out, I started to add a few basic buildings to my source file in Blender. And the fps was still fine, so I worked out it'd be better to model all my static buildings (one's you can't go inside) enmass (that word again) with my road network. With the fear of a tempermental exporter I've been going slowly, building a bit in Blender, exporting through Constructor, seeing how it looks, then loop. I reckon I've about got the hang of it, as exporter crashes are now a rarity rather than the norm.
Buildings that can be entered will have to seperate BSPs, slotted carefully into place in-game. This is because of portalling (culling via line-of-sight view) and the need to prevent portals from one side of the dotmap being able to see into others - thus nullifying the portals and the extra fps gain.
DIF and FXReplicator in perfect harmony - 250fps
Whilst I'm still sorting out the town and it's buildings, I do have a 1600 metre square area accessible to the player as a single BSP. The textures are all still placeholders and are just a little difference for testing purposes. For a further quick test, I threw in 4 varities of 350 trees (with basic LODs) and found the fps was still a good 170-250 with 800 metres visibility.
Bad guy at 200m: the realistic size of the target is an explanation of why I'm such a cack shot in real life
To be honest it's the urban environments that have been causing all the problems recently. For rural environments I've already come up with a working design solution.
So, yet another problem (hopefully) solved. Finish off my town basics, then sort out a few interactive buildings, throw in some models, knock up some working textures (still umming-and-ahhing about the art style a bit), and I should have a proper environment. Then just to script it into a playable level.
All this whilst suffering from the dreaded lurgy. (that's flu to most people --- and that's a common cold to women)
;P
So exporting a road system or town enmass (or either in fairly large sections) came to a juddering halt, or more, the model being DTS was the juddering halt.
DTS meshes don't fog correctly (I knew that anyhow), they fog along total model size rather than individual plane, but I wasn't too concerned about that or the lack of lightmaps (in hindsight I was probably looking to create too much work for myself). But when the far side of the bounding box hits the max visibility - *piff*paff*poof* - the whole model vanishes. It's called pop-up, bane of games since 3D appeared - or in this case pop-off.
How much trouble can a square mile of town cause? Errr ... loads.Pop-up occurs when things suddenly come into view, out in the distance. Unless you want a fairly low visible draw distance. Like fog or night, anything other than a clear day. It's all the more noticeable then, especially if your models are fairly large.
So, back to Binary Space Partition. It fogs correctly (or at least by per plane), it has lightmaps (yay, correct shadowing), per plane collision, and to be honest it's not that much of a processor load, especially for the new Map2DIF_plus_TGEA, which despite it's problems (I know it's on it's first version working release) gives a fantabulous performace, much better than the old M2DP. But it is an Old School (no, I'm not spelling it with a K) BSP, and it likes it's straight polygons (tweaking vertexes annoys it) and there's no bezzier meshes - which essentailly was what I was using the DTS model mesh idea for (nice curves).
BSP FTW!It's a bit temperamental --- or more the exporter is a bit temperatmental (*crash*bang*wallop* emphasis on crash). Like all things the exporter is a WIP (apart from human evolution allegedly, which I read somewhere might have stopped - that means this is as good as it gets, folks! I want a refund! And the prehensile tail back!)
But the good news is that Blender can export as an old Quake3 dotmap, so all the work done in modelling roads is not lost. A bit of tinkering (with a reduction in scale to 34% for some reason) to make my meshes a little more BSP friendly (initially I just converted it as was, it worked but gave me loads more surfaces than required) and then pass it on to Constructor for exporting (fingers crossed whilst it takes it time to work out lightmaps for 8000 surfaces without crashing) to DIF format. And it all seems to work fairly nicely.
'Ave it! My weapons have a realistic(ish) rangeAnd the framerate is good. For one huge DIF it runs at well over 200+ frame per second --- with a whopping visible distance of 1000 metres. And of course it self culls when visibility is reduced, thus eliminating unseen surfaces and improving performance. With it being so large (1600 metres - count 'em), LODing seeming rather pointless as the player will always be inside the area, and thus it will always show LOD_0.
With a road network sorted out, I started to add a few basic buildings to my source file in Blender. And the fps was still fine, so I worked out it'd be better to model all my static buildings (one's you can't go inside) enmass (that word again) with my road network. With the fear of a tempermental exporter I've been going slowly, building a bit in Blender, exporting through Constructor, seeing how it looks, then loop. I reckon I've about got the hang of it, as exporter crashes are now a rarity rather than the norm.
Buildings that can be entered will have to seperate BSPs, slotted carefully into place in-game. This is because of portalling (culling via line-of-sight view) and the need to prevent portals from one side of the dotmap being able to see into others - thus nullifying the portals and the extra fps gain.
DIF and FXReplicator in perfect harmony - 250fpsWhilst I'm still sorting out the town and it's buildings, I do have a 1600 metre square area accessible to the player as a single BSP. The textures are all still placeholders and are just a little difference for testing purposes. For a further quick test, I threw in 4 varities of 350 trees (with basic LODs) and found the fps was still a good 170-250 with 800 metres visibility.
Bad guy at 200m: the realistic size of the target is an explanation of why I'm such a cack shot in real lifeTo be honest it's the urban environments that have been causing all the problems recently. For rural environments I've already come up with a working design solution.
So, yet another problem (hopefully) solved. Finish off my town basics, then sort out a few interactive buildings, throw in some models, knock up some working textures (still umming-and-ahhing about the art style a bit), and I should have a proper environment. Then just to script it into a playable level.
All this whilst suffering from the dreaded lurgy. (that's flu to most people --- and that's a common cold to women)
;P
About the author
One Bloke ... In His Bedroom ... Trying To Make Computer Games ... eventually ...
#2
10/13/2008 (10:19 pm)
Thanks for sharing this info. I was about to try the same thing just to see what would happen, but seeing what you have outlined. Looks like I am heading back to DIFs.
#3
What are the specs of your test machine already?
10/13/2008 (10:32 pm)
Nice blog and nice work Steve.What are the specs of your test machine already?
#4
2.4 Dual Core
2 Gigs RAM
256mb 7900GS
Vista 32 (grrrrr..... and it's playing up again as I speak)
Display Resolution: 1280x768 (it goes up to 1680x1050 but text is too small to see easily on the internet or whilst working, so I plum for a lower res)
I've had it working on a an old laptop just to see if it would.
1.3 DC
1 Gig RAM
NO GRAPHICS CARD
XP
and I got about 20fps, terrible texture rendering on terrain (all red lines and hippy colours, maaaaan....) and obviously no shader effects but it does play.
I'm figuring if the aim point for a finished game is 60fps - with 30fps being common (even on consoles which obviously only have one spec to aim for - which sounds like sloppy development to me), I'd want to aim at over 100fps on my system, thus giving a bit of leaway (sp?) for less powerful PCs.
I've also come up with a theoretical way of customizing performance with a simple check box on how good someone things their PC is - in other words a custom detail setting. Lower settings would dynamically reduce visibility and the number of extraneous objects (models used for background atmosphere) as well as the quantity of dynamic objects (like AI numbers).
In really bad psuedocode:
I've already aimed my model LODs at looking best in 1680x1050, with more noticeable pop-up-changes at lower resolutions. Everything is fairly low poly as it is.
In the trade off between level size, stuff quantity and eyecandy, I much prefer to opt for size and quantity of stuff over eyecandy. I've never quite understood the vapid fanboyism of pretty graphics which has often relegated core gameplay to a series of gimmicks (my detest of bullet time knows no boundaries) - even though it's what has driven the First Person Shooter genre since Castle Wolfenstein.
A great example would be Crysis, even without DX10 those trees and bushes looked great - shame they didn't spend as much effort on the rest of the game as a whole package. The story was cliched and hackneyed in the extreme, the dialogue swayed from diabolical to laughable - I found the characterization of black soldiers offensive (why did every black guy talk street jive like he was out of some 1970s blacksploitation movie?).
Vehicle sections were awful (I ditched the tank and did better on foot, the less said about the flying transport the better), triggers obviously didn't fire (unforgiveable), physics were far from spectacular (I tripped on a turtle on the sand and died instantly from the fall), the AI's spotting ability swayed between blind and psychic, and the ending was a travisty - hidden within a cliche - enveloped by stereotype, especially the final cut sequence of the pretty scientist (terrible cliche in itself) falling off the rescue helicopter only to be caught at the last moment. I wasn't dramatic ..... it was crap.
Also I found it to be rather needlessly sweary, as a lot of games seem to be these days when they want to be mature. I can imagine how these things develop, lots of people sitting about, wondering how to corner the 17-25 demographic, people who probably aren't gamers themselves, probably aren't even the developers but their publishing overlords (all of this is a cliche itself!). They know they need to make it darker, more mature, so one of them says; "let's use the F-word - a lot.". Yeah, 'cos it's big and it's clever....
Worst/best dialogue for Crysis: (you have to say it in 1970s blacksploitation street jive for the correct ambience.
"Since when do the North Koreans got themselves a mother(F-bomb) freeze ray!?"
"You didn't see him boss, he was all (F-bomb) up, mootilated!"
"You wait till I get my nano-suit and I'll go ninja on your ass!"
....
er..... *cough* ... sorry, I went off on one there. [/rant over]
Anyhow, I appear to have a subject for my next blog post!
10/14/2008 (8:19 am)
My Rig (bought before DX10 and the 800 series graphic cards existed):2.4 Dual Core
2 Gigs RAM
256mb 7900GS
Vista 32 (grrrrr..... and it's playing up again as I speak)
Display Resolution: 1280x768 (it goes up to 1680x1050 but text is too small to see easily on the internet or whilst working, so I plum for a lower res)
I've had it working on a an old laptop just to see if it would.
1.3 DC
1 Gig RAM
NO GRAPHICS CARD
XP
and I got about 20fps, terrible texture rendering on terrain (all red lines and hippy colours, maaaaan....) and obviously no shader effects but it does play.
I'm figuring if the aim point for a finished game is 60fps - with 30fps being common (even on consoles which obviously only have one spec to aim for - which sounds like sloppy development to me), I'd want to aim at over 100fps on my system, thus giving a bit of leaway (sp?) for less powerful PCs.
I've also come up with a theoretical way of customizing performance with a simple check box on how good someone things their PC is - in other words a custom detail setting. Lower settings would dynamically reduce visibility and the number of extraneous objects (models used for background atmosphere) as well as the quantity of dynamic objects (like AI numbers).
In really bad psuedocode:
//on load mission
if(%customdetail = 1)
{
%maxvis = 150;
%spawnAI = 4;
%fxreplicator = 100;
}
if(%customdetail = 2)
{
%maxvis = 300;
%spawnAI = 8;
%fxreplicator = 200;
}
if(%customdetail = 3)
{
%maxvis = 500;
%spawnAI = 12;
%fxreplicator = 300;
}
//you get the general ideaI've already aimed my model LODs at looking best in 1680x1050, with more noticeable pop-up-changes at lower resolutions. Everything is fairly low poly as it is.
In the trade off between level size, stuff quantity and eyecandy, I much prefer to opt for size and quantity of stuff over eyecandy. I've never quite understood the vapid fanboyism of pretty graphics which has often relegated core gameplay to a series of gimmicks (my detest of bullet time knows no boundaries) - even though it's what has driven the First Person Shooter genre since Castle Wolfenstein.
A great example would be Crysis, even without DX10 those trees and bushes looked great - shame they didn't spend as much effort on the rest of the game as a whole package. The story was cliched and hackneyed in the extreme, the dialogue swayed from diabolical to laughable - I found the characterization of black soldiers offensive (why did every black guy talk street jive like he was out of some 1970s blacksploitation movie?).
Vehicle sections were awful (I ditched the tank and did better on foot, the less said about the flying transport the better), triggers obviously didn't fire (unforgiveable), physics were far from spectacular (I tripped on a turtle on the sand and died instantly from the fall), the AI's spotting ability swayed between blind and psychic, and the ending was a travisty - hidden within a cliche - enveloped by stereotype, especially the final cut sequence of the pretty scientist (terrible cliche in itself) falling off the rescue helicopter only to be caught at the last moment. I wasn't dramatic ..... it was crap.
Also I found it to be rather needlessly sweary, as a lot of games seem to be these days when they want to be mature. I can imagine how these things develop, lots of people sitting about, wondering how to corner the 17-25 demographic, people who probably aren't gamers themselves, probably aren't even the developers but their publishing overlords (all of this is a cliche itself!). They know they need to make it darker, more mature, so one of them says; "let's use the F-word - a lot.". Yeah, 'cos it's big and it's clever....
Worst/best dialogue for Crysis: (you have to say it in 1970s blacksploitation street jive for the correct ambience.
"Since when do the North Koreans got themselves a mother(F-bomb) freeze ray!?"
"You didn't see him boss, he was all (F-bomb) up, mootilated!"
"You wait till I get my nano-suit and I'll go ninja on your ass!"
....
er..... *cough* ... sorry, I went off on one there. [/rant over]
Anyhow, I appear to have a subject for my next blog post!
#5
Anyone, always good and informative posts and from a fellow Yorkshireman to boot. I'd be interested in any further findings you have along the way working with street sections in a single large DIF, something I've been experimenting a bit with myself. (Working on a classic Mini street racer with circuits based on real sections of York city center as a Torque learning project).
10/14/2008 (12:20 pm)
Heh, that last comment was like some crazy 2 for 1 deal on blog entries, to the point that I scrolled down expecting to find the comments section under it when I finished reading...Anyone, always good and informative posts and from a fellow Yorkshireman to boot. I'd be interested in any further findings you have along the way working with street sections in a single large DIF, something I've been experimenting a bit with myself. (Working on a classic Mini street racer with circuits based on real sections of York city center as a Torque learning project).
#6
On a performance note: I just installed Nvidia's 178.13 drivers over 175.19 and noticed a bit of drop in fps, nothing too drastic, say 15-20 fps off of 190-200. Reinstalled 175.19 to check and that little missing bit comes back. Makes me think that when they produce a video driver for a huge range of products they are favouring the newest DX10 series 8 and 9 cards at the expense of older models.
Edit: I'll blame rant on being full of Lemsip and cough sweets :P
10/14/2008 (1:11 pm)
Actually I've found that curves are the downside to using BSP instead of mesh, or more texturing details on them are. It's not possible to align things like curbs or road markings as you would with a UVmap. Ways around would be decaling road markings (semi transparent DTS mesh placed over the road at an angle), and maybe putting an extra row of brushes in the DIF for a curb system, or just ignoring curbs all together like in my above test shots (though they are a nice urban detail).Quote:Working on a classic Mini street racer with circuits based on real sections of York city centerNot much room for overtaking inside the castle walls or down the shamblings! Even when the city is not flooded.
On a performance note: I just installed Nvidia's 178.13 drivers over 175.19 and noticed a bit of drop in fps, nothing too drastic, say 15-20 fps off of 190-200. Reinstalled 175.19 to check and that little missing bit comes back. Makes me think that when they produce a video driver for a huge range of products they are favouring the newest DX10 series 8 and 9 cards at the expense of older models.
Edit: I'll blame rant on being full of Lemsip and cough sweets :P
#7
As far as the test. Maybe I will keep going and see how the pop-off is with a larger system. The system specs you posted are probably close to the lower end of the target market I am shooting for (pun intended). I would want to see at least 512-1GB on the video card at a minimum. Curious if you think that may help with the pop-off issue, since I know about it, but not familiar with its causes or what can help it.
For Nvidea, I had to go back to 177.92. The latest BETA which include physics on the GPU (for supported cars) was causing some issues for me.
10/14/2008 (2:43 pm)
On your comments about Crysis and it's relevance to your original post, all I can say is a quote my favorite KFC commercial "Whoa.. Didn't see that coming!". Actually I have not played Crysis that much, so can't comment on that aspect of it.As far as the test. Maybe I will keep going and see how the pop-off is with a larger system. The system specs you posted are probably close to the lower end of the target market I am shooting for (pun intended). I would want to see at least 512-1GB on the video card at a minimum. Curious if you think that may help with the pop-off issue, since I know about it, but not familiar with its causes or what can help it.
For Nvidea, I had to go back to 177.92. The latest BETA which include physics on the GPU (for supported cars) was causing some issues for me.
#8
10/14/2008 (3:00 pm)
Cool stuff Steve. Keep up the good work. Your an inspiration to others of us working toward similiar goals.
#9
And as for Crysis, if I hadn't have bought it for research purposes (it's filed as an expense on my tax return) I would never have bothered finishing it.
@Scott. Cheers! Oh and I forgot to post this on your last blog:
MakeHuman it's an automated (and free under GNU General Public License (GPL v.3)) program that gives you a ridiculously high poly customized human model that you can import into Blender (OBJ file I think .... you might have to stick the head back on afterwards). Whilst the model itself is fairly unuseable in a game (40,000+ polys and then some!), it does give a good template to trace your own lowpoly model from.
:)
10/14/2008 (4:51 pm)
@ Randy. No I don't think pop-off is system spec orientated, it's simply about the visibleDistance setting (from Sky - Sky Object in the world editor) hitting the far edge of a large model's bounding box (far edge from the players standing/viewpoint. If you have a huge visibileDistance setting then it'll still happen, only very far away from the player - and thus less noticeable. It's just the problem with using large DTS models.And as for Crysis, if I hadn't have bought it for research purposes (it's filed as an expense on my tax return) I would never have bothered finishing it.
@Scott. Cheers! Oh and I forgot to post this on your last blog:
MakeHuman it's an automated (and free under GNU General Public License (GPL v.3)) program that gives you a ridiculously high poly customized human model that you can import into Blender (OBJ file I think .... you might have to stick the head back on afterwards). Whilst the model itself is fairly unuseable in a game (40,000+ polys and then some!), it does give a good template to trace your own lowpoly model from.
:)
#10
10/14/2008 (5:00 pm)
Thanks for the info Steve..
#11
I've actually had reasonable success with creating a winding street with curves, rounded junctions and curbs so far, but I'm still experimenting with various approaches to see what comes out best overall. Although I'm sure I'm making things difficult for myself by adding cambered road surface into the equation.
Also toying with the idea of texturing regular terrain as the road surface and dropping DIF curbs, pavements and buildings in either side. Drop some decals on for road markings and a few DTS drain covers, potholes, etc... it works in my head, just need to put it into practice.
10/15/2008 (6:29 pm)
Quote:Actually I've found that curves are the downside to using BSP instead of mesh, or more texturing details on them are. It's not possible to align things like curbs or road markings as you would with a UVmap. Ways around would be decaling road markings (semi transparent DTS mesh placed over the road at an angle), and maybe putting an extra row of brushes in the DIF for a curb system, or just ignoring curbs all together like in my above test shots (though they are a nice urban detail).
I've actually had reasonable success with creating a winding street with curves, rounded junctions and curbs so far, but I'm still experimenting with various approaches to see what comes out best overall. Although I'm sure I'm making things difficult for myself by adding cambered road surface into the equation.
Also toying with the idea of texturing regular terrain as the road surface and dropping DIF curbs, pavements and buildings in either side. Drop some decals on for road markings and a few DTS drain covers, potholes, etc... it works in my head, just need to put it into practice.
#12
As you said Ross: it works in my head, just need to put it into practice.
edit: scratch that idea :P
10/15/2008 (8:06 pm)
After viewing my huge, 8000+ surfaced DIF in wireframe, I think I've found the cause of one problem, especially with cambered road surfaces when going around corners. I reckon it's the BSP cutting straight along the brushes which warps some of their edges out of line. Now I'm wondering if denying the exporter smoothing of the BSP might be a way around this. Experiment, experiment, experiment....As you said Ross: it works in my head, just need to put it into practice.
edit: scratch that idea :P
Torque Owner Kevin James