Author Topic: Graphics Improvements Discussion  (Read 10430 times)

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Graphics Improvements Discussion
« on: 16 December 2012, 19:35:48 »
I posted this a while back: https://forum.megaglest.org/index.php?topic=8122.msg80889#msg80889
That has some pretty detailed ideas from optimization and enhancement.

If you devs could please weigh in on this topic, that would be great!

Working on the water in JungleHD I noticed that the water is really.....bad. I know plenty of engine-based improvements we could make to the water and I'd like to discuss them, hopefully get a couple in and used in JungleHD.  ;D
Egypt Remastered!

Proof: Owner of glest@mail.com

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Graphics Improvements Discussion
« Reply #1 on: 17 December 2012, 03:47:56 »
Water is pretty hideous, I believe its on our list of things we want to fix, numerous things on that list never got done (but I had looked into it a bit).

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Graphics Improvements Discussion
« Reply #2 on: 17 December 2012, 03:54:31 »
Ok, can you let me know:

1 Are we going to get bump mapping/shader support within the next 6 months?
2 Can we hope for some improvement in the water shader in the next 6 months?
3 Are there any plans in motion to improve any graphics areas?
Egypt Remastered!

Proof: Owner of glest@mail.com

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Graphics Improvements Discussion
« Reply #3 on: 17 December 2012, 04:14:56 »
As a father of 7 children and a full time job and a volunteer fire fighter, I will not promise you things by any timeline on a project i do in my 'free time' (and primarily was originally at the request of the VBros).

