Iron Tower Studio ForumsRPGThe Age of Decadence (Moderator: Vahhabyte)Improving the Performance of AoD - Part One
Pages: [1] 2 3 ... 6   Go Down
Print
Author Topic: Improving the Performance of AoD - Part One  (Read 12679 times)
Oscar
Developer

Posts: 5545


AoD Lead Artist


View Profile
« on: March 05, 2011, 01:21:41 AM »

So, time for a little update guys. In the past months I've been working on improving the performance of AoD, and here I'm updating you on some of the results I've obtained.

These tests were done with a PC with the following specs:

- Athlon 64 X2 6000+
- 3,62 GB RAM
- GeForce GTS 450
- Windows XP SP3 32 bit

The Beginning

So, let's start from a fixed point image from before we started our optimizations and see the metrics. This screenshot was taken with almost default settings.


The Metrics:

  • Polycount: 1.972.426
  • Drawcalls: 784
  • FPS: 34.9

The First Tweaks

So we started doing some tweaks. Since we are using a practically flat terrain, we made the engine use a lower poly version of it, and we gained a small performance improvement.


The Metrics:

  • Polycount: 1.833.162
  • Drawcalls: 768
  • FPS: 36.1

But we still need to do more, so we decide to tackle the shadows. In that screenshot, shadows are set to the highest default settings. They look great, and they don't disappear even with the camera up high, but the performance is atrocious. The problem is that they are made for first person games, so they are designed to be seen at a distance. Here is a close shot of the shadows:


As you can see, the polycount is really high. That's because the game is still rendering all those far shadows our game doesn't need. So we made a small change. Nick coded the engine to dynamically change the distance of the shadows depending on the camera distance to the ground, which allowed us to have great looking shadows up close and far, and full shadow coverage when the camera is up high. Here is a shot of the shadows up close (check that it looks exactly the same as before, but with a 100% FPS increase!).


And now we are showing the scene with the original camera, to check the performance we gained.


The Metrics:

  • Polycount: 1.535.075
  • Drawcalls: 583
  • FPS: 47.5

The Big Jump

That's a great increase, but we wanted more, much more. We looked at the terrain, and it was casting shadows, which were completely unnecessary since the terrain was completely flat in this particular level. We made a toggle on the terrain so we can disable them at will (some levels will make use of them).


The Metrics:

  • Polycount: 1.040.879
  • Drawcalls: 526
  • FPS: 48.7

While the polycount is definitely lower, the performance increase was small. That's due to the great work the GG guys did on the terrain. But anyway, every little bit helps. But that was not enough, not enough at all. So made use of a new setting the engine got, that allowed us to tell the shadows to use a lower poly version of the object for determining the shadows. I started creating these "shadow meshes", which are a basic outline of the model, just creating everything I wanted to cast shadows, nothing more. The PSSM shadows always use that model for casting shadows, and nothing else. Plus I removed some plants and small objects that were casting shadows... And well, I'll let the screen and metrics speak for themselves:


The Metrics:

  • Polycount: 605.387
  • Drawcalls: 441
  • FPS: 69.2

The performance difference is amazing. A 100% increase in performance compared to the first screen. The screen looks a little different since I did some tweaks to the groundcover (the grass you see in the level),  and added some different textures and maps to the models, but it's practically the same.

Unexpected Side-Effects

This new setting the we got with the engine helped us with something we wanted to do a long time ago: The ability to hide roofs when entering a building and don't have the sun pouring in. Since the PSSM are using the "shadow mesh" for casting shadows, hiding the visible mesh has no effect on the sun shadow. This was a godsend for us. Check out the screen:


Looks nice, eh? =)

But that's not all... We later did a small change, that had an artistic reason, but that gave us a cool performance increase. Basically, we didn't like the look of the game perspective, so we changed the FOV from 70 to 45. This gave us a nice "Isometric" look like the games of yore, and a cool fps increase! Here are the shots and the metrics, as usual:


The Metrics:

  • Polycount: 605.849
  • Drawcalls: 380
  • FPS: 78.6

And this performance is at the highest camera distance. Using it at a medium distance nets more than 100 FPS:


Extra Performance Options

Until now, all the performance increases were done keeping the visual quality of the game. Disabling shadows nets a big increase (from 78 to 135 FPS in our game), and reducing or removing the groundcover also nets some gains. On top of that, there are the different options offered by the engine like lower texture resolution, lower lighting system (for low end machines), among other things.

Also, there are ways to increase the visual quality of the visuals. These shots were taken with the default options, using a 1024x768 resolution, no anisotropic filtering, so there's room for more visual candy.

What's Next...

Now, we are working on improving performance with a lot of characters on screen which is quite crappy at the moment. My next update would cover that plus some nice additions like texture tinting. Until next time! =)
« Last Edit: March 05, 2011, 02:25:17 AM by Oscar » Logged

"Hasta la victoria, siempre."

"Who has time? But then if we do not ever take time, how can we ever have it?"
Vahhabyte
Moderator

Posts: 5178


S:5 D:7 C:4 P:10 I:10 Ch:4 Th 5 Bl 8 CS 7


View Profile
« Reply #1 on: March 05, 2011, 02:04:41 AM »

Bravo. Everything looks excellent, and the optimization seems very professionally done.

Quote
Basically, we didn't like the look of the game perspective, so we changed the FOV from 70 to 45. This gave us a nice "Isometric" look like the games of yore, and a cool fps increase! Here are the shots and the metrics, as usual:
That looks awesome!
Logged

