Page 4 of 4

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 01 Sep 2009, 02:34
by Olrox
I almost jumped off my chair, I swear. Those dynamic team colors are something I was waiting a long time for, I'm very happy to know that it's being developed. It's a pity that I'm not going to release my structures as a mod anymore (with the release of elio's new structures mod, further efforts seem pointless), I could implement a lot of ideas and effects and details with a texture blending mechanism like that. :(
Argh...
I think I just lost my wish of working with Wz, but I think this project is at the hands of some fine people.
But I'll just stop whining, lol

Great work, and good luck for you guys from the dev team!

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 02 Sep 2009, 18:33
by elio
is it possible to use another blending mode instead of additive blending? perhaps subtractive blending? because i can't get it dark enough without loosing detail. well the best blending method would be grain merge http://docs.gimp.org/2.4/en/gimp-concep ... #id2574094
E = I + M - 128


PS:
Olrox wrote:It's a pity that I'm not going to release my structures as a mod anymore (with the release of elio's new structures mod, further efforts seem pointless)!
don't say that! O_o i mean yours have a very different architecture to mine, their own charm

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 02 Sep 2009, 19:30
by i-NoD
it's possible, elio.
you'll need to use the appropriate modes for glBlendFunction. take a look on that page for details. you just do the math and say which modes are corresponding to your equation. ;)

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 02 Sep 2009, 21:05
by i-NoD
Don't remember if i mentioned it but the mask can use some gray colors too, so the team colors are not so bright: here is a small variation of the TCMask mod.
wz2100_shot_tcmask.png

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 02 Sep 2009, 21:09
by winsrp
and when is a new version coming out with this update? cus me likes!!!. :P

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 03 Sep 2009, 03:14
by Zarel
Additive blending?

Um, what about standard overlaying?

(pseudocode)

result[R] = ((CHANNEL_MAX - mask[A]) * texture[R] + teamcolor[R] * mask[A]) / CHANNEL_MAX
result[G] = ((CHANNEL_MAX - mask[A]) * texture[G] + teamcolor[G] * mask[A]) /CHANNEL_MAX
result = ((CHANNEL_MAX - mask[A]) * texture + teamcolor * mask[A]) / CHANNEL_MAX
result[A] = min(CHANNEL_MAX, texture[A]+mask[A])

(CHANNEL_MAX is 0xFF for images with 8-bit channels)

This will cause some slight distortion in situations where neither the texture nor the mask's alpha are binary, but that should be rare, and it's pretty slight distortion anyway.

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 03 Sep 2009, 17:49
by Deus Siddis
This is a massive graphical improvement I've wanted to see in warzone for quite some time. Now texture detail can actual be spent on detail, rather than team colored iterations of the same thing.

Excellent work, iNoD. :D

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 03 Sep 2009, 18:10
by whippersnapper
i-NoD wrote:Don't remember if i mentioned it but the mask can use some gray colors too, so the team colors are not so bright: here is a small variation of the TCMask mod.
wz2100_shot_tcmask.png
My, my, the subtlety of texture detail achieved in those new structs is quite impressive ("acid-rain corrosion / pealing of paint" is beauteous - course, I'm interpreting what I see). So much so that the base-mattes look in desperate need of being re-done to match the quality. I seem to recall someone doing hi-res versions of them not that long ago - I believe Black Project was involved with the artist who worked on em too. I'll have to forum search..

Regards, whip :ninja:
.

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 03 Sep 2009, 23:04
by Zarel
By the way, here's the reference for how Wesnoth does it:

http://www.wesnoth.org/wiki/Team_Color_Shifting

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 03 Sep 2009, 23:21
by XANAX
Zarel wrote:By the way, here's the reference for how Wesnoth does it:

http://www.wesnoth.org/wiki/Team_Color_Shifting
thats so coooool O_O

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 03 Sep 2009, 23:47
by i-NoD
I guess we could use both tcmask generation method and artist could choose whichever is most appropriate for him. The more important for now is to solve the issue with the blending modes.
Zarel, have you seen the link i gave earlier for glBlendFunc modes? Any blending equations should be convertible to those modes, or they wont work for us.
I have some questions for your pseudocode:

Code: Select all

result[B] = ((CHANNEL_MAX - mask[A]) * texture[B] + teamcolor[B] * mask[A]) / CHANNEL_MAX
result[A] = min(CHANNEL_MAX, texture[A]+mask[A])
we have a destination and a source in glBlendFunc: for a simplicity src is a mask, dst is a texture, what is a teamcolor then?
in my code it's now smth like that (if i understand all those functions correctly):
mask[X] = mask[X] * teamcolor[X]
result[X] = min(CHANNEL_MAX, (1 * mask[X]) + (1 * texture[X]) )
where 1 is caused by the GL_ONE modes

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 04 Sep 2009, 03:51
by Zarel
i-NoD wrote:I guess we could use both tcmask generation method and artist could choose whichever is most appropriate for him. The more important for now is to solve the issue with the blending modes.
Zarel, have you seen the link i gave earlier for glBlendFunc modes? Any blending equations should be convertible to those modes, or they wont work for us.
I have some questions for your pseudocode:

Code: Select all

result[B] = ((CHANNEL_MAX - mask[A]) * texture[B] + teamcolor[B] * mask[A]) / CHANNEL_MAX
result[A] = min(CHANNEL_MAX, texture[A]+mask[A])
we have a destination and a source in glBlendFunc: for a simplicity src is a mask, dst is a texture, what is a teamcolor then?
in my code it's now smth like that (if i understand all those functions correctly):
mask[X] = mask[X] * teamcolor[X]
result[X] = min(CHANNEL_MAX, (1 * mask[X]) + (1 * texture[X]) )
where 1 is caused by the GL_ONE modes
Erm, [R], [G], , and [A] refer to Red, Green, Blue, and Alpha.

The mask is assumed to be nothing but an alpha channel, while the teamcolor is assumed to be a regular RGB color with no alpha.

I'm not entirely sure how to achieve that with glBlendFunc, but there's good reason why I dislike OpenGL's blend functions. ;)

Looking at the documentation for the modes, it looks like normal mode, except you multiply the mask layer by the teamcolor first, before applying it to the texture.

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 22 Mar 2010, 23:40
by Killar
So what has happened since last September?

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 22 Mar 2010, 23:43
by i-NoD
This thread is for 'ideads' :wink:
Check out this one for results.

Re: Gfx Improvement Ideas / WZM Format proposals

Posted: 20 May 2011, 21:06
by MaNGusT
EvilGuru wrote:Dot3-bump mapping (aka, normal mapping) can be added without increasing the requirements significantly; http://www.paulsprojects.net/tutorials/ ... ebump.html achieves it with the following extensions:
  • ARB_multitexture
  • ARB_texture_cube_map
  • ARB_texture_env_combine
  • ARB_texture_env_dot3
Per wrote:Event-driven animation is on my TODO-list for WZM already.

Bump mapping should not be so hard to add. We need a good test case to work on when implementing it, though. Preferably some existing texture where you can see the difference quite clearly. This could be added as an extension to the existing PIE format, even.
it's so funny sometimes to re-read the old threads. :wink: