Last week we showed you screenshots from a 3rd party terrain engine we wanted to use for Planet Nomads. It all sounded great at first, until we got to test it and found out the performance was, to put it mildly... substandard.
For empty land we were able to squeeze out 100 FPS, but put in some trees, grass and other details and it dropped significantly (under 30 FPS). Even worse, if you run too fast you'd "outrun" the terrain - it didn't render the graphics fast enough, leaving you in a milky haze of emptiness.
We could do some tweaking, and improve that, but only to some extent. The game can only run as fast as its "wheels" let it, and we have no intention of putting Planet Nomads on some crappy wooden cart wheels.
It will take us longer to create an engine of our own, but it will be worth it. We want to make sure nothing comes back to bite us in the arse later when we add more objects to our worlds and when you build and ride your ultra-fast flyers and vehicles.
What we've done so far is DYNAMIC LODing
As you may know, game graphics consist of thousands of triangles called polygons - more polygons mean better looking graphics, but also more demand on the hardware; if you go over the top with polygons it will ultimately affect performance and bring the FPS down. So how to get most of your polygons?
Naturally, objects close to the player should have as many polygons as possible to look life-like, whereas distant objects can go with less and still look OK. (Imagine a fiery red racing car getting away from you - eventually it will become but a blur.) In games this is simulated by LoD - level of detail. More polygons close by, less polygons in the distance. It only took Martin & Tomáš 3 weeks to get it running nice and smoothly in real time. (A feature called dynamic LODing.) If this makes little sense, have a look at the first picture below. (My math teacher always told me, when in doubt, draw it out... It worked great until I left primary school.)
This three weeks were not wasted; we now have the same quality terrain rendered almost twice as fast, which means no more running into empty space that is still waiting to be rendered.
NEXT STEPS
As you can see in the second picture the terrain is very simple. (Although if you check this , you'll see we've made quite a progress already.) We still need to work on advanced terrain and object generators, which will allow for more complex and visually pleasing terrains (similar to those you saw in the last week's post and better). Who knows, maybe in another 3 weeks, we'll be able to show them already. Fingers crossed.
From left to right:
1. Dynamic LODing: terrain and objects further from the camera (player) have less polygons.
2. Our first steps toward our own terrain engine!
3. Since the first two pictures are not really sexy, here's a third to balance things out into perfect harmony.
NB: PLEASE do NOT COMPARE the second picture to what you saw previously. This is just a TECH DEMO! In the end we'll achieve the same terrain quality that we showed you before (very likely, it will be even better). Thanks :)
Leave a Reply