Page 46 of 53

Re: Models by MaNGusT (AR)

Posted: 01 Jan 2015, 16:34
by Jorzi
Alternatively, I could just take a look at our cusom shader code, it is possible it has some peculiarities.
Also, I disagree with you on some points, I think an ambient component is very necessary, otherwise all the shadowed areas will be entirely black. On the other hand, with the current shadow system that darkens everything equally, this might actually look better in some cases.

Re: Models by MaNGusT (AR)

Posted: 01 Jan 2015, 16:43
by MaNGusT
Jorzi wrote:Also, I disagree with you on some points, I think an ambient component is very necessary, otherwise all the shadowed areas will be entirely black.
Have you tried the materials line I suggested to test? Just add it to the heavy cannon model(easy to see difference) and look.
I think the conclusion will be that a diffuse texture is too dark. :) But then, when you will rise up the brightness of texture, you will notice that a model looks differently and shines much better that makes details of normal map be more noticeable.
And I didn't say that the ambient component is unnecessary, I said we have wrong light formula where models self-illumination is set 1 while it have to be 0. I just suggested a simple fix via materials line and increasing brightness of diffuse textures to normal values.
I think I should show the difference.

edit: default dx shader, brightness of diffuse texture is normal
truck.png
self-illumination is 0
truck1.png
self-illumination is 100%, that's how it looks in wz till i decrease the diffuse map brightness and then it looks acceptable but still has a wrong light's transition on a normal map
P.S. about materials line, I think it should be reverted only because it has the shininess option that allows us to show eyes from what material a model consists of.

Re: Models by MaNGusT (AR)

Posted: 01 Jan 2015, 23:31
by Jorzi
I tried the material option you suggested, and as I assumed the shadow part was completely black. This has exactly the same effect as removing the ambient in the fragment shader. It did bring out the specular highlights much better, of course, but that is only because the current ambient setting is so bright it washes out the colors reducing contrast.
Ambient light is, as you say, mathematically similar to self-illumination, but it can be physically motivated by the fact that there's bounce light everywhere, and it makes the approximation that this bounce light is equally bright everywhere (which is extremely crude, but cheap to calculate). A much better approximation is of course to calculate ambient occlusion, but this is so expensive it has to be done in screen space as a post effect. This is one of the reasons why we bake the ambient occlusion into the texture to darken it. Unfortunately because it's part of the texture it darkens the direct light as well, meaning the contrast will again be reduced.
Another interesting solution would of course be the usage of an environment map (aka image based lighting).

My suggestion for a solution to this problem: Unless the ambient light color of the game can be edited I will just reduce the ambient color by introducing a factor 0.5 to it. I will also make a request to the devs to either reduce the ambient level of the game or expose it to the modders.

Re: Models by MaNGusT (AR)

Posted: 02 Jan 2015, 11:02
by MaNGusT
Jorzi wrote:My suggestion for a solution to this problem: Unless the ambient light color of the game can be edited I will just reduce the ambient color by introducing a factor 0.5 to it. I will also make a request to the devs to either reduce the ambient level of the game or expose it to the modders.
1) gl_FrontLightModelProduct.sceneColor = gl_FrontMaterial.emission + gl_FrontMaterial.ambient * gl_LightModel.ambient

Code: Select all

vec4 light = (gl_FrontLightModelProduct.sceneColor * gl_FrontMaterial.ambient) + (gl_LightSource[0].ambient * gl_FrontMaterial.ambient);
no need to multiply by gl_FrontMaterial.ambient again. This makes no sense anyway, but still a bit wrong.

2) We bake AO maps and multiply them into diffuse maps. So we already have ambient light calculated. So, logically we need to multiply overall ambient light calculations by a diffuse map factor instead of custom factors you put "there and here". I just want to say that we should take the strange of ambient light from a diffuse map. :) Another thing is that we made diffuse maps according to wrong light calculation(darkened) and then some of them, if not all, have to be revamped.

3) Btw, why do we still use the phong light while the blinn-phong gives much smoother results? :hmm:

Re: Models by MaNGusT (AR)

Posted: 02 Jan 2015, 12:07
by Jorzi
1)Yes, I don't know were this artifact comes from, I tried removing the whole "sceneColor" term and it did nothing, so we can probably leave it out.

2)The AO map is normalized into the [0,1] space and only tells how much the ambient term should be reduced due to occluding geometry. Since it's multiplied, it still needs an additive base level to exist.

Ideally, the ambient and sunlight parameters should be part of the map tileset specification. This way, we could give arizona a strong orange/yellow sun and a dark purple ambient, while rockies would have more of a yellow/turqoise theme and urban would have less contrast with a desaturated brown ambient. (Note that since we're talking about lights, the colours would always be fairly subtle)

3) Ah yes, I forgot about that.

Re: Models by MaNGusT (AR)

Posted: 02 Jan 2015, 12:57
by MaNGusT
Jorzi wrote:2)The AO map is normalized into the [0,1] space and only tells how much the ambient term should be reduced due to occluding geometry. Since it's multiplied, it still needs an additive base level to exist.

