![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
Sailor man
![]() Join Date: Jul 2002
Location: Alicante - Spain
Posts: 48
Downloads: 0
Uploads: 0
|
![]()
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. |
![]() |
![]() |
![]() |
#2 |
Medic
![]() Join Date: Feb 2003
Location: 20 Meter von einer Wasserbombe
Posts: 169
Downloads: 0
Uploads: 0
|
![]()
@Manuel.. count me in, I'm interested...
![]() Cordialement, Duke of Earl
__________________
U-627.... das \'Wabo-Magnet\' |
![]() |
![]() |
![]() |
#3 |
Navy Seal
![]() |
![]()
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 ![]() |
![]() |
![]() |
![]() |
#4 |
Samurai Navy
![]() Join Date: Mar 2002
Posts: 580
Downloads: 0
Uploads: 0
|
![]()
I'll give it a go tonight.
![]()
__________________
X1 = Thieves Starforce officially promotes piracy of unprotected game, Galactic Civilizations II! eh? Improved Convoys mod! |
![]() |
![]() |
![]() |
#5 |
Sailor man
![]() Join Date: Jul 2002
Location: Alicante - Spain
Posts: 48
Downloads: 0
Uploads: 0
|
![]()
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: ![]() |
![]() |
![]() |
![]() |
#6 |
Grey Wolf
![]() Join Date: Apr 2005
Posts: 798
Downloads: 3
Uploads: 0
|
![]()
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? |
![]() |
![]() |
![]() |
#7 |
Grey Wolf
![]() Join Date: Jan 2002
Location: New Tripoli, PA
Posts: 994
Downloads: 64
Uploads: 0
|
![]()
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. |
![]() |
![]() |
![]() |
#8 |
Beach Leaf
![]() Join Date: Dec 2004
Location: Atlantic Shipping Lanes
Posts: 287
Downloads: 1
Uploads: 0
|
![]()
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 |
![]() |
![]() |
![]() |
#9 |
Loader
![]() Join Date: Nov 2002
Posts: 86
Downloads: 25
Uploads: 0
|
![]()
CCIP,
Does your Sensors.dat include the snorkel detection problem that Jungman mentions fixing? |
![]() |
![]() |
![]() |
#10 | |
Navy Seal
![]() |
![]() Quote:
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. |
|
![]() |
![]() |
![]() |
#11 | |
Sailor man
![]() Join Date: Jul 2002
Location: Alicante - Spain
Posts: 48
Downloads: 0
Uploads: 0
|
![]() Quote:
Fog distances: ![]() Dynamic grid size: ![]() |
|
![]() |
![]() |
![]() |
#12 | |
Sailor man
![]() Join Date: Jul 2002
Location: Alicante - Spain
Posts: 48
Downloads: 0
Uploads: 0
|
![]() Quote:
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). |
|
![]() |
![]() |
![]() |
#13 |
Navy Seal
![]() |
![]()
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.
|
![]() |
![]() |
![]() |
#14 |
Sailor man
![]() Join Date: Jul 2002
Location: Alicante - Spain
Posts: 48
Downloads: 0
Uploads: 0
|
![]()
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. |
![]() |
![]() |
![]() |
#15 | |
Loader
![]() Join Date: Nov 2002
Posts: 86
Downloads: 25
Uploads: 0
|
![]()
CCIP,
The only reference I saw was Quote:
![]() |
|
![]() |
![]() |
![]() |
|
|