PDA

View Full Version : [TEC] Question about lightning


leovampire
05-26-07, 09:57 PM
I havn't seen lightning ing the game but see it is in the game files and that there is a tweek file for it in Mini Tweeker when it says Height 20 do they mean 20meters? Is what the game is set for?

If that is the case is this why we never see lightning in the game?

Dave

kapitan_zur_see
07-27-07, 07:37 PM
yeah, i found that too. I believe i tried quite about everything that was doable to mod the lightings back. Without success. Did you also looked for the textures? there are a set of 4 .TGA textures in Tnormal and Tlowres named lightning0x_add.tga (i tried removing this "_add" thing also). they're no RGB without Alpha channel. Since SH4 appears to more or so only use .DDS files (with RGB + Alpha), i converted those set in dds ,creating an alpha channel like they're made for those kind of textures in SH' (took exemple of things like foam textures etc.). It didn't work, no matter using dds or tga with rgb+alpha, alpha only, inverting greyscale etc. Also tried in conjunction with modding scene.dat. Still no luck, so at that point, i have strong belief it has been removed hard-coded way...! Give it a try though

leovampire
07-28-07, 01:43 AM
about lightning but it was a long time ago and I don't remember where I guess I will have to look for it again and see what can be done.

Fearless
07-28-07, 06:19 AM
where is that file located and what is the tweakfile called as I don't have it in my mini tweaker?

switch.dota
07-28-07, 06:24 AM
I don't know if it was a graphical glitch but I did experience lightning. Wierd thing is that it only happened when swiotching views. And no, it wasn't a random artifact, it was a rather realistic looking arced lightning.

kapitan_zur_see
07-28-07, 06:54 AM
I don't know if it was a graphical glitch but I did experience lightning. Wierd thing is that it only happened when swiotching views. And no, it wasn't a random artifact, it was a rather realistic looking arced lightning. mmm... i didn't but could make sense as when i changed the lightning part values in scene.dat with minitweaker to match those of SH3, it made thunder to occurs apparently far closer from the sub, that is, whenever i was switching view from interior to freecam or bridge a far bigger thunder sound could be heard but only one time right after switching. Still i didn't saw a lightning but it may appear just once and in my back. Maybe something is interfering with lightnings graphics just after you switch to outside view as we know that some of the effects SH4 is using are triggered not instantly but rather few seconds after you switch view. Could you make any further testing? might be hardware related (like sun bloom not occuring on ATI's cards).

CaptainCox
07-28-07, 07:10 AM
Had a quick look at the scene.dat in hexed
Debug..P...EffectNames.....@Lightning01.....@Light ning02.....@Lightning03.....@Lightning04.....Heigh t....A....MinDistance....B....MaxDistance...4C.... MinTime... A....MaxTime.. It is there. But as kapitan_zur_see said...could be a graphic glitch or a bug plain and simple. I wonder if elanaiba could confirm if the lightning actually works or not.

kapitan_zur_see
07-28-07, 07:40 AM
Had a quick look at the scene.dat in hexed
Debug..P...EffectNames.....@Lightning01.....@Light ning02.....@Lightning03.....@Lightning04.....Heigh t....A....MinDistance....B....MaxDistance...4C.... MinTime... A....MaxTime.. It is there. But as kapitan_zur_see said...could be a graphic glitch or a bug plain and simple. I wonder if enalabia could confirm if the lightning actually works or not. Who's that enalabia?? some dev that can be reached?

CaptainCox
07-28-07, 07:42 AM
Yea, he is one of the Dev's. He prowls SS once in a while ;)
AND MY BAD! its elanaiba !!!!

kapitan_zur_see
07-28-07, 02:12 PM
mmm... i'll try to catch on with this guy :hmm: might help a lot cause this thing, while not essential at all, is frustrating. Would help, since a storm in SH4 don't look very much like one! it's a "calm" storm :sunny:

Fearless
07-28-07, 04:43 PM
Had a quick look at the scene.dat in hexed
Debug..P...EffectNames.....@Lightning01.....@Light ning02.....@Lightning03.....@Lightning04.....Heigh t....A....MinDistance....B....MaxDistance...4C.... MinTime... A....MaxTime.. It is there. But as kapitan_zur_see said...could be a graphic glitch or a bug plain and simple. I wonder if elanaiba could confirm if the lightning actually works or not.

CC did you copy and paste the Debug text above or did u type it in? Reason: @Lightning02 not @Light ning02 same with height shown as heigh t

leovampire
07-28-07, 06:12 PM
edit the scene file because some things are interlinked and you can throw off all the reflection and lighting effects in the entire game found that out the hard way and had to start with a whole new scene file all over again!

leovampire
07-28-07, 08:45 PM
the particles files in library also help to control lightning effects so if someone wants to take a look at that and compair them to the shIII particle files maybe they can find the problem. Someone who is a good hex editor

Bando
07-28-07, 08:53 PM
Don't know why, but the name Anvart keeps popping up.

Maybe because he's called the Hexmaster.........:up:

You may give him a PM :know:

kapitan_zur_see
07-28-07, 10:00 PM
the particles files in library also help to control lightning effects so if someone wants to take a look at that and compair them to the shIII particle files maybe they can find the problem. Someone who is a good hex editor

mmm...:hmm: yes indeed you're right, there's lots of modifiers for each of the 4 lightnings. Values varies slightly from the sh3 particles.dat. I'm going to have a closer look tomorrow, might be important. As particles.dat don't have it's minitweaker counterpart, i'll have to go hex editing, wich is less comfy ;)

