Models by MaNGusT (AR)

Improving the artwork in Warzone2100 - not for mod discussions
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Models by MaNGusT (AR)

Post by Jorzi »

A dynamic dirtmap system would unfortunately require at least two extra textures as well as a procedural animation system :/

Anyway, the shininess is controlled by the spec map and it can also be controlled with an individual factor for the whole model.
ImageImage
-insert deep philosophical statement here-
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Models by MaNGusT (AR)

Post by Emdek »

Shadow Wolf TJC, yes, but some approach to make them more individual would be also nice, it's boring to see many exact the same instances. ;-)
To make it more realistic (yes, this is not simulator, but such details are "icing on the cake").

Jorzi, it should be enough to generate it dynamically and then cache, maybe using some fractals to make it realistic.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

guys. it was just a test shot, I didn't configure textures and light parameters :-)
Image
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Models by MaNGusT (AR)

Post by Emdek »

MaNGusT, sure, but such as details could be nice addition in future (and useful to make new videos better).
Also, wouldn't be shader capable of adding such effects (new texture even in five variants would be too repeating)?
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

Emdek wrote:MaNGusT, sure, but such as details could be nice addition in future (and useful to make new videos better).
Also, wouldn't be shader capable of adding such effects (new texture even in five variants would be too repeating)?
think no.
dmg system I've seen in C&C Generals, units at low health change its duffuse texture from clean to damaged. It's not that necessary for wz at this moment, imho. :-)
Image
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Models by MaNGusT (AR)

Post by Jorzi »

@Emdek: fractals and other procedural textures are rarely used in games because they require a lot of extra computation from the shader.
ImageImage
-insert deep philosophical statement here-
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Models by MaNGusT (AR)

Post by Emdek »

MaNGusT, sure, there are more important things now, but maybe in future... ;-)
Jorzi, cannot such texture be generated once (or when unit gets hit) and later cached?
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Models by MaNGusT (AR)

Post by Jorzi »

@Emdek: Yes, it's called an image texture ;)
ImageImage
-insert deep philosophical statement here-
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

latest wmit's pix shader.
-Now light is actually Blinn-Phong that gives a nicer and smother lighting with performance of Phong light.
-Light calculating formulas are 99.9% right, materials can be still in use, for the old models specular parameters should not be greater than 0.2, for a new models with spec maps ambient,diffuse,specular parameters have to be = 1 to do no impact.
-Now shininess map could be putted into alpha channel of a specular map optionally.

but there is still a small bug that I commented in shader. Easy visible with teapot test model in wmit. Idk how to fix it but there is a hint at the bottom of the page.
Jorzi, now is your turn. :wink:
pie3.frag.zip
(1.16 KiB) Downloaded 316 times
P.S. btw
The extension frag is not allowed.
wtf guys? :?

P.S.2. This bug exists in Phong light too..
Image
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

olololo. Jorzi, I've found the solution. Lambert could be clamped or maxed, nvm,I think it's the same things.

Code: Select all

	colour += gl_LightSource[0].diffuse * gl_FrontMaterial.diffuse * diffusemap * lambertTerm;
	colour += gl_LightSource[0].specular * matspecolor * blinnTerm * lambertTerm;
it gives us a smooth edges between lamebert = 0.0 and lambert > 0.0
also if you will comment out the lambert's clamp you will get nice "real" self-shadows that make the ambient light to be almost zero in places where sun doesn't light.

I've attached 2 shaders, regular one has only edge fix and experimental one has a lot of optimizations and adds(i.e. I moved some vertex calculations to vertex shader since the frag shader is a bit overloaded)
pie.frag.zip
(3.61 KiB) Downloaded 345 times
P.S. I think I have to show what we were fixing. :)
clearly visible hard specular edge
clearly visible hard specular edge
fixed!
fixed!
Image
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Models by MaNGusT (AR)

Post by Jorzi »

Hmm maybe this is a good idea, although it does darken the specular highlight quite a bit, making things look less metallic imo.

Edit: what if you multiply it with pow(LambertTerm, 0.25) instead. That will still give a smooth trasition, but not so much light reduction ;) I made a sketch on how the different methods work (red is original cutoff, green is your current solution)
Attachments
spec_int.jpg
ImageImage
-insert deep philosophical statement here-
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

Let's compare the real images. :roll:
As you can see, yes, my variant is more darkened than your, but we don't see a such big hotspot at so cut view angle in real life.
shaded side
shaded side
and if we look on the front(lightened) side then we see that hotspots are equal because at this "points" the lambertTerm is 1.0
lightened side
lightened side
Also there could be a good chance to use lambertTerm unchanged. As you can see the hotspot is still same as before but darkened side is black in parts which get almost 0 light; in these parts ambient light color is replaced by -1 values from lambertTerm, as far as I understand. :)
lambertTerm differs from -1 to 1(not clamped to 0 , 1)
lambertTerm differs from -1 to 1(not clamped to 0 , 1)
edit: last variant works only with my fix, using pow() we get graphics artifacts.
Image
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Models by MaNGusT (AR)

Post by Jorzi »

Ok, maybe yours is still better, pow(lambertTerm, 0.25) was sharper than what I thought. Tried your shading on my transport model (converted it into tangent space and re-exported with normals) and it looked quite nice :)
ImageImage
-insert deep philosophical statement here-
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

Jorzi wrote:Tried your shading on my transport model (converted it into tangent space and re-exported with normals) and it looked quite nice :)
That's the goal. :wink:

btw... Who? and why? removed yellow sandy mist from the game? http://commons.wikimedia.org/wiki/File: ... -_base.jpg look! it looked so nice, it made a feel of the real Arizona desert. I've just understood why I still love the original graphics.. it makes you feel the environment, even with those ugly sharp-ish pixels what they called as a 3d graphics in 1999.

you can find more here http://commons.wikimedia.org/wiki/Warzone_2100

edit:
P.S. the latest build of wmit https://github.com/downloads/iNoDlite/W ... 676e08.zip ,now materials can be adjusted in real-time, added option to disable the vertex merger for vertexes with equal coordinates. thx emdek for help and adequate discussion of materials tab. :)
Image
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Models by MaNGusT (AR)

Post by NoQ »

Who? and why? removed yellow sandy mist from the game?
+1, this happened quite a long time ago, and i still wonder why. Sky is there, but the fog is black or absent (not sure)
Post Reply