Graphics and performance

Development of artwork, requests, suggestions, samples, or if you have artwork to offer. Primarily for the artists.
Message
Author
haravikk
Space Kraken
Posts: 104
Joined: Wed Mar 31, 2004 10:04 pm

Graphics and performance

#1 Post by haravikk »

I know that as space combat graphics and most modern computers go there is a non-issue related to performance. However, a few of my friends and myself included that play MOO games are still on older machines (I personally am on a 400Mhz g3 iMac running OS X.3) so performance, especially in the graphics department is a bit of an issue. Speed of AI is not important, I can wait for turns to be worked out but lag during real-time combat is nasty.

Primarily the problem is ship combat, in MOO3 that is a killer for me and the main reason is transparency. There is absolutely loads of it!
Beam weapons all seem to have transparency, explosions have transparency, the damage text has transparency, and it really does add up in big fleet battles or when a particularly large cloud of fighters gets to work.
So I think that in addition to keeping all 3d models low-poly it is important to consider the sprites used as well, and this will very likely be an issue for the format of the graphics themselves.

In optimising the graphics I see two main hurdles:

Texture dimensions
The obvious one, the size of the textures/sprites used will have an effect if there are lots of them, so a scaling system when zooming in and out, and also as an option somewhere will be necessary to keep the sizes down so they are displayed optimally.

Transparency
Another performance one and I think the biggest one for me is the levels of transparency used for everything. Ideally the images should be stored in three parts:
Colour layer - the actual picture itself
Mask layer - the black and white layer that defines where an image 'is' by allowing excess to be removed
Alpha layer - a greyscale image that defines the transparency of each pixel.

Standard stuff really. But the main thing is that where alpha channels are used should be optional, if I have detail set to high then use them everywhere, if set to medium then skip them on beams (as these are common), but leave shields and explosions. If set to low then skip the alpha channel for everything, sure it doesn't look quite as nice but it would run better.

For those of you with good computers this may seem a non-issue but those of you who are also poor students will surely agree with me when I say a game that can cut the eye-candy when it hurts the most is a properly polished game :)

miu
Graphics Lead Emeritus
Posts: 286
Joined: Mon Aug 25, 2003 2:33 am
Location: Finland/Helsinki

#2 Post by miu »

There certainly will be options for turning down detail levels for better performance, but in general, FreeOrion will be heavier than moo3. Proper 3d-accelerator card and processor >1GHz will be required to run it smoothly. Alone running starmap with full animations is quite resource hogger. We aim our graphics to be comparable with commercial releases, and for space battle, I would like to see graphics at least as good as in homeworld 2.
Difference between a man and a gentleman is that a man does what he wants, a gentleman does what he should. - Albert Camus

Tyreth
FreeOrion Lead Emeritus
Posts: 885
Joined: Thu Jun 26, 2003 6:23 am
Location: Australia

#3 Post by Tyreth »

Being an open source game, there is always the possibility of someone developing a second client that is far less intensive. If someone was so inclined, they could even create a text/console client!

However, the official client is targetting higher spec systems so that we can enjoy new, sparkly graphics in an open source game. I've long thought that this will be an issue for those with older machines, but we don't have the programming muscle yet to develop a second client.

noelte
Juggernaut
Posts: 872
Joined: Fri Dec 26, 2003 12:42 pm
Location: Germany, Berlin

#4 Post by noelte »

miu wrote: I would like to see graphics at least as good as in homeworld 2.
You are setting really high goals, arn't you? :wink:

I hope something of that quality can be done. :D

Ronald.

User avatar
pd
Graphics Lead Emeritus
Posts: 1924
Joined: Mon Mar 08, 2004 6:17 pm
Location: 52°16'N 10°31'E

#5 Post by pd »

sure it can :)

btw: the source of the homeworld (1) engine has been released to the public.

you can get it here after registration.
Last edited by pd on Tue Apr 06, 2004 8:40 am, edited 1 time in total.

