Author Topic: Graphics Improvements Discussion  (Read 10449 times)

helldiver

  • Guest
Re: Graphics Improvements Discussion
« Reply #25 on: 16 January 2013, 01:36:55 »
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.

Somehow I suspected it was a GAE bug since the Team Color is over-saturating rather than overlaying. Good to know MG has that working correctly.

I'm working as fast as I can to get a preview up with indepth information, some things have gotten in the way (new PC, getting the wiki going), but my plan is to get the MG coders like yourself, Softcoder, and so on to be able to view the PE Development Blog. It will give you guys a good idea of my pipeline, development process, concept art, and more info on the project.

The issue is, that without support for Normal maps, I can't test assets as I produce them. Hence why I'm stuck on GAE during this brick and mortar phase.

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Graphics Improvements Discussion
« Reply #26 on: 16 January 2013, 02:26:06 »
Trust me we've been begging for shader support forever... But alas we have rather busy devs.
Egypt Remastered!

Proof: Owner of glest@mail.com

helldiver

  • Guest
Re: Graphics Improvements Discussion
« Reply #27 on: 19 January 2013, 14:19:17 »
I know shaders aren't currently in, but I decided to put this little guy together over the weekend.

The GDT on his armor stands for Glest Development Team. I designed him so that you guys could use it to test shader programing. Although he looks like he's a lot of polys, he's just 988. Only animations on him are Idle and Running. Download here

With Normal and Specular:


I use a custom shader in the Max viewport that supports those maps; It is not a rendering.

« Last Edit: 29 January 2013, 10:24:09 by helldiver »

helldiver

  • Guest
Re: Graphics Improvements Discussion
« Reply #28 on: 20 January 2013, 03:14:55 »
Link posted above.

Please keep in mind I didn't intend this guy to be used in a full mod or released game. He's simply so that Softcoder and others in the Glest, MG, GAE teams can mess around with shaders. If you guys absolutely need his death and attack animations, I will try and open up some time in my schedule.

The team color bleeds through in GAE, let me know if it does that in MG. You can tone down the alpha by making it lighter (whiter), otherwise let me know and I'll tone it down, or if you prefer the native one without team color channel. Animation speeds are 20 for gdt_soldier_standing, and 165 for gdt_soldier_moving.

I completely understand if you guys can't get to programming shaders. Once I get a bit further a long in PE, I will invest more time and effort in researching the shaders. I figured if GAE can do Normal Maps, I don't see why can't those portions of code be brought over to MG, at least for research purposes?

Yggdrasil

  • GAE Team
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: Graphics Improvements Discussion
« Reply #29 on: 20 January 2013, 19:15:05 »
Really nice model.

What did you use to create the G3Ds? 3DS Max exporter?

I just had a quick look at your model and i noticed some stuff. You defined 3 textures  in the file: diffuse, specular and normal. Only the first slot is defined to be diffuse in the specification:
https://forum.megaglest.org/index.php?topic=713

The other slots are not defined but should be in the order you have. GAE has this:
Code: [Select]
WRAPPED_ENUM ( MeshTexture,
DIFFUSE,
SPECULAR,
NORMAL,
LIGHT,
CUSTOM
)
I don't know if we have any use for lightmaps (as we have dynamic day/night-cycles) and i also don't know what the custom map is for (haven't looked that much though). We should add the other slots to the specification (the non-selectable flag too).

I'll probably add at least specular and normal maps to the blender exporter in the next days.

helldiver

  • Guest
Re: Graphics Improvements Discussion
« Reply #30 on: 20 January 2013, 19:20:34 »
Really nice model.

What did you use to create the G3Ds? 3DS Max exporter?
I'll probably add at least specular and normal maps to the blender exporter in the next days.

3DS Max Exporter, and then G3DHack to set the flags and textures.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Graphics Improvements Discussion
« Reply #31 on: 21 January 2013, 01:47:10 »
I don't know if we have any use for lightmaps (as we have dynamic day/night-cycles)
Am I correct in assuming that light maps show where a model emits light (some games that I know using that feature call them "glow maps"). If so, I think light maps have some merit even with our day-night cycle. After all, a unit holding a lamp at night looks really awkward if the lamp doesn't glow. Glest can define units emitting light at night, but there's no way to determine where this light comes from. In my opinion, it'd be pretty cool if we could specify the sources of a light. A unit might carry a lamp (like this wicked tonberry) or maybe they emit light through parts of their body (such as the Witcher 2's gargoyles) or even the ruins in Helldiver's first example model.

Even in the day time, emitting light has its purposes, as it would presumably look more natural than particles (a light map could be shaped to the specific area) and would look better than shadows. The difference would be even more noticeable at night. Finally, light maps would allow light to be emitted from a moving object. Particles can currently only be centered on an coordinate relative to the mesh's center, meaning there's no way to center a particle on a moving lantern (etc).
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Yggdrasil

  • GAE Team
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: Graphics Improvements Discussion
« Reply #32 on: 22 January 2013, 00:17:28 »
Am I correct in assuming that light maps show where a model emits light (some games that I know using that feature call them "glow maps").
No, as you said yourself these would be glow maps. Lightmaps are a way to pre-compute the lighting in the scene. At render time you then just multiply/blend the lightmap with the diffuse map to get shading and shadows. Obviously this only works with static lights.
https://en.wikipedia.org/wiki/Lightmap

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Graphics Improvements Discussion
« Reply #33 on: 22 January 2013, 01:14:19 »
Ah, I see. In which case, glow maps would also be an interesting future concept, and I'm inclined to agree with Yggdrasil that, unless they have some other planned use, light maps don't seem to be very useful in Glest's lighting.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Psychedelic_hands

  • Guest