I'll keep in touch

Canonicus
07-28-07, 10:21 PM
the particles files in library also help to control lightning effects so if someone wants to take a look at that and compair them to the shIII particle files maybe they can find the problem. Someone who is a good hex editor

mmm...:hmm: yes indeed you're right, there's lots of modifiers for each of the 4 lightnings. Values varies slightly from the sh3 particles.dat. I'm going to have a closer look tomorrow, might be important. As particles.dat don't have it's minitweaker counterpart, i'll have to go hex editing, wich is less comfy ;)

I'll keep in touch

Hey mates...
Here's a Particles.dat txt ready for MiniTweaker you might be able to make use of...part of a WIP for modified funnel smoke that Captain Cox and other's were foolin around with.

Download link:
http://files.filefront.com/funnel+smoke+SH4rar/;7995810;;/fileinfo.html (http://files.filefront.com/funnel+smoke+SH4rar/;7995810;;/fileinfo.html)

Hope this can be of use.

Cheers!

leovampire
07-29-07, 02:29 AM
It says to refer to the particles generator for each of the lightnings listed. And both the DAT file and the DSD file for Particles list all of the parts to lightning including the flash stage. But I can't make heads or tails out of what the difference is compaired to the SHIII files.

kapitan_zur_see
07-29-07, 06:08 AM
It says to refer to the particles generator for each of the lightnings listed. And both the DAT file and the DSD file for Particles list all of the parts to lightning including the flash stage. But I can't make heads or tails out of what the difference is compaired to the SHIII files.

Just did a quick check... As for the particle minitweaker, i'll stay hex editing. Why? i can't be sure that every modifiers are included in this one. Hex is fine with those files, it's quite easy to spot every modifiers. At first, i'll try changing every modified values to match those of SH3. But having looked though very briefly, there don't seems to be values that may clearly explain why lightnings don't show up...

wovik
07-29-07, 07:19 AM
There is mention of Lightning in the EnvSim.act file in the main directory. Maybe this has something to do with it? I haven't checked the other *.act files yet to see if they mention lightning.

Jack

kapitan_zur_see
07-29-07, 01:56 PM
There is mention of Lightning in the EnvSim.act file in the main directory. Maybe this has something to do with it? I haven't checked the other *.act files yet to see if they mention lightning.

Jack
thanks wovik ;) Damn! this is pure SH3 - SH4 dev style... :smug: Modifiers for one thing are often scattered everywhere in unsuspected files :damn: Couldn't they just centralize things...lol

leovampire
07-29-07, 03:56 PM
seems to explain exatly what the values do in the adjustment for lightning in the scene file.
Hight is max height where lightning is placed
Minimum distance from main camera
max distance from main camera
minimum time between strikes
and maximum time between strikes

kapitan_zur_see
07-29-07, 05:15 PM
seems to explain exatly what the values do in the adjustment for lightning in the scene file.
Hight is max height where lightning is placed
Minimum distance from main camera
max distance from main camera
minimum time between strikes
and maximum time between strikes