noelte
Juggernaut
Posts: 872
Joined: Fri Dec 26, 2003 12:42 pm
Location: Germany, Berlin

#6 Post by noelte »

pd wrote:sure it can :)
I will take you on that! :P

haravikk
Space Kraken
Posts: 104
Joined: Wed Mar 31, 2004 10:04 pm

#7 Post by haravikk »

Tyreth wrote:However, the official client is targetting higher spec systems so that we can enjoy new, sparkly graphics in an open source game. I've long thought that this will be an issue for those with older machines, but we don't have the programming muscle yet to develop a second client.
I'm not saying the game shouldn't try to be competitive graphically, what I'm saying is that if graphics are done carefully from the start then you can cater for a larger audience.
Heavy animations like sparkly stars could be switched off at low quality, they're nice but nothing more. If a LOD sytem for the 3d models were added then that would another big improvement, I can deal with pointy planets if it means a faster running game.
Texture sizes are another big one, go up to massive sizes if you want for those that can handle it, but if they scale down to (dare I say it?) 16 x 16 then you can have a huge performance improvement right off. Sure the ships would be mainly flat colour but as long as they look like ships and move smoothly then it's a superb option. Since the ships are likely to be seen from a distance a lot of the time anyway then flat colour isn't a bad thing really.

Out of inerest, what rendering engine are you using for FO? I personally swing toward OpenGL as it's open source, supported on all platforms and in many ways better than Direct X 9 (though for space effects nothing really complex is needed).

drek
Designer Emeritus
Posts: 935
Joined: Thu Jun 26, 2003 8:07 am

#8 Post by drek »

A toggle to switch off the background stars and nebula would do wonders for framerates on older machines. I've tested it out on an older machine, and it works "fast enough" if I compile a version without these background images.

Most of the problem is abysmal fill rate of older graphics cards.

guiguibaah
Creative Contributor
Posts: 441
Joined: Tue Oct 07, 2003 1:00 am

Strategy Gamers in mind

#9 Post by guiguibaah »

One thing I should point out, is that the average strategy gamer doesn't have the highest bells and whistle computer, in fact they rank below average in terms of computer speed.

One of the reasons Moo3 was sluggish was that it did not take advantage of any graphical accelleration since the developers decided to use voxels instead of polygons.

- - -

Also, be weary of bloated code.
A perfect example is Civ3. Civ3 requires at least a pentium 2 400 mzh, (and it's very choppy). And it is just basic tilemapping and .png animation. Horrible, horrible, horrible. If there was an award for bloated code, Civ3 would win it.

Compare that to Warcraft 3, which also runs on a pentium 2 400 mzh and fairly smoothly (if you trim everything down).

Same with C&C Generals. I run in on my 500mzh Pent 3 after lowering all graphics to low, and going into the .ini to remove extra graphic items so it runs pretty fast.

- - -

It all comes down to programming efficiency. When you are forced to program for a specific system requirement in mind (like a playstation 2) you maximise graphical output and presentation by making your code faster and more efficient. The problem with computer (PC) games is that the programmer will often allows sloppy code to pass by because "in two years, they'll have pentium 6's which can run this faster".
There are three kinds of people in this world - those who can count, and those who can't.

Aquitaine
Lead Designer Emeritus
Posts: 761
Joined: Thu Jun 26, 2003 1:54 pm
Location: Austin, TX

#10 Post by Aquitaine »

I don't know that you can say with certainty that Civ 3 is bloated. Have you seen the code?

The internals of an engine like Civ have to do quite a lot. Warcraft is real-time, so of course it would seem as though it has more to do, but until you have actual data on what Civ 3's tasks are, I don't think you can just assume you know more about how it should've been done than the developers do.

We are targeting high-end machines because it is likely to be a year or two (absolute minimum) before we ever get close to release. So today's high-end machines will be tomorrow's average POS. :)

