Author Topic: Rendering G3D using OpenGL  (Read 13170 times)

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #25 on: 14 January 2011, 23:44:29 »
Yes, VBOs can make a massive performance difference, after moving the map data into a VBO, I was similarly amazed at the boost, no less than 3 times faster at the starting zoom level (this too was on an integrated card in a laptop, the perfect test-bed for graphics optimisation).

I started some work a couple of days ago to get G3Ds into VBOs, though I seem to keep getting side tracked by other things... but I should hopefully have your GPU interpolation working in the engine before too long :)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #26 on: 14 January 2011, 23:47:56 »
(so are maps already VBO in GAE now?)

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #27 on: 14 January 2011, 23:52:05 »
Still experimental, but yes.  Start the program with '-test tr2'.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #28 on: 15 January 2011, 00:35:57 »
Still experimental, but yes.  Start the program with '-test tr2'.
Would that have anything to do with the "Render Surface" stats?  That's the main difference I'm seeing.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #29 on: 15 January 2011, 01:37:03 »
Still experimental, but yes.  Start the program with '-test tr2'.
Would that have anything to do with the "Render Surface" stats?  That's the main difference I'm seeing.

Yeah, the 'Render Surface' section is the terrain rendering, you should see a much lower number there (at least, I hope you do!).
Glest Advanced Engine - Code Monkey

Timeline | Downloads

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #30 on: 15 January 2011, 01:45:22 »
You bet.  I'm getting 5ms with, 168ms without. :thumbup:

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #31 on: 15 January 2011, 02:35:55 »
You bet.  I'm getting 5ms with, 168ms without. :thumbup:
:o Wow.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #32 on: 27 January 2011, 01:06:09 »
What is the policy for textures whose dimensions are not powers of 2?

I think that in OpenGL < 2.0 - and that includes the software renderer that comes with MS Windows - it is required that they are powers of 2, right?

(A few are slipping into recent mods)

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #33 on: 27 January 2011, 01:39:03 »
From http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml

Non-power-of-two textures are supported if the GL version is 2.0 or greater, or if the implementation exports the GL_ARB_texture_non_power_of_two extension.

I think in 99% of the cases it would be ok since it would be extremely rare to find such an old driver.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #34 on: 27 January 2011, 06:45:06 »
yeah, but if you are saying 2.0+ then you can go wild with vbos and shaders and things?

as I pointed out, the MS Windows SW driver is strictly 1.1

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Rendering G3D using OpenGL
« Reply #35 on: 27 January 2011, 14:01:38 »
yeah, but if you are saying 2.0+ then you can go wild with vbos and shaders and things?

as I pointed out, the MS Windows SW driver is strictly 1.1
But nobody could possibly be using a default windows driver, could they? Wouldn't graphics drivers usually have 2.0+?
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #36 on: 27 January 2011, 15:03:57 »
I say that the Glest forks should stop pandering to people with crappy integrated graphics cards. Anyone who has a dedicated graphics card should meet the standard (unless it is really old).
The devs should push on with improving Glest's graphical capabilities instead of maintaining ridiculous support for machines that were never intended to play games in the first place!

I understand the argument that Glest should be open to as wide an audience as possible, but this should not be at the detriment of keeping up-to-date in terms of graphics. All commercial games come with some sort of hardware requirement these days, I don't see why Glest shouldn't have some sort of minimum standard of hardware.

I'm sorry if this sounds like a trollish rant but its an issue I feel strongly about, please push Glest forward a little for those of us who can handle it  :swordman:
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #37 on: 27 January 2011, 16:07:05 »
I say that the Glest forks should stop pandering to people with crappy integrated graphics cards. Anyone who has a dedicated graphics card should meet the standard (unless it is really old).
The devs should push on with improving Glest's graphical capabilities instead of maintaining ridiculous support for machines that were never intended to play games in the first place!
Yeah, I've got intergrated graphics and I can play Warcraft 3 without any trouble, and that game is way ahead of us in terms of graphics even though it's a few years old.  I'm sure we can afford to push the envelope at least that far.

Zoythrus

  • Guest
Re: Rendering G3D using OpenGL
« Reply #38 on: 27 January 2011, 16:45:36 »
so, when will this new OpenGL upgrade be out?

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #39 on: 27 January 2011, 16:46:00 »
All well to say you want fancier effects but warcraft has a fairly comparable engine and the difference is artwork.  All these specular and ambient and bump maps are supported by the engines but almost complely unused, and the floating effect is again a texturing thing as much as anything?

To the texture sizes, what possible advantage does using a non-powe-of-2 texture give you?  Is there some critical artistic reason some of the newest models have that, or is it just inattention?

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #40 on: 27 January 2011, 20:05:19 »
All well to say you want fancier effects but warcraft has a fairly comparable engine and the difference is artwork.
I don't know, but this seems like more than just artistic quality:


I'm not pushing too enthusiastically for graphical improvements, as graphics aren't that high a priority for me, but I don't think we should shy away from them for the sake of poor hardware either.

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #41 on: 27 January 2011, 21:16:15 »
I don't know, but this seems like more than just artistic quality