so seems to be completely redundant with scene.dat?

leovampire
07-29-07, 07:17 PM
as far as I can tell

wovik
07-30-07, 08:28 AM
In the EnvSim.act file, did you notice the part about Debug being "false"? To me it suggests that there is no lightning if debug=true. I really wonder if debug is off even when you change it in the main config file.
I don't know much about programming. I was hoping someone who does might figure this out.
I sure would like to see lightning to go along with the thunder!

CaptainCox
07-30-07, 03:03 PM
Somebody that is fluent with the Mission Editor, PLEASE DO! a Bad Weather mission so we can test this stuff PLEASE! . Personally I am to much of a n00b with the "ME" to even start something :p
CHEERS!

kapitan_zur_see
07-30-07, 06:10 PM
it's really simple, c'mon! you, one of the modders king not able to do that? :p:smug:
eh eh, just kidding ;) seriously, just launch editor, open an existing mission (i use single mission 11 Borneo convoy for example), and just go to mission>parameters, and set weather to heavy, add rain (not normally required for storm & thunder) and that's it :cool:.
OK, it changes your stock single missions, but then again, who uses single missions anyway...? ;)

So far, i'm back on track, and since i got a little time to kill, i'm going to have a look

kapitan_zur_see
07-30-07, 06:52 PM
OK, just did match values with SH3 in particles.dat = no effect so far.
By the way, in scene.dat > random wind & rain, did you know you could make the engine to render a given number of raindrops? stock is 2000, i turned to 1500, improved FPS! those of you guys with high end might not try to render more, igot a CTD doin it ;)

kapitan_zur_see
07-30-07, 07:41 PM
at last, things are evolving to some extent: Lightnings are
"back". Ok, don't be too enthusiastic!! :dead: lol I may now understand why they put debug mode on in scene.dat before the lightning section (do a search in hex: string "debug", that's the second one.)

The things is, there's actually flashes, yes... But very oddly it deploys only around the waterline of your sub and that's that (go figure! :damn:). In effect, you can see a kind of white halo around the waterline that flashes. Plus even more strangely, thunder sounds disappear... I think even the dev didn't figured how to possibly solved that one and so, they removed it. Sorry, can't do a screenshot, too quick or whatever reason prevent me to catch it

Still, we now have something to work on, but really, i just don't get it...
:know:

leovampire
07-30-07, 08:01 PM
in the lightning settings for scene

Hight is max height where lightning is placed
Minimum distance from main camera
max distance from main camera
minimum time between strikes
and maximum time between strikes

kapitan_zur_see
07-30-07, 09:02 PM
i did, somehow it doesn't work. Plus i don't get the effects back now, though it was the first time i saw that, it didn't showed up again and i'm forced to conclude: 3D card artifact :damn:. So i think i did put depug mode off (though i d'ont really understand this hex logic... why a boolean like this debug thing (can be true or false as devs say) has a value of P (50)??? shouldn't it be 0 or 1?

False alert then... This thing is killing me. I think i'm going to focus on other things. I think it's behind my competences

wovik
07-30-07, 11:22 PM
I now have lightning!

I changed the figures in scene.dat file and now I have real lightning bolts and flashes off the bridge.
Here are the settings I am using but I am still trying different values:

Height=10
MinDistance=2
MaxDistance=4

I didn't change the times. I am starting to believe the distances are in km as the bolt I captured appears to be at least around 2 km away (I am using Imperial in the setup, though). I probably need to put the height back to 20. Most were off my my rear starboard quarter even after I made a drastic course change.

I actually managed to capture a screen shot of a lightning bolt but I don't know how to post it.

I am using TM-1.4 and I changed the U-537 mission file to have an overcast sky. I also changed the time to 20:00 so I could be sure to see the lightning.
To change it just use Notepad and change:

Hour=20 (or any other time you want)

Clouds=2 (must be 2 to get thunder and lightning)

you don't need to change the wind or anything else.

If anyone comes up with ideal figures, please let us know.
I am going to have a very late dinner right now so won't be available for a while.

Jack

CaptainCox
07-30-07, 11:41 PM
WHAT! :rock: :rock: :rock:
MAN! this is 1st on my to do list, (actually have to go to the Vet with one of my Cats, but screw that :p )

To post a screenshot use for example

http://photobucket.com/
or
http://www.imageshack.us/

Make an account and simply upload, when done you will get a lot of options as to the format you can post etc.

Go for "URL LINK" in case of "Photobucket"
and "Direct link to image " in case of "Image Shack"

Then in the post window here look up topside, you see them icons?, click the one that looks like two mountain peeks with a little sun. You will get a "script prompt", paste your url from one of the sites and hit ok!

leovampire
07-30-07, 11:42 PM
but I don't see any lightning yet using your changes listed

wovik
07-31-07, 12:27 AM
http://img528.imageshack.us/img528/193/sh4lightningbf9.jpg

Here's the screenshot. Sorry for the poor quality. The lighning bolt was very bright on the real screen.

CaptainCox
07-31-07, 12:47 AM
@Leo regarding my latest PM, never mind the file I asked for, did it myself :p
I also can't see any lightning with those settings :( I hear thunder alright, but no lightning.

wovik
07-31-07, 01:24 AM
but I don't see any lightning yet using your changes listed

I think if you used a saved file it won't make the changes. That's why I always started the single mission each time. I also started by renaming the SH4 directory where the saves are. You can rename it to save your careers etc. That way it is like a new start and will make a new SH4 directory for saves.

I also wonder if the lightning is glued to the starting location as it diminished the further I went.

Oh yes, I have the 3 developing headings changed to No in the main.cfg file. I don't know if this makes a difference or not.

I had previously changed the angle in the objectview in the cameras.dat file to 20 so I could get a lot closer to the sub using th "<" and ">" keys. This makes the lightning look a lot closer to the sub than it is.

CaptainCox
07-31-07, 01:38 AM
@wovik, those settings in your earlier post are all the changes you have done, sure?
And do you have AA activated and what gracard do you run there?

Cheers!

wovik
07-31-07, 01:56 AM
@wovik, those settings in your earlier post are all the changes you have done, sure?
And do you have AA activated and what gracard do you run there?

Cheers!

I am using TM 1.4 but I have modified it to suit me.

I use an 8800GTS (640mb) graphic card.
AA at 8x
AF at 16x
AA gama correction - ON
AA transparency - Supersampling
Comfort texture clamp - use hardware
Force mipmaps - Trilinear
Texture filter quality - High Quality

In the options I use 1280x960, 75hz resolution.
I use the High setting then uncheck PPF, Light Glare, and Light shafts. And for testing I turn off the volumetric fog also.
see the above post for other changes I have made.

CaptainCox
07-31-07, 02:16 AM
Cheers man! Same settings my end sorta, running a 8800GTX, so its not a gracard issue then. Will keep on trying here.

wovik
07-31-07, 02:24 AM
I just noticed that the date on the scene.dat file in my TM 1.4 folder under MODS is different than the original TM 1.4 file. I must have made some other change in it but with this damn brain disease I have I can't remember it.
I made a copy of this file then made the above changes to get lightning and installed it over TM 1.4 using JSGME so I wouldn't change the original.
I'll use a compare to the original TM 1.4 out of the original .7z file. and find out what other change i made.

CaptainCox
07-31-07, 02:32 AM
I got it I SEE THE LIGHT! The quallity is so much better looking then in SH3. Its almost impossible to take a SS as it happens so fast. I might try with FRAPS. Cheers @ wovik for this gem :up:

I am using this mission as a test bed.
It has no name so look for "mission title" in the "Quick Mission" menu.
Also when the mission starts just hit "Return to game" (did this fast and dirty)

JSGME ready:
http://files.filefront.com/RAINrar/;8188541;;/fileinfo.html

wovik
07-31-07, 02:55 AM
I found the changes then remembered doing it. It is supposedly for improved underwater visibility.
The items changed were Fog Start and Fog End.
It also changed the MaxDistance.... hmmm... are these global figures? If so it might mess up everything.

So in my present "TESTING" scene.dat version the only difference from an original TM 1.4 file and mine are the changes I made posted above and
Fog Start= -3
Fog End=30

Sorry, I forgot I changed it before.

wovik
07-31-07, 03:05 AM
I got it I SEE THE LIGHT! The quallity is so much better looking then in SH3. Its almost impossible to take a SS as it happens so fast. I might try with FRAPS. Cheers @ wovik for this gem :up:

I am using this mission as a test bed.
It has no name so look for "mission title" in the "Quick Mission" menu.
Also when the mission starts just hit "Return to game" (did this fast and dirty)

JSGME ready:
http://files.filefront.com/RAINrar/;8188541;;/fileinfo.html

Glad someone else can see the light :D

I think we should play with these figures some more. I hope the Min and Max distances are not used by other functions or it might break them! I'll leave you to try them as it is way past my bedtime here in Arizona.

CaptainCox
07-31-07, 04:46 AM
Finally managed to capture some lightning using FRAPS and Adobe Premiere (frame by frame search :p )
http://img215.imageshack.us/img215/4674/sequence01ox9.png

http://img293.imageshack.us/img293/8099/sequence02gk1.png

Tried to find a parameter that sets how long the "lightning" is visible, but so far nada.

EDIT: I never seen a lightning at dusk or dawn (not daylight but still light) Only see it when its really dark. I can see the reflections on the boat and crew, but i don't see the actual flash.

wovik
07-31-07, 05:50 AM
CaptainCox:

I see your screenshots are dark also. I brightened and increased gamma a bit with another program so you could see it.

I think that those settings might be in particles.dat but I don't really know. Check the SH3 Mod section. I believe someone there figured them out.

I actually tried your scene with the original 120 and 180 settings for min, max and had lightning but it was all over the place, hard to find.
I found that with min set low if you turn into the lightning in your scene you actually pass it and it ends up behind you. As it came close the lightning looked terrible so I am now trying 5 and 15 for min-max.
I tried the height back to original but with my modded camera file it gets too high using ">" view and looked terrible so I still like 10 for the height. 12 looks good to me also.
The min-max seems to set the spread distance of lightning strikes. with the original 60 spread it was all over the screen in bridge view.. hard to locate and isn't natural. It might be ok when getting further away from it though. Needs more testing.

As you can surmise, I didn't go to bed yet. I had to turn SH4 on again. Oh well, I don't have to be anywhere today.

In your mission file you had 20:00 for the hour. All that is needed is 20. Below it is a line for minutes.

I hate that the program putting fog on even if you put 0 for fog. Hmmm maybe turn off the enviromental effects?

mgbmike
07-31-07, 05:59 AM
@ CC

Your mission test works fine for me. Lightning shows up quite well.
System specs below.

@ wovik

The scene.dat file I'm using is from Living Breathing Ocean.

Regards,
Mike

wovik
07-31-07, 06:06 AM
@ CC

Your mission test works fine for me. Lightning shows up quite well.
System specs below.

@ wovik

The scene.dat file I'm using is from Living Breathing Ocean.

Regards,
Mike


The TM 1.4 has the LBO in it also along with 9km vision.

Did you change the settings or using original settings?


This needs more testing as so far the lighning seems glued to the starting position but I need to travel further to test that.

CaptainCox
07-31-07, 06:15 AM
I am porting the SH3 Tweakfiles for the Lightning as we speak. If any one wants to chip in just PM me. I have done the 1st "@Lightning01" and starting with the 2nd. Takes about 15 min for each...boring mechanical work :p.
I looked at this in the S3D tool from skwasjer...ITS ALL THERE!!!! but we can't tweak it at the mo as its only the Alpha version :(
http://img160.imageshack.us/img160/8720/capture111pa3.jpg

skwasjer
07-31-07, 06:43 AM
Soon CC, soon :) :)

At least you know where to find it now :)

The first update will include absolute file offsets to each property. Still not editable, but easier to find...

CaptainCox
07-31-07, 06:48 AM
I tell you man its brilliant! :up: :up:

mgbmike
07-31-07, 07:05 AM
@ CC

Your mission test works fine for me. Lightning shows up quite well.
System specs below.

@ wovik

The scene.dat file I'm using is from Living Breathing Ocean.

Regards,
Mike

The TM 1.4 has the LBO in it also along with 9km vision.

Did you change the settings or using original settings?


This needs more testing as so far the lighning seems glued to the starting position but I need to travel further to test that.
I used the original settings from LBO.

I agree on the lightning glued to one position. Ran my boat in a large circle and it seemed to stay at the same position throughout the turn.

CaptainCox
07-31-07, 07:49 AM
Finished porting the "Lightning Tweakfile" from SH3 to SH4
I think that the original work was done by Nvdrifter, so creds to him. i only ported it to SH4.

Download Link:
http://files.filefront.com/Lightningrar/;8190228;;/fileinfo.html (http://files.filefront.com/Lightningrar/;8190228;;/fileinfo.html)

As to what each parameter does...well, no idea at the mo, lets find out ;)

As soon skwasjer releases the next version or the next,next of the S3D tool, this stuff will be redundant! :p