Re: Graphics Improvements Discussion
« Reply #34 on: 22 January 2013, 01:52:14 »
and i also don't know what the custom map is for (haven't looked that much though).

Heres an example of what custom maps were for. https://forum.megaglest.org/index.php?topic=6248.msg64068#msg64068

Silnarm wrote an amazing shader for the specter in constellus, but (and I'm kicking myself) the files disappears around the same time as silnarm did.  :'(

Moral of the story, come back Silnarm, we love you.

\edit: and I just want to say helldiver, you're a bloody amazing artist. It's incredibly inspiring to see that level of work can be done for Glest.
How do you make your models? Do you start in Zbrush or in max?
« Last Edit: 22 January 2013, 02:00:32 by Psychedelic_hands »

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 #35 on: 22 January 2013, 10:21:13 »
If someone could make a scenario which validates in MegaGlest, with a single unit using this model, then this would make things testable.
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 · · ·

helldiver

  • Guest
Re: Graphics Improvements Discussion
« Reply #36 on: 22 January 2013, 12:26:49 »
Glow maps or Light maps aren't a form of lighting really. They work in a similar way to your Team Color (actually they work nearly identically). Basically it is an additional map (or Alpha Channel) used to denote portions of the texture that will remain "lit".

Lightmaps (aka Emissive maps) are critically important to Glest. Although not on the same level of importance as Specular and Normals, Lightmaps are up there when we take a look at improving the graphics pipeline.

Why are they important?

-Windows. At night windows glow. Take a look at any modern game and you will notice faint glows coming from windows.
-Magical effects on creatures, glowing eyes, elementals.

The Inevitable city in Warhammer Online; Note the glows coming off the windows. This is simply a grey scale texture with areas masked as to where they will glow.
Click Me!

Note the "glow" coming off the texture over the model.
Click Me!

This is what an emissive map looks like:





[Edit] Most engines that do emissive maps will use a greyscale texture. More modern engines (UDK, Source, etc) can do Color Emissive maps as well as Color specular. They can also do like 20+ other types of "maps" (Environmental, Parallax, etcetera).

Environmental maps are used to fake reflective surfaces that a user won't be looking up close at. Car bodies, plate armor, swords, metallic surfaces etc. Not really good for water, but you can also use it for "simple" water. They are really complicated in terms of how they work programming wise and I do not expect to see such a feature in glest for now. Again, they work like any other map that masks a region of the texture (like the Team color). Except instead of showing texture, those areas masked reflect a reference texture (simple), or reflect a skybox (complex).

Psychedelic_hands
It depends on the model, usually I start in Max with the silloutte before moving over to Mudbox for the highress. Some peices are done in Max using SubD, organic stuff like bodies, heads, cloth, etc. is done in Mudbox. For the marine since I was in a hurry I did the whole body first in SubD, exported and then did all the details in Mudbox before retoping and moving back to Max.

best regards to all! :D
« Last Edit: 22 January 2013, 12:38:21 by helldiver »

Psychedelic_hands

  • Guest
Re: Graphics Improvements Discussion
« Reply #37 on: 24 January 2013, 03:39:40 »
Cheers for the insight! Although taking a small peak at your model, I don't see your team-colour issue as a problem in the engine. You're texture looks like about 90% transparency when really it should be about ten or even less. Sorry if this is different to other engines, but it makes sense to me and still works the same. So I can't really see it as an issue.

helldiver

  • Guest
Re: Graphics Improvements Discussion
« Reply #38 on: 25 January 2013, 14:12:54 »
Cheers for the insight! Although taking a small peak at your model, I don't see your team-colour issue as a problem in the engine. You're texture looks like about 90% transparency when really it should be about ten or even less. Sorry if this is different to other engines, but it makes sense to me and still works the same. So I can't really see it as an issue.

It's a problem only in GAE, as I mentioned it shouldn't be an issue in MG.

Psychedelic_hands

  • Guest
Re: Graphics Improvements Discussion
« Reply #39 on: 29 January 2013, 05:01:07 »
The model looks exact the same in the MG viewer bar the slightly different team colour. It's just an issue with your texture having too much transparency.

helldiver

  • Guest
Re: Graphics Improvements Discussion
« Reply #40 on: 29 January 2013, 10:22:39 »
The model looks exact the same in the MG viewer bar the slightly different team colour. It's just an issue with your texture having too much transparency.

Thanks, your feedback actually helped me a bit too. I updated the link with much brighter alpha. Should be about right.

Download Here

Interesting, works different than in Gamebryo and other engines I've worked with where the alpha is pretty much White for colored areas, Black for none colored and dark greys for inbetween, otherwise the colors don't show up.

Julius

  • Summoner
  • **
  • Posts: 46
    • View Profile
Re: Graphics Improvements Discussion
« Reply #41 on: 31 January 2013, 20:13:49 »
Cool model, please put an Creative Commons license on it and release it on OpenGameArt.org :) Thx.

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Re: Graphics Improvements Discussion
« Reply #42 on: 31 January 2013, 21:10:20 »
Quote

Cool model, please put an Creative Commons license on it and release it on OpenGameArt.org :) Thx.
Um... Its a cube...
Get the Vbros': Packs 1, 2, 3, 4, and 5!

MightyMic

  • Technician
  • ****
  • Posts: 150
  • To mod, or not to mod...
    • View Profile
Re: Graphics Improvements Discussion
« Reply #43 on: 31 January 2013, 23:34:01 »
Quote

Cool model, please put an Creative Commons license on it and release it on OpenGameArt.org :) Thx.
Um... Its a cube...

I'm pretty sure he was talking about the dude with the gun...

Julius

  • Summoner
  • **
  • Posts: 46
    • View Profile
Re: Graphics Improvements Discussion
« Reply #44 on: 9 February 2013, 17:14:24 »
Yeah obviously not the cube.  ::)