Log in

View Full Version : Lightning prob in SH4


CaptainCox
08-02-07, 04:26 AM
http://img75.imageshack.us/img75/4813/flashboatol7.jpg

As I think you guys might have a trick or 2 up your sleeves I decided to post a plea here ;)

Over at the SH4 mod forum we are trying to figure why the lightning is not showing up as it should in bad weather. We can now see it but only when its really dark, and it only seem to emanate from one spot etc.
Thread Link:
http://www.subsim.com/radioroom/showthread.php?t=115503

I have been searching this forum for a lead but have not really found any hard facts as of yet. Maybe one of you guys remember or did a tweak for this stuff in GWX for example or simply looked at enhancing the lightning for SH3 and could give us some hints as to what to look for.

We found that there are settings for "Lightning" in the
Scene.dat
Materials.dat
Particles.dat

But are there any other .dat that might control this stuff?

Thanks and Cheers!

danlisa
08-02-07, 04:59 AM
Those 3 files do control the lightning.

I think you need to look elsewhere, maybe the Environment settings. I reckon the improved environmental effects in SH4 are affecting the lightning. What do they look like with all the filters off?

Also, don't forget that the files are DDS and as such, the further away the lightning is rendered the game will use the reduced version (are they dds is SH4?).

CaptainCox
08-02-07, 05:09 AM
Surprisingly they are TGA's. One of the 1st thing i looked at.
Environment settings might be a lead. Did not yet check that stuff. Will have a look. Thanks!

Dowly
08-02-07, 07:32 AM
Just a though, check if the alpha channel of the lighting .tga is messed up. If it's solid white or close to solid white, it there's no problem. But if it's very very very transparent white that you can barely see, then that's the problem.

DivingDuck
08-02-07, 07:45 AM
Moin CC,

have you checked the selfillumination bytes in the tga´s properties section?

Regards,
DD

CaptainCox
08-02-07, 10:34 AM
Cheers guys, just home here and will start digging:up:

CaptainCox
08-02-07, 12:05 PM
Moin CC,

have you checked the selfillumination bytes in the tga´s properties section?

Regards,
DD
Where would i find that?
In the TGA itself or do you mean in the particles.dat or...

Cheers!

skwasjer
08-02-07, 01:11 PM
I think DD means some bytes part of the self illumination chunk, or material chunk that references the tga? My tool does not display them atm though...

CaptainCox
08-02-07, 01:23 PM
Ahhh, cheers. will digg :lol:

TheDarkWraith
08-02-07, 01:49 PM
I took apart the funnel_smoke used in particles.dat and found that it used the material DE6E9B8F8621FB6C for the smoke. I found this in the materials.dat and here's the entry before the tga file that's packed in:

02 00 00 00 00 00 00 00 36 00 00 00 DE 6E 9B 8F
86 21 FB 6C 23 FF FF FF 00 E5 E5 E5 00 3F 00 00
1D 85 00 00 2C 00 01 00 E8 91 06 40 00 00 00 00
53 6D 6F 6B 65 5F 76 6F 6C 75 6D 30 32 2E 74 67
61 00

Is the highlighted yellow the self illumination bytes? If so, how do you read this? If it's not, what is this and how do you read it?


EDIT: Stupid me! I knew what the second highlighted text was! I have removed it now. So the question remains what is the above highlighted text?

DD, help! What are these highlighted things? I can't make sense of it.

Not trying to highjack this thread but since self illumination bytes were brought up I thought I'd ask.


If you'd like to see what Visio can do then look here:

http://rapidshare.com/files/46583793/funnel_smoke_visio.jpg.html

The text is small because the breakdown of funnel_smoke was big! It's just to give you an idea of what you can do with it.

CaptainCox
08-02-07, 03:03 PM
Not Hijacking at all I find it very interesting. Keep it up ;)

leovampire
08-02-07, 03:18 PM
somthing about transparency for each of the lightnings could this also be part of the problem?

TheDarkWraith
08-02-07, 04:07 PM
Ok, partial mystery solved on the highlighted text. Using S3D (great app though it has many problems still!) I found out what some are and it breaks down to the following:

02 00 00 00 00 00 00 00 36 00 00 00 DE 6E 9B 8F
86 21 FB 6C 23 FF FF FF 00 E5 E5 E5 00 3F 00 00
1D 85 00 00 2C 00 01 00 E8 91 06 40 00 00 00 00
53 6D 6F 6B 65 5F 76 6F 6C 75 6D 30 32 2E 74 67
61 00

0x23 = opacity (35d)
0xFFFFFF = Diffuse (255d,255d,255d)
0x00 = ?? (Diffuse strength?? - would make sense since it follows Diffuse)
0xE5E5E5 = Specular (229d,229d,229d)
0x00 = ?? (Specular strength?? - would make sense since it follows Specular)
0x3F = Glossiness
0x00000000 = should be the marker for end of data and next to follow is the tag name

rest of yellow highlight still a mystery............DD????
Could these be the self illumination bytes?

CaptainCox
08-02-07, 04:14 PM
Brilliant Racerboy! Will have to look in the morn as its bedtime here :(
Will dig in with a hexed in the morn.

skwasjer
08-02-07, 05:34 PM
02 00 00 00 00 00 00 00 36 00 00 00 DE 6E 9B 8F
86 21 FB 6C 23 FF FF FF 00 E5 E5 E5 00 3F 00 00
1D 85 00 00 2C 00 01 00 E8 91 06 40 00 00 00 00
53 6D 6F 6B 65 5F 76 6F 6C 75 6D 30 32 2E 74 67
61 00

Red is the size of the TGA file.
Blue control the self illuminance according to DD. How, I don't know...

The rest I don't know yet... If I do, I can add it to my tool...

DivingDuck
08-03-07, 03:30 AM
Moin,

http://img457.imageshack.us/img457/889/hexeditinglumi002eg3.jpg

increase the highlighted value to increase self illumination.
No time for further info, sorry. Let´s hope, my wife doesn´t catch me browsing the forum. ;) We´re leaving in a few minutes for vacation. If needed, I´ll give you more detailed info when back from Norway.

Regards,
DD

CaptainCox
08-03-07, 03:51 AM
DD, you are just to much... how the hell do you do this stuff ;)
And "Ha de gott da in Norge" :)

TheDarkWraith
08-03-07, 05:03 PM
Moin,

http://img457.imageshack.us/img457/889/hexeditinglumi002eg3.jpg

increase the highlighted value to increase self illumination.
No time for further info, sorry. Let´s hope, my wife doesn´t catch me browsing the forum. ;) We´re leaving in a few minutes for vacation. If needed, I´ll give you more detailed info when back from Norway.

Regards,
DD

It's needed!! Please explain what each byte does in this whole 02 node you have highlighted green. Inquiring minds would like to know! We would like to hear it from you, Yoda!! :yep:

leovampire
08-21-07, 07:03 PM
materials file and it controls the reflections as well. So when those are ajusted the lightning shows up much more. But getting ti work right in a single mission is easy just getting them to work in the campaign layers is the nightmare.

http://static.filefront.com/images/personal/l/leovampire/93141/ohaflkwjgi.thumb250.jpg (http://gallery.filefront.com/leovampire//724951/)http://static.filefront.com/images/personal/l/leovampire/93141/devvnkkieh.thumb250.jpg (http://gallery.filefront.com/leovampire//724845/)http://static.filefront.com/images/personal/l/leovampire/93141/sgpkutzgrw.thumb250.jpg (http://gallery.filefront.com/leovampire//724966/)

but it refuses to work in the campaign layers only in a single mission so far. Got the clouds to light up the water great reflections but now at a stand still.