wovik
07-31-07, 08:06 AM
Sounds great :up:

It appears that the lightning is glued to the starting position. Running full speed with the Porpoise it only took 17 minutes game time to loose sight of it. You could still hear the thunder though.
I tried the original 120 and 180 settings but you loose it quicker (if you can find it to begin with!).
The settings I used which lost it in 17 minutes were:

Height=20
MinDistance=3
Maxdistance=20


I have to check out your modified tweakfile.

That program really looks good. Just think how I can really screw the game up with all those things to tweak!

CaptainCox
07-31-07, 08:09 AM
Aren't you supposed to be in BED! :p

wovik
07-31-07, 08:20 AM
Aren't you supposed to be in BED! :p

It's 6:16 AM now.... time to get up! :D

My head hasn't fallen on the keyboard yet so I just need that important morning go-go-juice commonly called COFFEE and I'll be good for a few more hours.

I got to check out the tweak file before I can sleep.

Jack

leovampire
07-31-07, 03:08 PM
I guess my head is still stuck in ocean mode because looking at that particles file for lightning is making me go :hmm: :88) :huh: :doh:

LMAO I guess it is time to go to a web page that lists some serious tech data on lightning from storm chasers.

Ever watch the original Bewitch on TV? When Daren's mother use to say to her husband, "Frank I have a sick head ach again"!!

CaptainCox
07-31-07, 03:55 PM
Never seen that show. But i can imagine ;) As a I said had some RL work to do here today so did not have time yet to check on this properly. Might give it a good thrashing in the morn but.

kapitan_zur_see
07-31-07, 07:01 PM
gee, men you're just brilliant! nice work :up::up::up:
The effects look good. However not a lot of flash, and lightning are quick and not as bright as in real life.
LifeTime seems to be controlling lightning duration to some extent. try 50 instead of 12, you should see a slight difference i believe, as using very small values, makes only quick flashes without lightnings...

I believe one thing that could make a diffrerence is tweaking the lightning textures. I'm going to try a few thing this way

CaptainCox
08-01-07, 04:47 AM
Just had to post this beautiful pic...and bumping this thread a bit ;)
http://img75.imageshack.us/img75/4813/flashboatol7.jpg

Had a go at the tweak file, playing with the "Life" settings, but as far as i can see no real change. Will play some more with the scene.dat later.

Fearless
08-01-07, 05:14 AM
Just had to post this beautiful pic...and bumping this thread a bit ;)
http://img75.imageshack.us/img75/4813/flashboatol7.jpg

Had a go at the tweak file, playing with the "Life" settings, but as far as i can see no real change. Will play some more with the scene.dat later.

Awesome CC:rock:

kapitan_zur_see
08-01-07, 05:21 AM
Nice one CC! hey, i believe you tried to pause game while catching a lightning to get this pictures. Did you tried to move around while in pause? you would see that lightnings sprites starts to render "way" above the cloud ceiling. Tell me if you come across interesting values modifying lightnings scale. Right now, i'm working on the textures, and i'm quite pleased so far with what could be achieved.

wovik
08-01-07, 09:29 AM
I think you need to use a smaller Height value in the scene.dat file. It's originally at 20.

CaptainCox
08-01-07, 09:35 AM
In that pic I posted its set to 10 in height. And yea, there are some strange things happening when you start to get close to the lightning paused. Its like it disappears, form the bottom and up. Just came back from a heavy shopping round here. Will have a look at it again in a mo.

wovik
08-01-07, 09:39 AM
CC

Do you remember in SH3 if lightning worked in vanilla or if it was part of a mod that got it working well?

