Author Topic: quality settings  (Read 3006 times)

treba

  • Guest
quality settings
« on: 30 September 2012, 15:23:46 »
hey!

in order to allow good graphics on high end- and good performance on low end-hardware, it would be nice to have quality setting, eg for textures and models.
at the same time, we don't want to change the current structure (to have backward compatability)

i think this could be archieved by additional lookups during the map load. say if we have set the model settings set to high and in the unit.xml there's a animation specified for that setting, it will be loaded. else, it will use the default.

here's an example:
instead of
Code: [Select]
<animation path="models/archer_walking.g3d"/>we have
Code: [Select]
<animation path="models/archer_walking.g3d">
    <animation setting="low" path="models/archer_walking-low.g3d"/>
    <animation setting="medium" path="models/archer_walking.g3d"/>
    <animation setting="high" path="models/archer_walking-high.g3d"/>
</animation>

for me, that looks like a simple way.

what do you think about it?

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: quality settings
« Reply #1 on: 30 September 2012, 20:43:50 »
Sounds like a good idea!

 Though using this method might effectively double or tripple hard disk space requirements though, as there will be duplicates for all models and textures in the techtree
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

ProfEclipse

  • Summoner
  • **
  • Posts: 49
    • View Profile
Re: quality settings
« Reply #2 on: 30 September 2012, 22:18:10 »
I agree with Ishmaru, your idea can be used for create more options about quality and performance, but it can require more double or tripple disk  space, and remake all various-quality models and textures need too much time.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: quality settings
« Reply #3 on: 1 October 2012, 06:52:09 »
I would prefer the engine to do the mesh simplification, and for distant models to avoid interpolation and so on.  All best done in the engine, rather than in the artwork.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: quality settings
« Reply #4 on: 1 October 2012, 08:21:39 »
What about a general master "graphics setting" (low, medium, high, custom, etc) which would control multiple graphic related settings. For example, the "medium" setting might use bilinear filtering with medium texture sizes and a moderate particle cap, while the "low" setting might use a nearest neighbor interpolation filtering with a more rigid particle cap and capped texture sizes. Why? Because most players don't understand the impact of different settings. A casual player on a low end PC probably understands that they can get a performance boost by "setting the graphics to low", but telling them to "turn off unit particle effects and tileset particles, set filtering to whatever, and so on" is a big step up (we'll assume most people don't even see the forums).

As for options that could balance performance and quality, here's a few that I'd like to see:

Texture filtering
As it stands, we have bilinear and trilinear texture filtering. For those who don't know, texture filtering is a way to smooth out textures, with the best example being if you tilt an object at a 30 degree angle, the texture is going to appear "compressed" into that shape. At any rate, there's a rougher, uglier, but considerably faster method than bilinear: nearest neighbor interpolation. The quality would suffer a bit, but it's considerably faster. And on the other side of the spectrum, we have anisotropic filtering, which drastically improves quality. Take this example here (left is trilinear, right is anisotropic; it's really a massive difference).

Texture scaling
Before the start of the game (during the loading stage), textures could be scaled down to a "maximum texture size". It might not make much of a difference with most current mods, which rarely go above 512x512, but future mods that could use larger textures may benefit, and there may still be some benefit in reducing the textures of even the 512x512 textures.

Maximum particles
Particles are hard on the computer. There's no doubt about that. I've seen MG go to a serious slowdown on a weak computer during a volley of particles. A particle cap could reduce the particles (preferably evenly from all sources) in the camera's viewpoint when the cap is exceeded.

Vertice cap
I'm not sure how well such a thing could be done, if at all, but if possible, reducing the number of vertices when there's too many on the screen could be the most influential way to improve performance real time. Perhaps walkable objects (bushes, etc) could be removed, then (as Will mentioned), mesh simplification could be applied.

Antialiasing
If you're not already aware, AA is the "blurring" of jagged lines, to make them appear smoother. The change in quality is fantastic, but it's also pretty hard on resources. MG appears to have AA on text, but not on models (where it would make a huge difference). Take this image here as an example of the differences AA can make.

On a few other points to ponder, Tucho made this post a while back about how MG could improve its ground tiling system. I'm not sure if it's performance only or if it would be just an aesthetic. Also, just how does our level of detail work in MG? Do textures get smaller when we zoom out? Are closer objects more detailed than further objects? It doesn't apply as much to the top down camera of MG as it might to a first or third person game, but LoD could still be useful when the camera is at an angle. Finally, how much of a difference does the number of frames in animations make in regards to performance? Does a unit with a twenty frame animation use considerably more resources than a unit with a ten frame animation? If so, could an option to drop, say, odd frames in animations longer than a certain number of frames, be beneficial?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: quality settings
« Reply #5 on: 1 October 2012, 08:27:46 »
+1 what Omega said

for textures, another good tweak is anisotropic filtering.

but absolutely have it on a nice single slider, perhaps with an 'advanced' settings page for others.

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: quality settings
« Reply #6 on: 1 October 2012, 11:17:50 »
Finally, how much of a difference does the number of frames in animations make in regards to performance? Does a unit with a twenty frame animation use considerably more resources than a unit with a ten frame animation? If so, could an option to drop, say, odd frames in animations longer than a certain number of frames, be beneficial?

IIRC Silnarm said that the only difference between a 2 frame and 200 frame animation is the amount of disk space needed to store it. The cpu/gpu load is the same.
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

ProfEclipse

  • Summoner
  • **
  • Posts: 49
    • View Profile
Re: quality settings
« Reply #7 on: 1 October 2012, 13:09:44 »
...
« Last Edit: 1 October 2012, 15:05:06 by ProfEclipse »