Good people disobey bad laws.
Gregorus Prime
*
Posts: 2798


Cheese and Whine Distributed Freely


View Profile
« Reply #2 on: March 05, 2011, 02:24:26 AM »

Looks fantastic. Good to see you're getting actual work done, and sharing that with us. It's more than some teams.
Logged
Konjad
Journeyman

Posts: 165



View Profile
« Reply #3 on: March 05, 2011, 04:00:30 AM »

Looks better than I ever imagined it would (well, I actually expected final version to look like the demo).

It doesn't look inferior to Eschalon series anymore, and along with it and ToEE it's the prettiest isometric cRPG... well, would be - if it was released Wink
Logged
JuJu
Craftsman

Posts: 404



View Profile
« Reply #4 on: March 05, 2011, 06:48:46 AM »

Awesome job! As my PC is getting older I appreciate game developers making effort to improve performance more and more, besides It would be even better to have AoD look great on my laptop too!

A small nitpick - It looks like in the final version there is a bit of grass clipping through the bottom crate near the statue.
Logged
Hiver
Expert

Posts: 1202


View Profile
« Reply #5 on: March 05, 2011, 06:49:34 AM »

Where can i send my money to?

Great update, thanks. The game looks beautiful.
Logged

My first axiom:
Never, ever think about or make any conclusions about life, universe and everything else while youre depressed, suffering a trauma, a tragedy and or being drunk.

What the hell do you expect you will come up with in such a state?
Dragatus
*
Posts: 1312



View Profile
« Reply #6 on: March 05, 2011, 06:52:21 AM »

 Approve
Logged

"A little while ago, a good friend's wife asked me what playing Dungeons & Dragons involved. Long story short, it turns out that it's basically improv without an audience or time pressure, and a lot of rules. Every time anyone wants to attempt something, it's basically subject to a referee. Who is incidentally trying to kill you. In a fair and impartial manner." - Priapist

A Basic Guide to Combat in age of Decadence
Vahhabyte
Moderator

Posts: 5178


S:5 D:7 C:4 P:10 I:10 Ch:4 Th 5 Bl 8 CS 7


View Profile
« Reply #7 on: March 05, 2011, 07:55:58 AM »

A small nitpick - It looks like in the final version there is a bit of grass clipping through the bottom crate near the statue.
True, I also noticed a lump of grass sticking out from a marble bench in earlier screenshots, but who cares? The level of detail, the colors, the angle, everything is perfect imho.
Logged

Good people disobey bad laws.
MaximB
Artisan

Posts: 977



View Profile
« Reply #8 on: March 05, 2011, 09:28:42 AM »

For some reason I cannot see the pictures, it says "domain unregistered".
 
Logged
Oscar
Developer

Posts: 5545


AoD Lead Artist


View Profile
« Reply #9 on: March 05, 2011, 09:38:34 AM »

A small nitpick - It looks like in the final version there is a bit of grass clipping through the bottom crate near the statue.

Most of the grass is randomly placed using a groundcover object. I'll do pass later to remove "inappropriate" placing.

For some reason I cannot see the pictures, it says "domain unregistered".

I'm using imageshack, try creating an account there.
Logged

"Hasta la victoria, siempre."

"Who has time? But then if we do not ever take time, how can we ever have it?"
Nick
Administrator

Posts: 1590


En Taro Adun!


View Profile WWW
« Reply #10 on: March 05, 2011, 09:44:04 AM »

For some reason I cannot see the pictures, it says "domain unregistered".


Weird. Try it this way, maybe:
http://translate.google.com/translate?hl=uk&sl=uk&tl=en&u=http%3A%2F%2Fwww.irontowerstudio.com%2Fforum%2Findex.php%2Ftopic%2C1966.msg63810.html%23msg63810
Logged

"Oh, 'twould be marvelous if the world and its moral questions were like some game board, with plain black players and white, and fixed rules, and nary a shade of grey."
The Black Company. Shadows Linger.

"But is the best good enough?"
(c) Oscar
abracab
*
Posts: 13



View Profile
« Reply #11 on: March 05, 2011, 11:52:11 AM »

Cool! Smile
Logged
Joey
Developer

Posts: 101

Zombie textures!


View Profile
« Reply #12 on: March 05, 2011, 02:43:28 PM »

I'm surprised that at such high total polycounts, you're still using 6-sided columns; doubling that only adds a few hundred polygons, not a terrible lot when you're talking in hundreds of thousands.

I have to admit, though, I'm impressed by how clever it is to use shadow meshes and how well they work. That screenshot showing both in and outside looks great.
Logged
galsiah
Expert

Posts: 1401



View Profile
« Reply #13 on: March 05, 2011, 02:57:12 PM »

Perhaps the Teronic masons employ hex-grid based quarrying to save on stone wastage. I don't see it as a real issue: hexagonal wheels would be a clear and unfortunate concession to low poly count; hexagonal columns can simply be an architectural style.
Logged
MaximB
Artisan

Posts: 977



View Profile
« Reply #14 on: March 05, 2011, 03:16:11 PM »



Thanks, that actually works fine.
I'll still need to copy all those images and view them one by one to see the difference, although I like drawing I'm not good at seeing small differences from picture to picture (nit on the other hand I'm good at finding "10 differences between 2 almost identical pictures" that sometimes present at some magazines - go figure...).
Logged
Pages: [1] 2 3 ... 6   Go Up
Print
Jump to: