Gfx Improvement Ideas / WZM Format proposals

Improving the artwork in Warzone2100 - not for mod discussions
User avatar
Olrox
Art contributor
Posts: 1999
Joined: 03 Jul 2007, 19:10

Re: Gfx Improvement Ideas / WZM Format proposals

Post by Olrox » 01 Sep 2009, 02:34

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!

elio
Regular
Regular
Posts: 508
Joined: 09 Jun 2007, 22:11

Re: Gfx Improvement Ideas / WZM Format proposals

Post by elio » 02 Sep 2009, 18:33

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

i-NoD
Code contributor
Code contributor
Posts: 317
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Gfx Improvement Ideas / WZM Format proposals

Post by i-NoD » 02 Sep 2009, 19:30

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. ;)

i-NoD
Code contributor
Code contributor
Posts: 317
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Gfx Improvement Ideas / WZM Format proposals

Post by i-NoD » 02 Sep 2009, 21:05

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
Attachments
TCMask_update.zip
(93.56 KiB) Downloaded 364 times
Last edited by i-NoD on 02 Sep 2009, 21:18, edited 1 time in total.

winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

Re: Gfx Improvement Ideas / WZM Format proposals

Post by winsrp » 02 Sep 2009, 21:09

and when is a new version coming out with this update? cus me likes!!!. :P

User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Gfx Improvement Ideas / WZM Format proposals

Post by Zarel » 03 Sep 2009, 03:14

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.

Deus Siddis
Trained
Trained
Posts: 235
Joined: 18 Aug 2007, 06:58

Re: Gfx Improvement Ideas / WZM Format proposals

Post by Deus Siddis » 03 Sep 2009, 17:49

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

User avatar
whippersnapper
Regular
Regular
Posts: 1183
Joined: 21 Feb 2007, 15:46

Re: Gfx Improvement Ideas / WZM Format proposals

Post by whippersnapper » 03 Sep 2009, 18:10

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:
.

User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Gfx Improvement Ideas / WZM Format proposals

Post by Zarel » 03 Sep 2009, 23:04

By the way, here's the reference for how Wesnoth does it:

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

User avatar
XANAX
Trained
Trained
Posts: 189
Joined: 09 Jul 2009, 22:05

Re: Gfx Improvement Ideas / WZM Format proposals

Post by XANAX » 03 Sep 2009, 23:21

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

i-NoD
Code contributor
Code contributor
Posts: 317
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Gfx Improvement Ideas / WZM Format proposals

Post by i-NoD » 03 Sep 2009, 23:47

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

User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Gfx Improvement Ideas / WZM Format proposals

Post by Zarel » 04 Sep 2009, 03:51

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.

Killar
Greenhorn
Posts: 12
Joined: 30 Nov 2009, 07:06

Re: Gfx Improvement Ideas / WZM Format proposals

Post by Killar » 22 Mar 2010, 23:40

So what has happened since last September?

i-NoD
Code contributor
Code contributor
Posts: 317
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Gfx Improvement Ideas / WZM Format proposals

Post by i-NoD » 22 Mar 2010, 23:43

This thread is for 'ideads' :wink:
Check out this one for results.

User avatar
MaNGusT
Art contributor
Posts: 1071
Joined: 22 Sep 2006, 10:31
Location: Polar region, Russia

Re: Gfx Improvement Ideas / WZM Format proposals

Post by MaNGusT » 20 May 2011, 21:06

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:
Image

Post Reply