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 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 07-19-05, 06:22 PM   #1
Manuel Ortega
Sailor man
 
Join Date: Jul 2002
Location: Alicante - Spain
Posts: 48
Downloads: 0
Uploads: 0
Default

Fog values for game engine (visually speaking, not for AI) are in scene.dat file, at least in part.
Changing those values could increase or decrease max visual range. For example:

Smoke in horizon. This is from a ship at about 8.4 km with default game values:
http://www.mp-labs.com/sh2mods/fog01.jpg

Moving the fog start a little more far away we could see this, the same smoke but visible at 10 km:
http://www.mp-labs.com/sh2mods/nofog01.jpg


A comparison of two Gibraltar images from the same place in a clear day:
http://www.mp-labs.com/sh2mods/nofog02.jpg

Gibraltar in a day with medium fog:
http://www.mp-labs.com/sh2mods/fog02.jpg

But it seems that game engine only draws as far as 10 km (clip distance). We can't see any object further, even removing all fog. I haven't found clip distances in any file yet, but changing them could be a good step in increasing the visual distance.

There is a small problem with the dynamic ocean. It only covers about 1000 meters from player's eye. From there to horizon, there is a flat pseudo-ocean that fades with the fog. I can make the dynamic ocean grid bigger easily, but it is practically at the same height that the pseudo-ocean, less than 1 meter of separation. This makes Z-fighting polygons, as we see here:
http://www.mp-labs.com/sh2mods/renderengine02.jpg

It could be fixed by lowering that plane a little.
I supose that the main reason of making a too short viewing distance was to maintain a minimum fps. I know this because making the dynamic ocean grid four times bigger eats about 20% of the fps. Surely the dev team had the same problem and that is why they limited the range.

This is how world is rendered in the game:
http://www.mp-labs.com/sh2mods/renderengine01.jpg

A draw to explain it:
http://www.mp-labs.com/sh2mods/renderengine03.jpg

I hope this would be useful. I don't know about the AI part, only researched how increase the player sight.
I will put the hex addresses that I found, if interested.
Manuel Ortega is offline   Reply With Quote
Old 07-19-05, 06:57 PM   #2
Duke of Earl
Medic
 
Join Date: Feb 2003
Location: 20 Meter von einer Wasserbombe
Posts: 169
Downloads: 0
Uploads: 0
Default

@Manuel.. count me in, I'm interested...

Cordialement, Duke of Earl
__________________
U-627.... das \'Wabo-Magnet\'
Duke of Earl is offline   Reply With Quote
Old 07-19-05, 07:41 PM   #3
CCIP
Navy Seal
 
Join Date: Apr 2005
Location: Waterloo, Canada
Posts: 8,700
Downloads: 29
Uploads: 2


Default

Thank you! I'll check out Scene.dat.

In general though, we can live with 10km visual ability, provided our WO can see a bit further. Now if we could also shift the light fog back a little bit, say, to near those 10km, that would be a good enough solution for me. That way we could realistically take advantage of better visibility on most clear days, excellent WO visibility on fog-less days, and the same good old unforgiving visibility in storms
__________________

There are only forty people in the world and five of them are hamburgers.
-Don Van Vliet
(aka Captain Beefheart)
CCIP is offline   Reply With Quote
Old 07-19-05, 08:02 PM   #4
jasonb885
Samurai Navy
 
Join Date: Mar 2002
Posts: 580
Downloads: 0
Uploads: 0
Default

I'll give it a go tonight.

__________________
X1 = Thieves

Starforce officially promotes piracy of unprotected game, Galactic Civilizations II! eh?

Improved Convoys mod!
jasonb885 is offline   Reply With Quote
Old 07-20-05, 06:23 AM   #5
Manuel Ortega
Sailor man
 
Join Date: Jul 2002
Location: Alicante - Spain
Posts: 48
Downloads: 0
Uploads: 0
Default

The fog distances are here:

I don't know exactly which type of data is it, but it seems to be two 32 bit values.

And the dynamic ocean size here:
Manuel Ortega is offline   Reply With Quote
Old 07-20-05, 06:51 AM   #6
Immacolata
Grey Wolf
 
Join Date: Apr 2005
Posts: 798
Downloads: 3
Uploads: 0
Default

Amazing work. There is a chance that the devs could fix this for a future release, if they somehow think it is important and someone tells them that it IS

Would it be possible to lower the pesuod ocean a bit and that would fix the z-buffering fight creating polygon flicker?
Immacolata is offline   Reply With Quote
Old 07-20-05, 08:30 AM   #7
Lanzfeld
Grey Wolf
 
Join Date: Jan 2002
Location: New Tripoli, PA
Posts: 994
Downloads: 64
Uploads: 0
Default

