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

Reply
 
Thread Tools Display Modes
Old 08-14-08, 03:39 PM   #241
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

Quote:
Originally Posted by Syxx_Killer
Yes, that is what I am seeing. In shallow water if I am surfaced, I will see white lines around the bottom half of the sub, especially the stern areas. When submerged near the surface where I can see the sub with the camera there will be those white lines, mostly around the railings like you mentioned.
OK, after much experimentation I now know what is causing this. As far as I can tell there's some sort of glitch regarding the depth of water, which makes the shader blend in the sea bed at full strength around the very edge of the submarine. The sea bed is only renedered on the refrected part of the textures if the sea bed is 200m or less deep. This is why the problem only occurs when you are in shallow water. Also, rotating the camera, so looking at your sub with deep water in the background should get rid of the white lines.

Now I know what is causing the problem, I'm that one step closer to resolving it. It should only affect subs in shallowish waters though. Everyone else should be alright.
Nisgeis is offline   Reply With Quote
Old 08-14-08, 04:25 PM   #242
kriller2
Ace of the Deep
 
Join Date: Apr 2005
Posts: 1,227
Downloads: 19
Uploads: 0
Default

Quote:
Originally Posted by Nisgeis
Quote:
Originally Posted by Syxx_Killer
Yes, that is what I am seeing. In shallow water if I am surfaced, I will see white lines around the bottom half of the sub, especially the stern areas. When submerged near the surface where I can see the sub with the camera there will be those white lines, mostly around the railings like you mentioned.
OK, after much experimentation I now know what is causing this. As far as I can tell there's some sort of glitch regarding the depth of water, which makes the shader blend in the sea bed at full strength around the very edge of the submarine. The sea bed is only renedered on the refrected part of the textures if the sea bed is 200m or less deep. This is why the problem only occurs when you are in shallow water. Also, rotating the camera, so looking at your sub with deep water in the background should get rid of the white lines.

Now I know what is causing the problem, I'm that one step closer to resolving it. It should only affect subs in shallowish waters though. Everyone else should be alright.
HI Nisgeis,

That sounds great, we now have a explanation to why it happens, now we are a little step closer to a solution

Now I better get back to testing the new shader.. I have seen something strange when looking at a ship after a torpedo hit it, nothing serious but I need to test it some more to see if it's my texture making the problem or our water shader...

Will take a screenshot of it so you can take a look at it.

EDIT: here it is:

Now I got a snapshot of it:


I have never seen this before :hmm: is it our shader or is it the damage texture? - the strange thing is that if there is a explosion near by it looks like this, the screenshot is from the submarine torpedo school.


BTW your PM is full
__________________
Kriller2.
[MODs]

Real Environment mod

and Pacific Enviroments 4 mod

Last edited by kriller2; 08-14-08 at 04:58 PM.
kriller2 is offline   Reply With Quote
Old 08-14-08, 05:29 PM   #243
Syxx_Killer
Admiral
 
Join Date: Aug 2003
Location: Michigan, USA
Posts: 2,387
Downloads: 21
Uploads: 0
Default

Quote:
Originally Posted by Nisgeis
Quote:
Originally Posted by Syxx_Killer
On a similar subject, is it possible to get rid of that light outline around the sub that appears at night (as well as other ships)? I think this was introduced with 1.4 actually. That has been annoying me as bad as the white lines mentioned above.
Can you post a screenshot showing these lines? I have not noticed them myself, but then I'm not very observant.
Here's a screenshot from the stock game, but I noticed the issue yesterday running PE3. That's what made me think to bring it up.



See that outline around the sub? This is also seen around ships and things like docks. It only happens at night.
Syxx_Killer is offline   Reply With Quote
Old 08-14-08, 11:07 PM   #244
Orion2012
Commodore
 
Join Date: Jul 2008
Posts: 611
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Syxx_Killer
Quote:
Originally Posted by Nisgeis
Quote:
Originally Posted by Syxx_Killer
On a similar subject, is it possible to get rid of that light outline around the sub that appears at night (as well as other ships)? I think this was introduced with 1.4 actually. That has been annoying me as bad as the white lines mentioned above.
Can you post a screenshot showing these lines? I have not noticed them myself, but then I'm not very observant.
Here's a screenshot from the stock game, but I noticed the issue yesterday running PE3. That's what made me think to bring it up.