Code: Select all

	colour = texture2D(Texture0, gl_TexCoord[0].st);
	vec4 light = ((gl_FrontLightModelProduct.sceneColor) + (gl_LightSource[0].ambient * gl_FrontMaterial.ambient)) * colour * 1.5;
Same as yours 0.5 factor but adds more contrast.
1)Yes, I don't know were this artifact comes from, I tried removing the whole "sceneColor" term and it did nothing, so we can probably leave it out.
Artifacts come from shadows. Switching them off and using the fix I posted above gives nice result. If you talk about fully black parts...

edit: just upload it here for endless use.
ARMaNGusT.png
ARMaNGusT.png (17.64 KiB) Viewed 7129 times
[/size]

Re: Models by MaNGusT (AR)

Posted: 02 Jan 2015, 23:17
by Jorzi
With "artifact" I meant "(gl_FrontLightModelProduct.sceneColor * gl_FrontMaterial.ambient)". I think we can safely delete that term since I don't see any difference without it and it doesn't seem to be part of our preferred lighting model.

Re: Models by MaNGusT (AR)

Posted: 06 Jan 2015, 22:30
by nick87720z
Congratulating with New Year. I looked to new lancer model from there, and found, that 4 barrels is not a mistake. Imho, it's expected to have 4 missiles. Probably either weaker or with longer reloading to keep old balance. What do others think about that?

Re: Models by MaNGusT (AR)

Posted: 07 Jan 2015, 02:27
by MaNGusT
nick87720z wrote:Congratulating with New Year. I looked to new lancer model from there, and found, that 4 barrels is not a mistake. Imho, it's expected to have 4 missiles. Probably either weaker or with longer reloading to keep old balance. What do others think about that?
Thx, u 2. About lancer I think that it could be redesigned to shoot 4 missiles but with less damage.

Btw, a new mortar model. This design is about two years old, don't like much but it was almost ready, so I decided to leave it for now. I can't come up with something better now anyway, may be later.
mort.jpg
there is a small bug with textured tubes at right part of the model. could not fix it. and it isn't noticeable in game.

Re: Models by MaNGusT (AR)

Posted: 10 Jan 2015, 21:20
by MaNGusT
I was trying to make an effect for vtol's engines and it doesn't want to use the pie flag to face the camera. Is it hardcoded to not to face the camera?

Re: Models by MaNGusT (AR)

Posted: 15 Jan 2015, 14:08
by MaNGusT
Also, about vtol's effects. The explosion effect of the phosphor and same fire bombs is bugged. I mean that its animation flickers like it skips frames while the blow effect itself works well with ground units i.e mortar or hellstorm. They all use same fxlexp.pie.

Btw, the cobra's lowpoly model is almost finished. Can't choose, which one of green parts does fit better?
cobra2.png
has the size of original model
cobra1.png
a bit stretched down and forward to cross the body

Re: Models by MaNGusT (AR)

Posted: 15 Jan 2015, 23:51
by Jorzi
Pretty cool :)
I always thought of the green thing as a barrel/canister, but now that I look at it it could also be a tarp / camo netting that's been rolled up.

Re: Models by MaNGusT (AR)

Posted: 16 Jan 2015, 08:19
by MaNGusT
Jorzi wrote:I always thought of the green thing as a barrel/canister, but now that I look at it it could also be a tarp / camo netting that's been rolled up.
My thoughts are that it's a mechanism for a gas-output system or a visible part of radiator or something like that. Corporal Punishment could help us here with his sketches and knowledge. Is he still around?

Re: Models by MaNGusT (AR)

Posted: 16 Jan 2015, 16:03
by Corporal Punishment
The green part, well... for quite a while I just imagined that meant a external fuel tank, basically a barrel, as russian tank designs from the T-54 onwards had. But now that I think of it this does not make much sense. If it would be a external tank you'd think The Projecct had them on all of their designs. A smilar line of thought applies to the idea it was a tarp or other rolled-up cover. If the origial designers intended to show such details you'd wonder why the Cobra is the only body in the game to have one. So I think that the green part represents a integral part of the Cobra design.
Warzone takes lots of inspiration from WW2 technology. The twin MG turret is taken fom a german Panzer II, the Panther body is a sowjet T-37/A amphbious scout tank, the sensor is a german W├╝rzburg Radar, the Retribution is a sowjet T-34, the mini-rocket array comes from a german Panzerwerfer 42.
I checked some information on period tank designs. And what do you know - the Cobra looks almost exactly like a italian built meduim tank, the Fiat M16/43, only the aft section is shorter. Now, in place of the green bit on the cobra the M16/43 had a prominent exhaust system. A few photoprahs can be seen here: http://utenti.quipo.it/mc68/Italtank/celere.htm (bottom of page)

Re: Models by MaNGusT (AR)

Posted: 17 Jan 2015, 11:21
by Jorzi
Exhaust system is an interesting guess, although it doesn't really explain the bright green color (although I guess the best explanation is the limited palette of the original artists).