Hmmmm...

I put the sensors file in my data/library folder and on a clear day my WO still cant see ship farther then 8000 meters.
Lanzfeld is offline   Reply With Quote
Old 07-20-05, 09:12 AM   #8
timetraveller
Beach Leaf
 
Join Date: Dec 2004
Location: Atlantic Shipping Lanes
Posts: 287
Downloads: 1
Uploads: 0
Default

CCIP,

Let me know if you need a little tweak for the scene.dat rule.

Note that Manuel's displacement values are in decimal format, not hex. 2992=BB0

TT
timetraveller is offline   Reply With Quote
Old 07-20-05, 11:00 AM   #9
R48
Loader
 
Join Date: Nov 2002
Posts: 86
Downloads: 25
Uploads: 0
Default

CCIP,

Does your Sensors.dat include the snorkel detection problem that Jungman mentions fixing?
R48 is offline   Reply With Quote
Old 07-20-05, 11:21 AM   #10
CCIP
Navy Seal
 
Join Date: Apr 2005
Location: Waterloo, Canada
Posts: 8,700
Downloads: 29
Uploads: 2


Default

Quote:
Originally Posted by timetraveller
CCIP,

Let me know if you need a little tweak for the scene.dat rule.

Note that Manuel's displacement values are in decimal format, not hex. 2992=BB0

TT
Sure, if you can - I'd be happy.

Actually, I've looked through scene.dat yesterday and I couldn't find anything concrete as far as fog - maybe I'm looking in the wrong places. But if that distance can indeed be adjusted - that's good, and maybe then we can also adjust underwater fogging distance (which would be a huge plus for some of the 'real water' modding as well).

R48 -
I put in the fixes for the radar bearings that Jungman mentioned, but I didn't see anything about that snorkel radar. If someone can point me to what other value (if any) needs fixing there, I'll put it in too.
__________________

There are only forty people in the world and five of them are hamburgers.
-Don Van Vliet
(aka Captain Beefheart)
CCIP is offline   Reply With Quote
Old 07-20-05, 11:26 AM   #11
Manuel Ortega
Sailor man
 
Join Date: Jul 2002
Location: Alicante - Spain
Posts: 48
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by timetraveller
Note that Manuel's displacement values are in decimal format, not hex. 2992=BB0
Mi mistake. Here they are in hex:

Fog distances:


Dynamic grid size:
Manuel Ortega is offline   Reply With Quote
Old 07-20-05, 11:57 AM   #12
Manuel Ortega
Sailor man
 
Join Date: Jul 2002
Location: Alicante - Spain
Posts: 48
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by CCIP
and maybe then we can also adjust underwater fogging distance (which would be a huge plus for some of the 'real water' modding as well).
It's pretty easy indeed.
Default underwater fog:
http://www.mp-labs.com/sh2mods/waterfog_default.jpg

Modified values:
http://www.mp-labs.com/sh2mods/waterfog_increased.jpg

Here is the hex address:


First 4 byte pairs are fog start (-4 in float, don't know units). Next 4 byte pairs are fog end (float 18, I modified to 10 to make the screenshot).
Manuel Ortega is offline   Reply With Quote
Old 07-20-05, 11:59 AM   #13
CCIP
Navy Seal
 
Join Date: Apr 2005
Location: Waterloo, Canada
Posts: 8,700
Downloads: 29
Uploads: 2


Default

Hmm, is that based on distance? If so, that's definitely very interesting. Up to now, water color modding has been based strictly on colors and transparencies at certain angles only.
__________________

There are only forty people in the world and five of them are hamburgers.
-Don Van Vliet
(aka Captain Beefheart)
CCIP is offline   Reply With Quote
Old 07-20-05, 12:25 PM   #14
Manuel Ortega
Sailor man
 
Join Date: Jul 2002
Location: Alicante - Spain
Posts: 48
Downloads: 0
Uploads: 0
Default

Yes. Objects at a distance higher than fog end value are totally hidden by fog.
The same with start fog. If you put a negative value, the fog starts behind the camera. This is useful in games for making a thicker ambient.

In this pic I modified the fog start with a value of -100. This shows as more dense water.
http://www.mp-labs.com/sh2mods/waterfog_dense.jpg

The scene.dat file has a lot of modification capabilities.
Manuel Ortega is offline   Reply With Quote
Old 07-20-05, 01:19 PM   #15
R48
Loader
 
Join Date: Nov 2002
Posts: 86
Downloads: 25
Uploads: 0
Default

CCIP,

The only reference I saw was
Quote:
I also changed MinSurface size to fix the stupid Snorkel detection problem....
I'm guessing he is refering to the AI's ability to detect your snorkel too easily. I could be wrong though.
R48 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 08:51 AM.


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.