I personally do want all of these features you mentioned above, but they will take time learning in order to do it properly. For example I spent 3 months working on MD5 model support (what they use in sauerbraten) only to discover there was no working plugin scripts for the latest blender (no thanks I didn't want that mess all over again).

Now I'm not sure the IQM format is really needed as modders aren't asking for a different format at all (yet) so I stopped that work (as I imagined myself it was a need).

So perhaps one day someone talented and mature in coding OpenGL will be able to assist and then things can move more quickly, but until that day comes you have Titi and myself (and sometimes Willvar and others) who contribute meaningful work. Any ways I'm not sure what else to say here, if none of this helps you understand, I doubt much more will.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Graphics Improvements Discussion
« Reply #4 on: 17 December 2012, 04:21:46 »
3 Are there any plans in motion to improve any graphics areas?
Like what? I tried to collect a few graphics related feature requests in a previous post. Did I miss anything?
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: Graphics Improvements Discussion
« Reply #5 on: 17 December 2012, 04:36:07 »
I am going to be doing graphical improvements that it should be possible to port to other Glest variants which might mean that SoftCoder and TiTi's free time will be sufficient to port even if they don't have the time to do them themselves. But its easily a year out minimum and only assuming I don't manage to pick up a real job in the mean time.

I actually agree with Softcoder here, stop being a pest. Or learn how to code yourself and make the changes yourself. Learning programming especially compiled languages is HARD. Most professionals even specialize in a small area of programming over a decade or more. That is why AAA games are so ridiculously performance efficient.

A part time coder who works alone or with one or two other people is not going to be able to do every little engine feature to the same level as an industry title.

Games like Spring and 0AD have dozens if not more developers including students doing their senior year project and even some people like Ykkrosh who are doing postgraduate work as well as often having dedicated developers.

Its incredibly common in game development to have modders who havent got a clue how much work real game creation is. It took 0AD something like 10 years to spin up to their current level after deciding to make their own game instead of mod AOE.

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Graphics Improvements Discussion
« Reply #6 on: 17 December 2012, 04:41:37 »
I ask about shaders and bump mapping because GAE had some of this working in game. I put some bumpmaps in tech and tested before and it worked. Perhaps much could be learned/brought over from there?

I understand your time constraints, but I was just checking, as honestly we've had little word on the topic. Thanks.

MoLAoS: I understand how long it takes, I briefly ventured into programming before and it took me long enough to write a tiny little program. As stated above, I'm just trying to find out what's planned or going on.
Egypt Remastered!

Proof: Owner of glest@mail.com

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: Graphics Improvements Discussion
« Reply #7 on: 17 December 2012, 04:48:31 »
Okay but its always better to be sure. So many people don't realize. Its like a policy lynch in mafia.

I just think that soft's clear annoyance with the questions indicates he feels like his position has been made clear before.

MightyMic

  • Technician
  • ****
  • Posts: 150
  • To mod, or not to mod...
    • View Profile
Re: Graphics Improvements Discussion
« Reply #8 on: 17 December 2012, 18:54:20 »
Can you apply shaders in blender with baking? I seem to recall that you may be able to do that... I'll look into it

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Graphics Improvements Discussion
« Reply #9 on: 17 December 2012, 22:20:16 »
I ask about shaders and bump mapping because GAE had some of this working in game. I put some bumpmaps in tech and tested before and it worked. Perhaps much could be learned/brought over from there?

I assume there are feature implementations in GAE which can be merged without major modifications. It neccessary to keep in mind, though, that GAE and MegaGlest have sufficiently changed under the hood, and diverged from both Glest and each other, that in most cases porting existing implementations of a feature from one to the other engine is not a matter of copy-and-paste. All of what you have in MegaGlest now and in the future is and will need to be written in a way that it will work for cross-platform gaming. My (admittedly quite limited) understanding of GAE is that this was never a strict requirement there.

As such, implementing features there could - with respect to cross-platform compatibility - often be done in a different (and possibly less complex) way than it is the case for MegaGlest. So in cases where you coud copy a feature implementation from GAE and it would work for single-player MegaGlest with just slight editing, this may break cross-platform network gaming, and thus a different approach (and thus new code) will need to be used. Of course there can also be situations where programmer just thinks that the way something is already done elsewhere is not the way s/he likes it / think it should be done - that's a different matter. So it can be one or the other or a mix.

I do not mean to bash on GAE here, it is very well possible some preconditions (such as "must work cross-platform") would also need to be complied with when porting in the other direction, I'm just not into GAE enough to know them.

I understand your time constraints, but I was just checking, as honestly we've had little word on the topic. Thanks.

In fact you asked whether we are going to get a feature within the next 6 months. I do understand that you are not (at least not directly) asking that something is done for you within 6 months, however, the way you're putting it can be interpreted as getting close to it.

A little excursion into grammar to explain why: In your sentence, we probably refers to the modding community, are going to get is passive/intransitive, i.e. the receiving party is not going to contribute to make it happen, and the source it is supposed to come from, while indirectly addressed, is not even mentioned (but it's clear from context that it's supposed to be Softcoder and Titi). While within professional projects asking for and even requiring a timeline and fixed date of completion is perfectly fine, this is almost never acceptable for hobby projects. And while its developers are professional programmers, MegaGlest belongs to the latter category. Getting used to this, and that there will never be any fixed timelines, is part of getting used to work on this and any other project which isn't driven by commercial pressure (which is the case for many projects with a developer community, for example). This very aspect, the lack of fixed time constraints, can make it fun for developers to work on it, and is often a precondition for them to get involved in some pro bono project in the first place.

As such, for a developer even asking whether or not a given feature will (reliably) become available within a given period will not just remind a developer of paid work, which this project is not, but also displays that the requesting party is not fully aware of the overall situation and her/his position.

I'm mostly writing this long statement to make it easier to understand each others' motivations, and how things feels for every side involved. Following the forums, discussion threads where it is my impression that this point of view is not widely known or participants are, based on how they discuss, are not fully aware of the situation, emerge every now and then.

Finally, to not be misunderstood: I am not (at all) saying that filing feature requests should be limited, I'm just saying that requesting statements on feasibility of implementing some feature within a given period, unless maybe there is real-world indication that it is needed to not delay some other meaningful on-going work (this situation has occurred several times, and I've always been impressed how fast Softcoder and Titi implemented new features for the more advanced undertakings such as Annex), is hardly ever a good idea on a project which works on a I-spend-some-of-my-rare-spare-time-on-this-when-I-feel-like-it basis. This is something people really, really need to understand to not demotivate the existing developers.

So (in my opinion) the best way forward is: Create something which is somewhat close to being ready, but which lacks some engine feature to make it work as desired. Then file a feature request or discuss it on IRC, explaining this very situation and showing what you have and what's missing. On the other hand, discussing (in public) that you started your work but are not going to finish it because what would drive it is (by the person stating so, and possibly others, too, and maybe it's also a generally accepted point of view, and maybe not) conceived as lacking and incomplete, won't add to the motivation of those who create what is supposed to drive it. So when you spell things out, think about how you do it, how you make others want to do what you want to achieve (this often includes demnonstrating that you can nearly finish something yourself), and how reading something feels when you have the background of the party you are addressing. This way you can get a lot done.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

MightyMic

  • Technician
  • ****
  • Posts: 150
  • To mod, or not to mod...
    • View Profile
Re: Graphics Improvements Discussion
« Reply #10 on: 18 December 2012, 00:40:44 »
As a father of 7 children and a full time job and a volunteer fire fighter, I will not promise you things by any timeline on a project i do in my 'free time' (and primarily was originally at the request of the VBros).

I am impressed... and glad that you make time to develop MegaGlest. Thanks :thumbup:

Dritominous

  • Guest
Re: Graphics Improvements Discussion
« Reply #11 on: 21 December 2012, 07:44:46 »
"Oop, can't code for MG today, got to take care of the kids and fight forest fires."

- Like a boss

firedeathbot

  • Draco Rider
  • *****
  • Posts: 264
    • View Profile
Re: Graphics Improvements Discussion
« Reply #12 on: 8 January 2013, 14:58:49 »
I personally do want all of these features you mentioned above, but they will take time learning in order to do it properly. For example I spent 3 months working on MD5 model support (what they use in sauerbraten) only to discover there was no working plugin scripts for the latest blender (no thanks I didn't want that mess all over again).

Now I'm not sure the IQM format is really needed as modders aren't asking for a different format at all (yet) so I stopped that work (as I imagined myself it was a need).
Would almost be nice to have support for other model formats which use keyframe animations such as md2 or md3, additionally, obj support should be fairly easy to implement and would make it a lot more convenient to develop tilesets.

Althoguh md5 would be nice just because of the skeletal based animations, it might be too much work to implement it.
Back to glest after a few years inactivity.

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Graphics Improvements Discussion
« Reply #13 on: 8 January 2013, 15:31:02 »
What are the advantages of .obj?? And md2/3 keyframe as in I can import it and edit, then export? Instead of having to reanimate if I don't have the blender files?
Egypt Remastered!

Proof: Owner of glest@mail.com

firedeathbot

  • Draco Rider
  • *****
  • Posts: 264
    • View Profile
Re: Graphics Improvements Discussion
« Reply #14 on: 8 January 2013, 16:18:13 »
What are the advantages of .obj??
Its
Widely used
Text based (easy editing)
Extremely simple format

And md2/3 keyframe as in I can import it and edit, then export? Instead of having to reanimate if I don't have the blender files?
In md2 the keyframes are assigned to each vertex (similar to g3d), pretty sure md3 is the same. This would make these formats relatively simple to add because from what i've seen of the g3d format so far the animations and texture coordinants and vertices are all done very similarly to md2.
Back to glest after a few years inactivity.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Graphics Improvements Discussion
« Reply #15 on: 8 January 2013, 17:56:54 »
Already looked at obj, won't be doing it as its for static models (no animation support) which is a waste of our time.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Graphics Improvements Discussion
« Reply #16 on: 8 January 2013, 19:51:45 »
What about the IQM format that you looked at last year, Softcoder? Obviously a new format is a lot of work, but that seems a reasonable choice.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

firedeathbot

  • Draco Rider
  • *****
  • Posts: 264
    • View Profile
Re: Graphics Improvements Discussion
« Reply #17 on: 8 January 2013, 20:05:21 »
Already looked at obj, won't be doing it as its for static models (no animation support) which is a waste of our time.
You could always have it as an extra optional format. I never said that it should be the only one that would be worth adding.

What about the IQM format that you looked at last year, Softcoder? Obviously a new format is a lot of work, but that seems a reasonable choice.
Believe it or not but it is actually a lot of work because you not only have to write the loaders for the format, but you would also have to code support for skeleton based animations into the source.
Back to glest after a few years inactivity.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Graphics Improvements Discussion
« Reply #18 on: 8 January 2013, 20:32:53 »
Believe it or not but it is actually a lot of work because you not only have to write the loaders for the format, but you would also have to code support for skeleton based animations into the source.
I disagree with the need for OBJ, since the format (while more common) is inferior to even G3D due to its lack of animations, but you're right, adding a new format, especially a skeleton based format, is not easy. It would, of course, open a portal of possibilities. We could have a single mesh for a unit and multiple skeletons. Or we could eventually use it for ragdoll physics and so on. Finally, support for a new format prevents us from having to maintain export and import scripts. In fact, G3D can't really be imported well. We can, at the best, keep shape keys, but the skeleton is lost in the G3D file, preventing us from truly keeping the animation on import. A skeleton based model format wouldn't have those problems.

The only issue I can see is that a non-custom format won't necessarily have a way to toggle team colour on or off. I'm not sure how we'd proceed with this. Perhaps the model format allows information to be attached to it; I've no idea.

So yeah, difficult to implement, but big returns.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Graphics Improvements Discussion
« Reply #19 on: 8 January 2013, 21:02:34 »
Ok, so i already posted about my work on IQM, and no-one responded to why i stopped looking into it. IF modders deem its worth looking into i want to hear it:

1. After doing your own research do you like IQM?
2. Is is really worth adding and if so why?
3. What priority does a new model format have over other features (seeing we already have g3d)
4. Do you understand that you need to ALSO create a 'control' text file to descrive how the model will work (animations in the IQM, and model effects) similar to MD5 format

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Graphics Improvements Discussion
« Reply #20 on: 8 January 2013, 22:16:57 »
Hmm, looking closer at the format, I've been unable to find any information that I can understand about how it works. All I can find is format specifications that are all greek to me and a very vague read me. I'd like to say that a bone format like IQM would be good for the engine, but even with his demo program, I can't, for the life of me, figure out how to export a model that uses a texture nor can I figure out how to export an animation. Granted, the only program I have that can even view the IQM files is his demo program.

It would appear that I was looking mostly at the benefits a skeletal format would give, without paying attention to the intricacies of its use (as I have no idea how a control file would work and even Google won't help).

But priority wise, even understanding how to use this format, I would rate it below features that we can directly use at the moment, such as multiple effects in an upgrade, water units, better AI, etc. I guess it's pretty low priority, but works as a gateway to other features (which would be even lower priority).
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Graphics Improvements Discussion
« Reply #21 on: 8 January 2013, 23:18:29 »
Honestly I am on the same page as you Omega, its nice to have, but i think other requests and bug fixes are higher priority.

Anyone else have comments?

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Graphics Improvements Discussion
« Reply #22 on: 9 January 2013, 06:51:09 »
(In order to discuss model formats you really need to start by discussing use-cases.

Do you want humanoid movement?

Do you want turning turrets and such?

How will these work?

Then you can go looking for a format that better suits the use-case)

helldiver

  • Guest
Re: Graphics Improvements Discussion
« Reply #23 on: 15 January 2013, 23:55:51 »
Personally I'm very happy with the G3D format since it allows me to do animation and effects trickery that other formats wouldn't allow me to do. Morph targets, cloth simulations, physics simulation bakes, and advanced anatomies that violate IK can be done in 3D Studio Max and exported easily with G3D.

Bone based exporters (aside from really advanced and expensive ones such as Mechanik, or Granny 3D) typically are limited to skin exports. Although you can still do stuff such as physics simulations and key frame them, some of the more advanced modifiers require extensive plugin support.

To be honest from a proffesional standpoint, as far as graphics are concerned, I'd rather Softcoder and the MG team concentrate first on:

(In order of importance)
-Full Normal Map and Specular Map support.
-Support for Glow Maps.
-8 Bit alphas on model textures.
-Support for Emissives if possible, but not important.

In this model for Project Ethos (I will be giving out more details later this year) on the left is in game (using GAE Beta 3), on the right is using a custom Direct 3D Shader.


Notice no specular so the armor, etchings, and details don't pop in the Glest version. Also, without specular the Normal Map doesn't push the diffuse properly.
Note the glowing runes are not glowing in the Glest version.
Note the 1 bit alpha in the Glest version as opposed to 8 bit alpha in the Direct 3D shader version. 8 Bit alpha is kind of important particularly for effects that use sprites and billboards. I know the engine can do it since the effects show proper tranlucency.

I can send you guys a unit with all the respective maps so you can research and test features, just PM me.

Personally I'd rather the team focus on getting shaders working first, it would bring Glest closer to modern standards. If you can get Normal, Specular, and unit emanations (like GAE does), I'd switch to MG in a heartbeat. As I told Tomreyn, odds are I'll be switching to MG eventually. Would be great if I could switch sooner since it would allow me to work with Softcoder and the other MG programmers in testing advanced graphical features.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Graphics Improvements Discussion
« Reply #24 on: 16 January 2013, 00:20:45 »
Nice to see some other opinions, Helldiver. Your images look intriguing.

I'm inclined to agree with you. Normal and specular maps could make quite a difference. The rocks of castles can become rough without adding several thousand polygons, metal can shine and appear realistic (it ends up looking either fake due to artificial specularity or more like stone from lack thereof). Glow maps sound a bit harder, but have even more potential.

However, I do believe that MegaGlest already supports 8-bit alpha. I tested a swordman by making his shield about 50% alpha, and judging from this screenshot, the alpha should be working properly, unless I'm misunderstanding anything.

Emissives are interesting. MegaGlest (and GAE) has some limited support, I suppose, with unit particle systems. However, they're limited to a single coordinate on the model; there's no way to, say, make a moving lamp emit particles. Likewise, it's just particles, no way to make it emit light. I'm not sure how difficult it would be to allow unit particle systems to be bound to the geometric center of an object rather than a static coordinate.

Either way, I think you have some good points. The graphical potential of Glest is rather outdated. And if modders are going to use the features, expanding on the shaders might be a great idea.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

 

anything