Aq
Surprise and Terror! I am greeted by the smooth and hostile face of our old enemy, the Hootmans! No... the Huge-glands, no, I remember, the Hunams!

Daveybaby
Small Juggernaut
Posts: 724
Joined: Mon Sep 01, 2003 11:07 am
Location: Hastings, UK

Re: Strategy Gamers in mind

#11 Post by Daveybaby »

guiguibaah wrote:One thing I should point out, is that the average strategy gamer doesn't have the highest bells and whistle computer, in fact they rank below average in terms of computer speed.

One of the reasons Moo3 was sluggish was that it did not take advantage of any graphical accelleration since the developers decided to use voxels instead of polygons.
And the reason that they used voxels was because they took your first point as a design priority.
The COW Project : You have a spy in your midst.

guiguibaah
Creative Contributor
Posts: 441
Joined: Tue Oct 07, 2003 1:00 am

Still bloated

#12 Post by guiguibaah »

- Oh gosh, Civ3 is so bloated it makes a fat beluga with a bad case of Gastroenteritis look like Callista Flockheart. Its as fast as a sloth stuck in a vat full of tar when screening the map while it is your turn - and when it comes to multiplayer, the controls become as unresponsive as a U.S. Congressman. You need at least a 1.5 gzh not to experience the 3 second delay in multiplayer just to move your unit up a tile. Partially one of the reasons why is because the game wasn't built as multiplayer from the ground up.

I'm basing this on the "perceived output to required system". IE:, does it need a pentium 4 to display a polygon, or a 486?

Hmm, well here's an example. While writing a small file splitter I had it compute every cycle the percentage at which it was nearing completion. It was pretty sluggish, and I could have said "oh, well it could just be released when faster computers come out". Then my friend looked at it and made the sugestion to have it compute the percentage at which it was nearing completion every 100 cycles instead. The result was a huge boost in speed.

Civ3 was very comparable to SMAC (except the units were .png's, not voxels, and SMAC had 3d terrain) when it came to graphics and AI calculation, yet CIV ran much slower.

I realize I'm probably making this issue about as clear as mud. :)

Anyhow
There are three kinds of people in this world - those who can count, and those who can't.

drek
Designer Emeritus
Posts: 935
Joined: Thu Jun 26, 2003 8:07 am

#13 Post by drek »

No doubt there's some bad code in civ3.

But I think most of the problem is in the way video cards work: they are geared towards FPShooters. A large overhead map like Civ3, SimCity 4, and FO is bound to be slow unless hacky tricks are used. Because of differences between video cards, a different bag of tricks has to be used for each type of card.

It's a pain, and it takes up a lot of manpower. WC3, for example, is only lightening fast because the boys at blizzard spent an great deal of time and money making it so.

Modern cards are powerful enough to handle larger textures without using these tricks, so it's just way eaiser for GiGi/FO to target these cards....If anyone wants to make a client geared towards older machines, then hooray. Have at it.

Aquitaine
Lead Designer Emeritus
Posts: 761
Joined: Thu Jun 26, 2003 1:54 pm
Location: Austin, TX

#14 Post by Aquitaine »

I think I know what you're saying -- and I absolutely agree; specs targeting is not an excuse to write sloppy code (and I don't think I'm about to accuse any of our programmers of that :) ) -- we're talking strictly for graphics, polygon counts, etc. So we target today's high-end graphics hardware knowing that, by the time we release, it will be tomorrow's midrange hardware.
Surprise and Terror! I am greeted by the smooth and hostile face of our old enemy, the Hootmans! No... the Huge-glands, no, I remember, the Hunams!

iamrobk
Space Dragon
Posts: 289
Joined: Sun Sep 07, 2003 12:27 pm

#15 Post by iamrobk »

About transparency, in Simcity 4, all they had was an alpha layer and the texture itself. It worked fune for that........

Post Reply