See that outline around the sub? This is also seen around ships and things like docks. It only happens at night.
Kind of looks like a rim lighting effect.
Orion2012 is offline   Reply With Quote
Old 08-15-08, 05:44 AM   #245
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

Quote:
Originally Posted by kriller2
I have seen something strange when looking at a ship after a torpedo hit it, nothing serious but I need to test it some more to see if it's my texture making the problem or our water shader...
Hmmm, when the hole is applied to a hull, the damage mask is multiplied against the hull texture to make the damage appear. The 3d model is still the same, and I'm not sure where it gets the colour to apply to the masked off section... perhaps it's the water fog colour? Not sure about this one, will have to have a look at what it does with stock and compare it to see where it's getting that colour from.

Quote:
BTW your PM is full
People keep filling it up! There's space now.
Nisgeis is offline   Reply With Quote
Old 08-15-08, 05:46 AM   #246
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

Quote:
Originally Posted by Orion2012
Quote:
Originally Posted by Syxx_Killer
Quote:
Originally Posted by Nisgeis
Quote:
Originally Posted by Syxx_Killer
On a similar subject, is it possible to get rid of that light outline around the sub that appears at night (as well as other ships)? I think this was introduced with 1.4 actually. That has been annoying me as bad as the white lines mentioned above.
Can you post a screenshot showing these lines? I have not noticed them myself, but then I'm not very observant.
Here's a screenshot from the stock game, but I noticed the issue yesterday running PE3. That's what made me think to bring it up.

<SNIPPED PICTURE>

See that outline around the sub? This is also seen around ships and things like docks. It only happens at night.
Kind of looks like a rim lighting effect.
That outline is there during day time as well. It's like a little hull wake effect. It's noticable at night like that as it's probably a bit too bright. It's definitely meant to be there. I could perhaps see if I can make it a bit less bright?
Nisgeis is offline   Reply With Quote
Old 08-15-08, 08:32 AM   #247
Syxx_Killer
Admiral
 
Join Date: Aug 2003
Location: Michigan, USA
Posts: 2,387
Downloads: 21
Uploads: 0
Default

Quote:
Originally Posted by Nisgeis
That outline is there during day time as well. It's like a little hull wake effect. It's noticable at night like that as it's probably a bit too bright. It's definitely meant to be there. I could perhaps see if I can make it a bit less bright?
If it could be less bright, that would be good. It looks brighter in game than in screenshots. It just doesn't seem "natural".
Syxx_Killer is offline   Reply With Quote
Old 08-15-08, 02:21 PM   #248
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

Quote:
Originally Posted by kriller2
I have seen something strange when looking at a ship after a torpedo hit it, nothing serious but I need to test it some more to see if it's my texture making the problem or our water shader...
I took a look at this and I am fairly happy that it's a stock thing. Can you try testing it with stock? It's not something you would normally notice, as usually the damage hole is on the side of the ship. In that screen shot, it just so happened that the unusually shaped hull meant there was a blank part. It's quite noticable if you place a torpedo at the bow of a ship, then it becomes quite obvious.

Could you try it in stock and see if you get the same result as I did? That goes for anyone else too .

Thanks.
Nisgeis is offline   Reply With Quote
Old 08-16-08, 09:19 AM   #249
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

Quote:
Originally Posted by Sailor Steve
I agree. I usually argue for clarity in the water, since I've seen the bottom from the bridge of a destroyer when it was well over 100 feet deep.

BUT...at extreme angles I think reflection kills clarity. I don't think the bow of the sub could be seen like that from the periscope. It's a tough question, since I guess it's one or the other. Clear so you can see the cool sights in external views, or not clear so the periscope doesn't become a magic mirror, seeing all and knowing all?
After another seven hours slaving over a hot text file, I've discovered that the game engine only used the amount of water between the camera and the submarine's hull (or whatever object was being viewed) to calculate how clear the image was. I've managed to get it to now take into account the angle the light is striking the water as well as the amount of water between the camera and the object and I think it now blends much better.

You can now see you sub quite deep if you are looking straight down at it, but you can't see it from the side so easily. At very low angles, you can no longer see very much beneath the surface, even a ship's hull just below the water. I think this looks more realistic. You can still see a bit of your sub's bow from the periscope though.

