Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3   Go Down

Author Topic: Problem with object lighting  (Read 9220 times)

0 Members and 3 Guests are viewing this topic.

vpmedia

  • Modder
  • member
  • Offline Offline
  • Posts: 6652
  • www.vpmedia.hu/il2
    • VPMEDIA SKINS
Problem with object lighting
« on: April 05, 2012, 02:46:11 AM »

started to notice this since DBW I guess, from the side  angle objects looks (1st pic) ok but from different angle it  suddenly becomes 100% white, its way too shiny, too much lighting (2nd pic) + its very unrealistic because I was never blinded in real life by a fuel tank...

how do i fix it?

Dakpilot

  • member
  • Offline Offline
  • Posts: 480
Re: Problem with object lightning
« Reply #1 on: April 05, 2012, 03:04:07 AM »

Have also noticed this with a few things, also some A/C and vehicles, more than before, so you are not alone.

Also some aircraft just do not shine, try a Stuka, even with planeshine turned up, and carsmarsters light and a high quality skin it seems to remain very matte, in the inverse of the shiny tank maybe there is something there?
Logged

vpmedia

  • Modder
  • member
  • Offline Offline
  • Posts: 6652
  • www.vpmedia.hu/il2
    • VPMEDIA SKINS
Re: Problem with object lightning
« Reply #2 on: April 05, 2012, 11:21:48 AM »

Thanks, its more complicated than I thought...I guess I can live with a bit of shine :)
I was hoping for a global parameter in some file like landlight.mat just for objects.

vpmedia

  • Modder
  • member
  • Offline Offline
  • Posts: 6652
  • www.vpmedia.hu/il2
    • VPMEDIA SKINS
Re: Problem with object lightning
« Reply #3 on: April 05, 2012, 11:14:48 PM »

Tthanks a lot mate!

It was the parameter "SpecularPow 16" in the file tex1_metall_lod0.mat

Default for planes is 4 or 5, same for objects I think, everything higher will be resulted in a burnt out picture (too much white light), so now all i need to do is extract every mat look for that string and batch replace it with specularpow 4.

Cheers
Istvan

vpmedia

  • Modder
  • member
  • Offline Offline
  • Posts: 6652
  • www.vpmedia.hu/il2
    • VPMEDIA SKINS
Re: Problem with object lightning
« Reply #4 on: April 05, 2012, 11:57:44 PM »

after further checks the problem appears only with Egypt,Tow,Wflyer objects + some weapons

wflyer object meshes (trucks, tanks and artillery) also have a tendency to disappear ingame...do you know the reason for that?

just champi

  • Modder
  • member
  • Offline Offline
  • Posts: 608
Re: Problem with object lightning
« Reply #5 on: April 06, 2012, 01:16:27 AM »

Quote
It was the parameter "SpecularPow 16" in the file tex1_metall_lod0.mat

Default for planes is 4 or 5, same for objects I think, everything higher will be resulted in a burnt out picture (too much white light), so now all i need to do is extract every mat look for that string and batch replace it with specularpow 4.

I can't back up this with scientific data, but after being tinkering with materials a little in the past, I found that in IL2, Specular value refers to how much shiny is the specular spot in a surface, so a higher value gives a brighter spot, and viceversa.
SpecularPow value refers to how big is that specular spot in the surface, so a higher value gives a much more spread over the surface specular spot and lower values a much more concentrated spot.
 As the color of specular spot is close to white, when the value of SpecularPow is high enough, the white colour, covers almost all the surface, and combined with the shinyness of the Specular value is what gives this burnout look to objects (as it shows in your lower picture)
Also I believe that SpecularPow should be given only in power of two values. (so maybe better not to use 5 as value)
In short: Specular-> brightness of the specular spot
SpecularPow-> size of the specular spot (power of two values)
hope this help you to better understand.
Logged

vpmedia

  • Modder
  • member
  • Offline Offline
  • Posts: 6652
  • www.vpmedia.hu/il2
    • VPMEDIA SKINS
