Author Topic: [TESTERS WANTED] Speeding up rendering  (Read 6865 times)

Psychedelic_hands

  • Guest
Re: [TESTERS WANTED] Speeding up rendering
« Reply #50 on: 27 July 2011, 11:09:24 »
I don't really have anything to add to this yet, but I'm extremely thankful Will that you're fully focused on this, aswell as the other devs.
I've always hated that I can run other (more intensive) games on max settings but not Glest  :-[.
I'll try to help test later when I'm not busy.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: [TESTERS WANTED] Speeding up rendering
« Reply #51 on: 31 July 2011, 09:34:58 »
Softcoder, i think we know the creating layers every time the camera moves is the best way now.  And we have very strong indications of the expected performance.

if you can tidy up and remove all dead code in renderer.cpp, it would help us navigate implementing it.

I am tempted to rewrite the iterator from first principles rather than trying to understand it.

If you can work out how to know if a tile's fow state, and expose it as a list of 0, 1 or 2 textures, we can implement the layer making code in those terms, and later we can support 0ad maps without changing the rendering strategy too much ;)

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: [TESTERS WANTED] Speeding up rendering
« Reply #52 on: 3 August 2011, 09:52:03 »

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: [TESTERS WANTED] Speeding up rendering
« Reply #53 on: 3 August 2011, 10:23:54 »
For GAE I just store the X extrema (min & max x value) for each Y ('row') for an arbitrary convex polygon, this can then be used to quickly iterate and for an isVisible() function (very handy.)

http://sourceforge.net/apps/trac/glestae/wiki/SceneCuller
Glest Advanced Engine - Code Monkey

Timeline | Downloads

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: [TESTERS WANTED] Speeding up rendering
« Reply #54 on: 4 August 2011, 00:57:40 »
Oh the debris in renderer.cpp makes me blind!

I don't really dare submit my patch; it works well enough most of the time, and gives me a very nice speed boost on my Integrated Intel card.  But it has corner cases, literally:

(click to show/hide)

I think I've narrowed the problem down the centres of buildings being tested for visibility - which was fine when we were drawing a very wide skirt around the camera, but less fine when we clip it tightly - the centre may be not visible even though the building/unit is.

Also it doesn't like very very close up shots in free camera mode; but I'm more inclined to want to disable such near shots; I think RTSes should be played a bit further away anyway.



Just realised reason c patch has missing edges sometimes when ny patron didn't is that it is important not to truncate to ints too early.   Visiblequad should be doubles.

Edit by Omega: merged double post; fixed broken spoiler code
« Last Edit: 4 August 2011, 18:07:45 by Omega »

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: [TESTERS WANTED] Speeding up rendering
« Reply #55 on: 5 August 2011, 16:06:24 »
Ok I don't think I've got the lust to fix this.

Making it so only the visible tiles are rendered is fairly straightforward if don't use the existing compute visible quad functionality in the camera, and instead unproject the four corners of the viewport.  With proper doubles throughout it draws correctly, and is roughly how I was doing it in glestng.

However, the engine relies on over-drawing in order to ensure it draws shadows for objects offscreen, and to compute the visibility of objects by their centre and such.

And I don't have lust to fix all that.  Sorry.

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: [TESTERS WANTED] Speeding up rendering
« Reply #56 on: 10 August 2011, 15:57:34 »
Hey, don't say say sorry, thanks for taking a go at it.
WiP Game developer.
I do danish translations.
"i break stuff"

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: [TESTERS WANTED] Speeding up rendering
« Reply #57 on: 10 August 2011, 22:40:42 »
Awww... I was looking forward to these fixes. Oh well things happen, thanks for trying!
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