treba

  • Guest
Re: quality settings
« Reply #8 on: 1 October 2012, 14:50:33 »
@ProfEclipse: please make another feature request for that, as it has nothing to do with this request.

@omega: full consent about your points.

BUT: i think many of these features take a lot of work to integrate for the devs. what i requested is little work for the devs, kind of a hack that could serve us well in the meantime.
ishmaru already has different tilesets which kind of follow the same approach. only that all players are forced to have the same setting.

and, just by the way: why are so many here concerned about the disk size? my mg dir is about 600mb...that's about the size of aoe2 (with some extra maps). sc2 has more than 11gb!

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: quality settings
« Reply #9 on: 1 October 2012, 17:02:18 »
and, just by the way: why are so many here concerned about the disk size? my mg dir is about 600mb...that's about the size of aoe2 (with some extra maps). sc2 has more than 11gb!

The main issue about disk space is download speed, especially for those who do not have high speed/reliable internet.

BUT: i think many of these features take a lot of work to integrate for the devs. what i requested is little work for the devs, kind of a hack that could serve us well in the meantime.
ishmaru already has different tilesets which kind of follow the same approach. only that all players are forced to have the same setting.

I honestly forgot I did that, a more official setting would be better than a whole separate tileset. This would be (hopefully) be much more simple to implement than LoD's and preset rendering options.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

treba

  • Guest
Re: quality settings
« Reply #10 on: 3 October 2012, 15:41:58 »
@softcoder and titi: would you accept a patch that does what's descriped above?
if so i'd try to implent it.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: quality settings
« Reply #11 on: 3 October 2012, 20:45:35 »
It depends on what exactly you refer to above. I'm not liking the idea of having duplicate artwork with different values for quality for example.

treba

  • Guest
Re: quality settings
« Reply #12 on: 5 October 2012, 18:37:02 »
well, that was what i was refering to. but could you say a little bit more about it, like why you don't see it as a good solution?
and maybe about whether there're chances to see something from omegas ideas?

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: quality settings
« Reply #13 on: 10 October 2012, 03:11:03 »
There is a lot more power on the engine side, 99% of optimization should be done on the engine.

-Automatic drawing occlusion
-Changeable draw distances
-Realtime, distance based mesh simplification(and changeable ratio)
-All CPU threads should be used
-If multi-core processor, AI should be run on separate cores from the graphical calculations made on the cpu
-Particle amount multiplier, no particle caps.
-Changeable Interpolation LOD Ratio
-Changeable Terrain LOD Ratio
-Automatic Fog Occlusion
-Geometry Instancing(I think that's the proper term for it, this would drastically increase mesh performance)

There are much more possible optimizations but these are among the most effective.

I've already got a 6 core and a hefty radeon card, so I'm more in favor of BETTER graphics!  :P ;D

Cheers guys!
Egypt Remastered!

Proof: Owner of glest@mail.com

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: quality settings
« Reply #14 on: 10 October 2012, 04:49:45 »
Pffft, Ai + all players calcs are already done on there own thread (each faction instance). This was tricky and potentially dangerous to do but it works well.

Lots of things to look at but we need a stable release as its been almost a year since last release.

Thanks

Update: I do agree with most suggestions in this thread, it will take a lot of time to code and test these, thats the only reason why we won't do it for the current upcoming release. I'm looking into using shaders for a lot more things in MG (like interpolation calculations etc if possible). We have many options. but it will not be fast to code.
« Last Edit: 10 October 2012, 05:57:33 by softcoder »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: quality settings
« Reply #15 on: 10 October 2012, 05:02:30 »
-Particle amount multiplier, no particle caps.
While simplier, I'm not sure if that would work as well. When there's only a small number of particles, they'd get cut down, even if the number is so small that they don't have much of an impact on performance. Particle caps would be most useful for large scale battles, where there's just a massive number of particles flying around. Ideally, the "cap" would be evenly spread around, in the form of a multiplier on all particles.

But yeah, we do need to get a release. None of these feature suggests are necessarily high priority.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: quality settings
« Reply #16 on: 10 October 2012, 09:02:34 »
I too like treba suggestion (the OP). And while i too agree that download speed matters in this regard, and i think that this suggestion is very usefull. and....well kinda fun..... Perhaps make it so that modders can define their own stages of graphics.

i would fx do it like this.(altho i might not have such extreme ranges in quality...yet).

Extreme
Ultra
high
Medium
Low
Boxes (i'm serious).

WiP Game developer.
I do danish translations.
"i break stuff"

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: quality settings
« Reply #17 on: 10 October 2012, 09:37:27 »
The megapack - those models I've looked at - seem to be very reasonable complexity.

Mr War's models tend to be on the simple side, although even his models get dramatically reduced by G3dHack and my own optimisers.

Lots of other random models I've sampled though are way over-complex.

And then we add first-person-camera and suddenly the definition of 'acceptable' might change.

Generally, the way forward I think is adopting a bone format, and auto-simplification-in-code, and then artists can produce high-res models that are acceptable sizes and everyone is happy.

Lots of code to be written, though.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: quality settings
« Reply #18 on: 10 October 2012, 18:16:51 »
Generally, the way forward I think is adopting a bone format, and auto-simplification-in-code, and then artists can produce high-res models that are acceptable sizes and everyone is happy.

Lots of code to be written, though.
Yeah, a bone-based format would be helpful. I haven't heard any news about that recently; how goes it, Softcoder?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: quality settings
« Reply #19 on: 10 October 2012, 18:31:34 »
I have started some work on this but the IQM support will have to wait until after this release as it will take a lot of specification and work.