Re: Problem with object lightning
« Reply #6 on: April 06, 2012, 01:36:38 AM »

champi dont forget I released a 'no planeshine mod' not so long ago ( https://www.sas1946.com/main/index.php/topic,20788.0.html ), that would assue some knowledge of the issue i think ;)

after checking the tow fueltank I've found that the fuel tanks body has its 3d lighting turned off and that the top metal part has too much of it and they have different mat files (tex1_lod0.mat and tex1_metall_lod0.mat) - same problem exist with the buildings so they look flat without 3d lighting

conclusion: the settings need to be corrected in all ToW mat files
whoever imported them wasnt aware of the things just champi wrote above

vpmedia

  • Modder
  • member
  • Offline Offline
  • Posts: 6652
  • www.vpmedia.hu/il2
    • VPMEDIA SKINS
Re: Problem with object lightning
« Reply #7 on: April 06, 2012, 01:45:08 AM »

after testing I think that Specular Pow is the amount of white being added when sunlight is directly reflected back to your eye  and Specular is the amount of average 3d lighting because I cant seem to change size of reflective area

so specular 0.4 means 3d lighting by increasing lightness of colors by 40%

specular pow 4 means multiple specular 4 times or increase pixel lightness (dunno which of the two) when sun angle is at 90°


I've found that these stock values work best:

Code: [Select]
  Ambient 1.0
  Diffuse 1.0
  Specular 0.4
  SpecularPow 4

just champi

  • Modder
  • member
  • Offline Offline
  • Posts: 608
Re: Problem with object lightning
« Reply #8 on: April 06, 2012, 02:41:58 AM »

my apologies vpmedia, I hope I didn't sound to you like a smart ass.
 I was still a bit asleep and with my brain off, but I will take the oportunity to thank you for your planeshine mod that I've being enjoying with great pleasure so far.
Seemed to remember that I took some screenshots back then, but didn't find any. I'll try to get back to it when I can, but probably will just confirm your findings. I find the lightning issue insteresting anyway, so, thanks for the correction.
Logged

vpmedia

  • Modder
  • member
  • Offline Offline
  • Posts: 6652
  • www.vpmedia.hu/il2
    • VPMEDIA SKINS
Re: Problem with object lightning
« Reply #9 on: April 07, 2012, 12:31:35 AM »

You were right Boomer, none of the ToW objects had proper 3d lighting.
These 150 objets use more almost a thousand mat files so correcting them is a huge task in itself.
Do you need the files if I finished them?

vpmedia

  • Modder
  • member
  • Offline Offline
  • Posts: 6652
  • www.vpmedia.hu/il2
    • VPMEDIA SKINS
Re: Problem with object lightning
« Reply #10 on: April 07, 2012, 12:37:38 AM »

my apologies vpmedia, I hope I didn't sound to you like a smart ass.
 I was still a bit asleep and with my brain off, but I will take the oportunity to thank you for your planeshine mod that I've being enjoying with great pleasure so far.
Seemed to remember that I took some screenshots back then, but didn't find any. I'll try to get back to it when I can, but probably will just confirm your findings. I find the lightning issue insteresting anyway, so, thanks for the correction.

I'm not a too sensitive person, so I took no offense plus I dont know everything about this game so all info is welcomed!

vpmedia

  • Modder
  • member
  • Offline Offline
  • Posts: 6652
  • www.vpmedia.hu/il2
    • VPMEDIA SKINS
Re: Problem with object lightning
« Reply #11 on: April 07, 2012, 02:32:59 AM »

I was doing further checks and the same problem exist with "New Vehicles Package" in this pack
https://www.sas1946.com/main/index.php/topic,19921.0.html
they often have specular pow 32, stock is 4
also found similar problem with wflyer vehicles....wrong values seem to have spread in all categories

...and this all started by me wanting to correct a weird looking fuel tank  :'(
Pages: [1] 2 3   Go Up
 

Page created in 0.064 seconds with 27 queries.