Models by MaNGusT (AR)

Improving the artwork in Warzone2100 - not for mod discussions
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

have Just rebaked old normal map to see how it looks in wmit. don't look at bolts, they are screwed!
old
old
new
new
Image
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Models by MaNGusT (AR)

Post by Jorzi »

The old one is clearly more accurate, is this with or without my shader changes?
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:The old one is clearly more accurate, is this with or without my shader changes?
with :-)
I think the angle less than 60* is acceptable for hard edges in smooth groups, 90* produce too much shadow distortion.
Image
Searge-Major
Trained
Trained
Posts: 182
Joined: 10 Sep 2011, 03:36
Location: Great Southern region, Western Australia

Re: Models by MaNGusT (AR)

Post by Searge-Major »

Forgive me for not going through all these posts to find out, but what is it? :shock:

Don't get me wrong, I am seriously impressed, I just can't tell if it's meant to be a vehicle body, or something weird that I haven't heard of before. O_o
Whatever it is, the detail you've put in is amazing. :D
I fully realise my input is just another drop in the proverbial bucket. It is my goal to make each drop count.
User avatar
driver4
Trained
Trained
Posts: 89
Joined: 27 Apr 2011, 09:01

Re: Models by MaNGusT (AR)

Post by driver4 »

Searge-Major wrote:Forgive me for not going through all these posts to find out, but what is it? :shock:
A viper body model.
Image
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

lastest http://dl.dropbox.com/u/14374302/wmit/w ... efa11e.zip

p.s. normals work strange on my ati card
Image
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Models by MaNGusT (AR)

Post by Jorzi »

Tried your link and normalmaps work strange for me too. I checked the shader and the only change I could see was that the tbn matrix was calculated in the fragment shader instead. Maybe this screws up something since the axes get renormalized for each pixel. Tried messing with the shader, uncommenting he old method and commenting out the new, and it's still screwed...
Last edited by Jorzi on 29 Feb 2012, 13:45, edited 1 time in total.
ImageImage
-insert deep philosophical statement here-
i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Models by MaNGusT (AR)

Post by i-NoD »

Jorzi wrote:Tried your link and normalmaps work strange for me too. I checked the shader and the only change I could see was that the tbn matrix was calculated in the fragment shader instead. Maybe this screws up something since the axes get renormalized for each pixel.
Its just a workaround for tests that slipped in this build, since crappy intel drivers can't correctly interpolate mat3 from vertex-to-fragment on my rig :(
On a second thought tnb vectors shouldn't be renormalized in fragment shader...
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Models by MaNGusT (AR)

Post by Jorzi »

Tried changing stuff around and whatever I do it's still not going back to the old behaviour... I'll try replacing the shaders with those from the old build...
ImageImage
-insert deep philosophical statement here-
i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Models by MaNGusT (AR)

Post by i-NoD »

Jorzi wrote:Tried changing stuff around and whatever I do it's still not going back to the old behaviour... I'll try replacing the shaders with those from the old build...
Nothing changed in code logic, so it something in shader. The only useless thing I can think of is gl_NormalMatrix multiplication for tangent in some previous builds...
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Models by MaNGusT (AR)

Post by Jorzi »

I replaced the new shaders with the old and it worked :hmm:
One thing I noticed was that "#pragma debug(on)" was commented out in the new shader.
What does that one do anyway?
ImageImage
-insert deep philosophical statement here-
i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Models by MaNGusT (AR)

Post by i-NoD »

Jorzi wrote:I replaced the new shaders with the old and it worked :hmm:
One thing I noticed was that "#pragma debug(on)" was commented out in the new shader.
What does that one do anyway?
Uhh.. Which one is that 'old'? There are dozens in my scrapyard... :|
GLSL specs 1.20 wrote:The debug pragma
#pragma debug(on)
#pragma debug(off)
can be used to enable compiling and annotating a shader with debug information, so that it can be used
with a debugger. It can only be used outside function definitions. By default, debug is turned off.
Gives nothing if you aren't using a special shader debugger.
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

i-NoD wrote: Uhh.. Which one is that 'old'? There are dozens in my scrapyard... :|
wmit-win32_tangent.zip
Image
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Models by MaNGusT (AR)

Post by Jorzi »

Ok, after some fiddling I found the errors.
-In vertex shader, tangent should be transformed by the normal matrix.
-t, b and n shouldn't be normalized in fragment shader when creating the matrix
-normalmap texture shouldn't be normalized before use

I attached a zip with working shaders, preserving the "export t, b and n as vectors" change ;)
Attachments
correct_shaders.zip
(1.64 KiB) Downloaded 210 times
ImageImage
-insert deep philosophical statement here-
i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Models by MaNGusT (AR)

Post by i-NoD »

Here is WMIT with 'correct' shader and wzm file duplication fix.

Mirroring now works fine, provided that you'll supply correct green channel in normal map. Vertex shader could be tweaked with -tangent.w in bitangent calculation to avoid mass nm edit :)

Material GUI isn working yet, but values are saved/loaded in wzm format, so you can tweak them by hand (order: EMISSIVE, AMBIENT, DIFFUSE, SPECULAR and SHININESS).
Post Reply