Kriller has a range of experimental shaders to test and will no doubt get back to me with what settings work and what don't.
Nisgeis is offline   Reply With Quote
Old 08-17-08, 08:53 AM   #250
kriller2
Ace of the Deep
 
Join Date: Apr 2005
Posts: 1,227
Downloads: 19
Uploads: 0
Default PE4 wip shader and reflections





HI Nisgeis, I like your new shaders so made some more work on the environment colours and textures, is there any way we can make the water less transparent? so that the water have a colour between the surface and the bottom, (see the last picture)
__________________
Kriller2.
[MODs]

Real Environment mod

and Pacific Enviroments 4 mod
kriller2 is offline   Reply With Quote
Old 08-17-08, 11:43 AM   #251
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

Quote:
Originally Posted by kriller2
HI Nisgeis, I like your new shaders so made some more work on the environment colours and textures, is there any way we can make the water less transparent? so that the water have a colour between the surface and the bottom, (see the last picture)
Just sent you experimental shader number 5. It has altered reflections, that are less distorted and give more detailed waves. The water colour should also be more representative of what is in scene.dat, so you shouldn't have to change your values too much - sorry if you already did!. The reflection brightness is also reduced a bit. I think it looks quite nice.

I've just co-incidentally been working on water fogging, as there is a disparity between stock above water transparency and below water transparency. Below water seems to be much cloudier that the above water view would suggest, so I've been trying to get a fogging effect on the refracted image, with the amount of water between the camera and the hull affecting how foggy the hull is.

I also discovered why torpedoes aren't visible under water, but haven't got a fix yet. It's not something that can be solved in the pixel shader though.
Nisgeis is offline   Reply With Quote
Old 08-17-08, 12:58 PM   #252
vickers03
Pooped from posting
 
Join Date: May 2007
Location: germany
Posts: 999
Downloads: 712
Uploads: 37


Default

Quote:
Originally Posted by Nisgeis
I also discovered why torpedoes aren't visible under water, but haven't got a fix yet. It's not something that can be solved in the pixel shader though.
interesting:hmm: more details please
vickers03 is offline   Reply With Quote
Old 08-17-08, 01:07 PM   #253
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

Quote:
Originally Posted by vickers03
interesting:hmm: more details please
The torpedo is rendered underwater, but it has no 'depth' information associated with it, so the game doesn't consider it close to the surface.

I don't know, but have a suspicioon as mentioned earlier, that the torpedo needs a unit_ship controller attached to it, but so far I haven't been able to spare any time to test that. I've spent about 30 hours on the shader code so far, so no free time .
Nisgeis is offline   Reply With Quote
Old 08-17-08, 01:51 PM   #254
Orion2012
Commodore
 
Join Date: Jul 2008
Posts: 611
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Nisgeis
Quote:
Originally Posted by vickers03
interesting:hmm: more details please
The torpedo is rendered underwater, but it has no 'depth' information associated with it, so the game doesn't consider it close to the surface.

I don't know, but have a suspicioon as mentioned earlier, that the torpedo needs a unit_ship controller attached to it, but so far I haven't been able to spare any time to test that. I've spent about 30 hours on the shader code so far, so no free time .
WOW, thats way more patience then I have!

Does anyone know, or tested the new PE with OM?? (op monson)
Orion2012 is offline   Reply With Quote
Old 08-17-08, 03:40 PM   #255
kriller2
Ace of the Deep
 
Join Date: Apr 2005
Posts: 1,227
Downloads: 19
Uploads: 0
Default

Quote:
Originally Posted by Nisgeis
Quote:
Originally Posted by vickers03
interesting:hmm: more details please
The torpedo is rendered underwater, but it has no 'depth' information associated with it, so the game doesn't consider it close to the surface.

I don't know, but have a suspicioon as mentioned earlier, that the torpedo needs a unit_ship controller attached to it, but so far I haven't been able to spare any time to test that. I've spent about 30 hours on the shader code so far, so no free time .
Your new work is awesome, here is a litlle screenshot from the new more detailed ripples on the water: ( its hard to show on a screenshot though..)


Thanks for workin on this
__________________
Kriller2.
[MODs]

Real Environment mod

and Pacific Enviroments 4 mod
kriller2 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 11:29 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.