I'm afraid not, I don't know the exact specs for WC3 models but I'm pretty sure they are roughly on par with the magitech models in terms of poly count and texture dimensions. They certainly aren't using any fancy shaders or bump maps. However the fact that WC3 is a decade old kinda illustrates my point.
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #42 on: 27 January 2011, 23:15:33 »
What about the glowing staff and the particles that following the censer?  This is stuff you wouldn't be able to do in an xml file to the best of my knowledge, because it is directly attached to vertices/polygons/whatever.  It would have to be part of the model data itself, and both things (particles and glow) are easy enough to do in Blender.  My point was that, even at roughly equivalent poly count and texture dimensions, it's stuff like that that makes their units look better.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Rendering G3D using OpenGL
« Reply #43 on: 28 January 2011, 04:08:35 »
The way I see it, it's not integrated cards that's the problem, but simply very outdated ones. However, I agree, we shouldn't be wasting our time supporting them. We can't just hold the game back so that those with 10+ year old computers too stubborn to get a new one can still play. They are an extreme minority anyway. After all, you can get a half decent computer for $400 at your nearest Walmart (I didn't say good computer, just half decent).
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Zoythrus

  • Guest
Re: Rendering G3D using OpenGL
« Reply #44 on: 28 January 2011, 05:52:21 »
The way I see it, it's not integrated cards that's the problem, but simply very outdated ones. However, I agree, we shouldn't be wasting our time supporting them. We can't just hold the game back so that those with 10+ year old computers too stubborn to get a new one can still play. They are an extreme minority anyway. After all, you can get a half decent computer for $400 at your nearest Walmart (I didn't say good computer, just half decent).
^this

Gabbe

  • Guest
Re: Rendering G3D using OpenGL
« Reply #45 on: 28 January 2011, 06:54:08 »
I like this ;)

wich came first? Computers or Glest?

I dunno but i think all i want is to use some of blenders features in the G3D models..

Psychedelic_hands

  • Guest
Re: Rendering G3D using OpenGL
« Reply #46 on: 28 January 2011, 13:42:43 »
All well to say you want fancier effects but warcraft has a fairly comparable engine and the difference is artwork.
I don't know, but this seems like more than just artistic quality:


I'm not pushing too enthusiastically for graphical improvements, as graphics aren't that high a priority for me, but I don't think we should shy away from them for the sake of poor hardware either.

Wow haha, I got Warcraft III a few days ago and thought "Woah, why can't Glest do this?"
This thread was nice timing for me.  :thumbup: ;)

And glest easily has more high res textures than Warcraft.

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #47 on: 30 January 2011, 00:24:02 »
While we do aim for quality, people need to understand that we aren't Blizzard. Check out their credits for WarCraft III: Reign of Chaos. GAE has introduced shaders and the graphics will get better with time. At the moment there is no reason why we can't turn off features for video cards that don't support them.

From http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml

Non-power-of-two textures are supported if the GL version is 2.0 or greater, or if the implementation exports the GL_ARB_texture_non_power_of_two extension.
It could be worth a look although from what I remember Unreal Engine requires power-of-two textures and they seem to be doing ok.

What about the glowing staff and the particles that following the censer?  This is stuff you wouldn't be able to do in an xml file to the best of my knowledge, because it is directly attached to vertices/polygons/whatever.  It would have to be part of the model data itself, and both things (particles and glow) are easy enough to do in Blender.  My point was that, even at roughly equivalent poly count and texture dimensions, it's stuff like that that makes their units look better.
For the left my guess is that since it's rendered to 2D it was done as a post process effect in an image manipulation program. For the right it is easy enough to specify in xml as long as it uses a skeleton structure. The problem with Glest is that it doesn't use a skeleton structure. Although it could still be possible to describe a path for the particle effect it would be trickier to sync up with the animation.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Rendering G3D using OpenGL
« Reply #48 on: 30 January 2011, 00:32:46 »
For the left my guess is that since it's rendered to 2D it was done as a post process effect in an image manipulation program.
Actually, it appears that way in the game as well, and the game doesn't use any pre-rendered sprites.

Quote
For the right it is easy enough to specify in xml as long as it uses a skeleton structure. The problem with Glest is that it doesn't use a skeleton structure. Although it could still be possible to describe a path for the particle effect it would be trickier to sync up with the animation.
Does it seem plausible to use Blender particle data in some future model format in GAE?  I think that would be far simpler and more intuitive for everyone involved.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Rendering G3D using OpenGL
« Reply #49 on: 30 January 2011, 02:45:00 »
Wouldn't it be easier to adopt the MD5 format as Will previously proposed and using the same method he proposed for turrets, by linking particle systems (from an XML) to a mesh? While using Blender's particle system would be great, it sounds far, far more complex to me. The little work I've done with Blender's particle system showed me its intensive complexity (abet, amazing possibilities), which would probably make implementation nearly impossible (I don't even know of any formats that can be used to export Blender's particle system as it is).
Edit the MegaGlest wiki: http://docs.megaglest.org/

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