CaptainCox
08-01-07, 09:48 AM
I know for sure that it works in GWX. In vanilla...can't remember to tell you the truth. I am one of those who played SH3 when it came for like 1-2 months and then rediscovered it with GWX 1.3 :oops:

wovik
08-01-07, 10:09 AM
I remember I was impressed with lightning in GWX also.
I can't remember with vanilla or any other major mod if there even was lightning.
What's bothering me is this lightning appears glued to it's starting location which you quickly leave behind then have the thunder with no lightning again. If I remember GWX correctly it wasn't like that. You had lightning for hours even while moving steadily on the surface. Perhaps whoever fixed it for GWX can help us on this or suggest what to do.

kapitan_zur_see
08-01-07, 11:12 AM
i recall it worked in vanilla. I'll test anything you have in mind with my clean SH3 install, should you request something. Ask me if you want to test something specific.

wovik
08-01-07, 11:44 AM
The materials.dat file has a lot of settings for lightning also. Reading SH3 threads, you may find the duration etc. values in there.

wovik
08-01-07, 11:53 AM
i recall it worked in vanilla. I'll test anything you have in mind with my clean SH3 install, should you request something. Ask me if you want to test something specific.

Thanks for offering but I'm going to run a test in SH4 to see if lightning respawns as you travel further away from it. I've only traveled far enough to see it disappear then turn around to see it was still there in the same place.

Up until I played with those distance values I never saw lightning in SH4. They are only good to confirm the presence as it keeps the bolts close together.

I'm going to fire up CC's test mission and let it run at a normal cruising speed in 1x time. I just wish the thunder would stop when lightning isn't visible.

CaptainCox
08-02-07, 03:54 AM
I compared the files to SH3 using S3D. I cant really see any big difference, well any difference at all actually. There are some parameters in the particle.dat that SH3 dont have. Like Global Scale/Global Scale Far Distance, played a bit with those settings
Stock Global Scale=10
to
Global Scale=2
and Stock Global Scale Far Distance=700
to
Global Scale Far Distance=100

But cant see any difference.

I wonder if the Emission area has something to do where the lightning appear, but it seems to be the same in SH3. Maybe there is another .dat we need to look at here?

CaptainCox
08-02-07, 04:17 AM
Just realized that its TIMETRAVELER that did the original Lightning Tweak file i ported some pages back in this thread. So 100% CRED to Timetraveler.

Edited that post


Finished porting the "Lightning Tweakfile" from SH3 to SH4
I think that the original work was done by Timetraveler, so creds to him. i only ported it to SH4.

Download Link:
http://files.filefront.com/Lightningrar/;8190228;;/fileinfo.html (http://files.filefront.com/Lightningrar/;8190228;;/fileinfo.html)

As to what each parameter does...well, no idea at the mo, lets find out ;)

As soon skwasjer releases the next version or the next, next of the S3D tool, this stuff will be redundant! :p

CaptainCox
08-02-07, 04:04 PM
Did some more tinkering with this, and no, I have not solved the transparency :(
Anyhow did a little film using Fraps. had convert it to Quick time as it was way big.
Download Link (Quality is so so as I had to convert it etc.
http://files.filefront.com/Sequence+01rar/;8211657;;/fileinfo.html (http://files.filefront.com/Sequence+01rar/;8211657;;/fileinfo.html)

As you can see the lightning appears in different locations.


Settings I used are
Scene.dat:
Height=20
MinDis=4
MaxDis=30 (this is the interesting bit, It some how makes the lightning to appear in different places, still around a certain point but it appears spread over that point, see the vid ;) )
MinTime=1
MaxTime=3 (I used this setting as it makes the lightning almost continuous) If you set this higher, the intervals between the strikes will be bigger etc.

Particles.dat:
Transparent=0 (stock1) I thought setting this to 0 would render it solid, but no effect as far as i can see)

Life=10 (not sure if this makes the strikes appear longer)
Rate= 0,01 (Stock is 0,001) Seem to repeat the strike, making it pulsing, not so realistic but at least we know what it does...i think :p )

Rate Variation=1 (Stock is 0)

And for some reason it seem that there is "A" cloud/point of origin that emanates the lightning. Not multiple...not sure whats behind that. With this setting we get a spread, but it is still in a area rear-left of the boat.

