SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 11-02-13, 06:08 PM   #1
Rongel
Grey Wolf
 
Join Date: Jan 2009
Location: Finland
Posts: 859
Downloads: 174
Uploads: 0
Default Mystery of the lagging starshells revealed!



Normally this kind of situation would melt your computer and halt it for 10 seconds. But in this setting there was absolutely no lag. Not even a millisecond! The reason for the lag seems to be quite simple: the light node in starshells materials in material.dat file. I replaced the main node to be just normal 4/100 node and all lag was gone! So it is fixed?! No!

Removing the light node removes also the light from the ships and the light bonus that enemy units would get. So basicly my modded starshells/flares work like this:

- working starshells/flares that sparkle in the sky
- working waterlevel reflection
- absolutely no lag!
- no light reflecting to ships
- no gameplay effects, ships don't see you any better

I made also test and changed TDW's merchant ship starshells and flares, and lag was gone from there also. So basicly we can get "eye candy" effects, distress flares and starshells, but they don't have any real effect.

To get this working, somekind of light that SH 5 understands should be added to the flares, but as far as I know, there isn't any. SH 5 doesn't seem to have any actual light sources except the sun and the moon. So I rest my case now, maybe some more HC-modders know how to fix this completely, still I think it's better than nothing!
Rongel is offline   Reply With Quote
Old 11-03-13, 03:31 AM   #2
vdr1981
Navy Seal
 
Join Date: May 2010
Location: Србија
Posts: 6,078
Downloads: 581
Uploads: 13


Default

Rongel, this is very important breakthrough , TY very much!

Quote:
Originally Posted by Rongel View Post
- no gameplay effects, ships don't see you any better
So, with "default" starshels ships can actually see you better ?
vdr1981 is offline   Reply With Quote
Old 11-03-13, 04:40 AM   #3
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Brilliant finding Rongel; this reduces our field of investigation considerably

Two thoughts:

- as I have told you a few weeks ago, SHIII and SH5 starshells are pretty similar when looked on file. Yet, afaik, SHIII isn't affected by the same lagging issue as SH5; at least not as much. This is pretty weird considering that SH5 is an evolution of the previous game, and makes me to wonder if the culprit is some of the (4/2) node attributes which might have changed since SHIII, rather than the node itself.

- SH5's and, if memory serves me well, SHIII's starshell omni light effects are animated, probably for simulating light trembling. In SH5, this effect has a rate of one frame every thirtieth of second, and can be a serious fps eater. I am pretty sure that removing the LightAnimation node, or toning its frame rate down, would make the game much smoother when the starshell effect is played, and wouldn't affect starshell's functionality.

Quote:
Originally Posted by vdr1981 View Post
So, with "default" starshels ships can actually see you better ?
yep, likewise when you are within searchlight's beam
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 11-03-13, 05:53 AM   #4
Rongel
Grey Wolf
 
Join Date: Jan 2009
Location: Finland
Posts: 859
Downloads: 174
Uploads: 0
Default

Quote:
Originally Posted by vdr1981 View Post
Rongel, this is very important breakthrough , TY very much!

So, with "default" starshels ships can actually see you better ?
Thanks! Yes, with default starshells ships get a boost to visual range, it's easy to see with the "visual sensors" activated in the map/TAI map-mode.
Quote:
- as I have told you a few weeks ago, SHIII and SH5 starshells are pretty similar when looked on file. Yet, afaik, SHIII isn't affected by the same lagging issue as SH5; at least not as much. This is pretty weird considering that SH5 is an evolution of the previous game, and makes me to wonder if the culprit is some of the (4/2) node attributes which might have changed since SHIII, rather than the node itself.
Quote:
- SH5's and, if memory serves me well, SHIII's starshell omni light effects are animated, probably for simulating light trembling. In SH5, this effect has a rate of one frame every thirtieth of second, and can be a serious fps eater. I am pretty sure that removing the LightAnimation node, or toning its frame rate down, would make the game much smoother when the starshell effect is played, and wouldn't affect starshell's functionality.
I have a background in SH 4, and the starshells seem to be identical, and there wasn't no lag in SH 4. My first test was just like you suggested to remove the LightAnimation-node, but it had no effect, starshells lagged just like before. So it wasn't the culprit.

When I had made the non-lagging starshell, I tried to add the omni-light to sub-node, but as soon the light node was there, the lagging started again. Even when I changed the omni light to particles.dat lag began again. So to me it seems that there can't be any other reason than the omnilight-node.

It lights the ships really beautifully, it's direction is also calculated, and I think this causes stress to computer. There is even a small lag when the effect goes out. My guess is that SH 5's Granny-world doesn't understand the light system from the previous games. Infact there doesn't seem to be any "real lights" in SH 5, even the lights in the bunker and in the sub are just bright 3D objects with a particle halo around, they don't emit actual light at all!
Rongel is offline   Reply With Quote
Old 11-03-13, 07:13 AM   #5
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Rongel View Post
My guess is that SH 5's Granny-world doesn't understand the light system from the previous games.
Sounds plausible and... it sucks
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 11-03-13, 09:55 AM   #6
Rongel
Grey Wolf
 
Join Date: Jan 2009
Location: Finland
Posts: 859
Downloads: 174
Uploads: 0
Default

Quote:
Originally Posted by gap View Post
Sounds plausible and... it sucks
Don't give up hope, gap! We are all waiting for the Wizard to return
Rongel is offline   Reply With Quote
Old 11-03-13, 10:19 AM   #7
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Rongel View Post
Don't give up hope, gap! We are all waiting for the Wizard to return
Yep after long pondering and careful consideration, I have come to the serious conclusion that we are at a deadlock. Only a miracle, or the Wizard in person, can rescue us
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 11-03-13, 10:43 AM   #8
stoianm
Ocean Warrior
 
Join Date: Dec 2010
Location: Montreal, Canada
Posts: 2,776
Downloads: 833
Uploads: 11
Default

I noticed something like that.. related to lag.. some time ago. I forgot to tell you.... each time after I install mods... I make a mod for myself.. remove red flare. I modify. 2 lines.. in zones.cfg:

[DistressFlareWarship]
Multiplier=1.000000
Flotability=0.000000
Critic Flotation=0.300000
Armor Level=-1
HitPoints=130
Destructible=No
Critical=No
Effect1=Command_room_crewman_splinter_explosion_es cort, 40
;Effect2=Distress_Flare_Red, 75
FloodingTime=59.999996
CargoType=None


[DistressFlareMerchant]
Multiplier=1.000000
Flotability=0.000000
Critic Flotation=0.300000
Armor Level=-1
HitPoints=65
Destructible=No
Critical=No
Effect1=Command_room_crewman_splinter_explosion_me rchant, 40
;Effect2=Distress_Flare_Red, 75
FloodingTime=59.999996
CargoType=None

I just put in front of thos 2 lines '';'' to not be executed.... if I am remember well, tdw knows that this red flare is resource consuming, but I do not remember if he fixed that!

Last edited by stoianm; 11-03-13 at 10:58 AM.
stoianm is offline   Reply With Quote
Old 11-03-13, 11:07 AM   #9
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

That is right stoianm, but I think Rongel was looking for a way to make flare effects lesser GPU intensive, without giving them up. And no, TDW has not addressed the proble yet
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 11-03-13, 11:13 AM   #10
stoianm
Ocean Warrior
 
Join Date: Dec 2010
Location: Montreal, Canada
Posts: 2,776
Downloads: 833
Uploads: 11
Default

Quote:
Originally Posted by gap View Post
That is right stoianm, but I think Rongel was looking for a way to make flare effects lesser GPU intensive, without giving them up. And no, TDW has not addressed the proble yet
I understood.. he succeeded only.. to keep the eye candy effects only.. it is better something than nothing for me, anyway.. I would like to use the half solution!
stoianm is offline   Reply With Quote
Old 11-03-13, 11:37 AM   #11
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by stoianm View Post
I understood.. he succeeded only..
More or less: if I understood correctly, starhells would appear as a bright star in the dark sky, but they wouldn't cast light
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 11-03-13, 11:45 AM   #12
stoianm
Ocean Warrior
 
Join Date: Dec 2010
Location: Montreal, Canada
Posts: 2,776
Downloads: 833
Uploads: 11
Default

Quote:
Originally Posted by gap View Post
More or less: if I understood correctly, starhells would appear as a bright star in the dark sky, but they wouldn't cast light
better than to have nothing.. like I have now!
stoianm is offline   Reply With Quote
Old 11-03-13, 12:24 PM   #13
tonschk
Admiral
 
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
Default

Thank you Rongel
tonschk is offline   Reply With Quote
Old 11-04-13, 12:12 PM   #14
Rongel
Grey Wolf
 
Join Date: Jan 2009
Location: Finland
Posts: 859
Downloads: 174
Uploads: 0
Default

Quote:
Originally Posted by stoianm View Post
I understood.. he succeeded only.. to keep the eye candy effects only.. it is better something than nothing for me, anyway.. I would like to use the half solution!
It's easy to make warships to fire these no-lag starshells, just modify the materials.dat file, I can do that, but the merchant starshells and distress flares come from TDW and their files need editing too, and also the new FX update zone file removes the starshells. So i'm not sure how to proceed...

I'm not that keen on modifying TDWs work, best situation would be that he does the changes. Can't remember what the modding etiquette says... Is it okay to make this kind of patch???
Rongel is offline   Reply With Quote
Old 11-04-13, 01:38 PM   #15
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Rongel View Post
It's easy to make warships to fire these no-lag starshells, just modify the materials.dat file, I can do that, but the merchant starshells and distress flares come from TDW and their files need editing too, and also the new FX update zone file removes the starshells. So i'm not sure how to proceed...

I'm not that keen on modifying TDWs work, best situation would be that he does the changes. Can't remember what the modding etiquette says... Is it okay to make this kind of patch???
TDW's flares are about identical to stock starshell effects. He just copied the effects/materials into new files, introduced the difference between red and white flares, and changed the way they are used in game: white flares fired by invisible guns, red flares triggered by compartment damage. That's all.

The new materials are stored in TDW_FXU_Flares_Materials.DAT. I don't think that editing that file and releasing it as a FXU-compatible patch, would break any etiquette rule, especially if we consider that it contains stock effects essentially. On the contrary, you would infringe the rules if you took FXU, changed a few features of it, and released it as whole new mod of your own.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.