kapitan_zur_see
08-02-07, 04:11 PM
Well, i kinda began to mess around with the textures. And after all, not that satisfying. Lightnings appears always kind of really blury low-res like, and always too big, though i reduced them. Still, it's wip, dunno if i'll keep working on that. Aside form the lightning itself, i added some kind of "backlit" clouds efect to it. Here's some screenshots (on the first: gamma has been raised), tell me if you think it's improvement or not:


http://img167.imageshack.us/img167/7285/stormtestuf6.jpg


http://img384.imageshack.us/img384/715/stormtest1kq0.th.jpg (http://img384.imageshack.us/my.php?image=stormtest1kq0.jpg)http://img384.imageshack.us/img384/586/stormtest2jw8.th.jpg (http://img384.imageshack.us/my.php?image=stormtest2jw8.jpg)http://img114.imageshack.us/img114/3375/stormtest3mz0.th.jpg (http://img114.imageshack.us/my.php?image=stormtest3mz0.jpg)http://img114.imageshack.us/img114/1363/stormtest4ge0.th.jpg (http://img114.imageshack.us/my.php?image=stormtest4ge0.jpg)http://img365.imageshack.us/img365/9531/stormtest5nb5.th.jpg (http://img365.imageshack.us/my.php?image=stormtest5nb5.jpg)http://img114.imageshack.us/img114/5210/stormtest6mn0.th.jpg (http://img114.imageshack.us/my.php?image=stormtest6mn0.jpg)

EAGLE_01
08-02-07, 04:21 PM
Looks pretty good to me...Far better than I could do:up:

kapitan_zur_see
08-02-07, 05:07 PM
Looks pretty good to me...Far better than I could do:up:
thanks mate ;)
it still needs some work... i'll do a Fraps movie to show you how it looks animated. I think it will gradualy look better as soon as we discover what every values do in .dat files. Thanks to CaptainCox findings, i think tweaking the rate value for pulsating lightning may add to the effect. I still wonder if i can make anything to "raise" the resolution of the lightning. So far, it seems the game renders a simple 3D plane at a given widthxheight + distance to sub and height from surface (+ always facing the camera, well, to sum it up, rendering sprites the old way like in older games like DOOM) and textures it with whatever lightning0x_add.tga, wich are the textures i modified. Should you increase the size of textures, you won't get anything better as the game automatically resize them down to the original textures size, hence not the way to increase resolution and so details vs less blur.
Moreover, the rendering plane is part above clouds (where you can't see) and part under water (where you can't see either) so only something like 40% of the lightning is in view. So, i had to make my entire texture to fill only those 40% by resizing it down to get the entire lightning to show up and not only some part of it, like in vanilla. This doesn't help a lot to increase level of details :down:

Oh, and though the original textures (they're from SH3 by the way...) are just in greyscale, it is able to render whatever color you choose for your textures. As you can see, mine have a distinct bluish color, but i've done testing with purple, strong blue, whitish etc... so feel free to ask, if you think another color would do better

leovampire
08-02-07, 05:59 PM
but can't seem to get my quicktime to play that file I downloaded from your link.

Fearless
08-02-07, 08:36 PM
Looking great:up:

kapitan_zur_see
08-02-07, 08:57 PM
Looking great:up:
thanks ;) i'd like to collect as much opinions as possible to direct this work

edjcox
08-03-07, 01:20 AM
try pasing the lightning with a greenish hue up and gradual shift to blue at base....

There was lot planned for this that never made it, to include boat strikes and crew casualties.

It might be nce if a series of random bolts might be selectedby code and then integrated into a storm weather scenario..

CaptainCox
08-03-07, 04:24 AM
@kapitan_zur_see, would you mind uploading the textures you did. Would like to see it in "real" please :)

kapitan_zur_see
08-03-07, 06:54 AM
@kapitan_zur_see, would you mind uploading the textures you did. Would like to see it in "real" please :)

Sure thing, i'll pm them to you ;)

William516
07-14-08, 10:32 PM
bumping thread because, i too am interested in seeing if this has been, solved im currently reloading the whole game and going back to stock. with 1.5 i lost thunder as well.

Anyone figure out how to do oil or dolphins that were in SH3 as well, there seems to be alot that was missing between the sh3 - sh4 change.

Thanks
Bill