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 > Silent Hunter 4: Wolves of the Pacific
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 06-02-10, 01:52 PM   #1
Sailor Steve
Eternal Patrol
 
Sailor Steve's Avatar
 
Join Date: Nov 2002
Location: High in the mountains of Utah
Posts: 50,369
Downloads: 745
Uploads: 249


Default Water Clarity

How do I change the clarity of the water in SH4? In SH3 it's easy because it's covered by Commander.

I've checked the Scene.dat file with S3D, and couldn't find anything relevant to it, even though I've been told it's there.
__________________
“Never do anything you can't take back.”
—Rocky Russo
Sailor Steve is offline   Reply With Quote
Old 06-02-10, 01:59 PM   #2
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

I think it's called 'Underwater Fog' but it's been a long time since I looked in those files. Someone who knows what they are talking about will hopefully be along soon.
__________________
--------------------------------
This space left intentionally blank.
Nisgeis is offline   Reply With Quote
Old 06-02-10, 03:38 PM   #3
BillBam
Watch Officer
 
Join Date: Mar 2010
Location: Yuba/Sutter, CA
Posts: 347
Downloads: 171
Uploads: 0
Default

Webster has a mod for water clarity here:

http://www.subsim.com/radioroom/showthread.php?t=152907
__________________
BillBam is offline   Reply With Quote
Old 06-02-10, 03:46 PM   #4
Zel
Sailor man
 
Join Date: Jun 2009
Posts: 45
Downloads: 8
Uploads: 0
Default

If you mean water clarity when the camera is above the water surface, go to data\shaders\water , and edit "watertransPS.fx" or "watertransp64PS.fx". can't remember which one. You can edit them with the notepad, search for DepthLength or MaxDist.

If you're talking about clarity for underwater view, open scene.dat with S3d
Node - sky -> EnvData -> EnvData -> Underwater -> Fog -> ZMax

I'm not sure how much is one unit of ZMax, though.

Hope that helps!
Zel is offline   Reply With Quote
Old 06-02-10, 07:26 PM   #5
Sailor Steve
Eternal Patrol
 
Sailor Steve's Avatar
 
Join Date: Nov 2002
Location: High in the mountains of Utah
Posts: 50,369
Downloads: 745
Uploads: 249


Default

It did help, Zel, and thank you. I did mean the underwater view. As I said, I had read 'Scene.dat' but I went in and couldn't find any files that said "Water". Your directions took me right there. The 'Zmax' seems to be the same as the files in SH3. I set it for 3, and then for 2, and I'm happy with the results.

3:





And 2:





Though it's certainly not to everyone's taste, I like the murky feeling.

I hadn't thought about the transparency as seen from above, but now that you mention it I might try to shorted that a bit as well. Problem is I looked at the files you mentioned, and I found the word "Depthlength", but I'm not sure what the numbers mean and was afraid to fiddle with it. Anyway, I'll figure it out sometime (probably not without more help).

Thanks again.
__________________
“Never do anything you can't take back.”
—Rocky Russo
Sailor Steve is offline   Reply With Quote
Old 06-02-10, 08:14 PM   #6
peabody
Admiral
 
Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
Default

Quote:
Originally Posted by Sailor Steve View Post
I found the word "Depthlength", but I'm not sure what the numbers mean and was afraid to fiddle with it.
Thanks again.
Well I can understand being nervous, being so new to the forums and all....

Throw it in a Mod folder and fiddle away.

Peabody
__________________

System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2.

peabody is offline   Reply With Quote
Old 06-02-10, 08:46 PM   #7
Sailor Steve
Eternal Patrol
 
Sailor Steve's Avatar
 
Join Date: Nov 2002
Location: High in the mountains of Utah
Posts: 50,369
Downloads: 745
Uploads: 249


Default

Quote:
Originally Posted by peabody View Post
Well I can understand being nervous, being so new to the forums and all....
Hey! No fair picking on the old guy!

(Cool! I've finally reached an age where I have my own special 'victim' status!)

Quote:
Throw it in a Mod folder and fiddle away.

Peabody
You mean, like, make a JSGME-ready folder and test it that way?

D'OH!
__________________
“Never do anything you can't take back.”
—Rocky Russo
Sailor Steve is offline   Reply With Quote
Old 06-03-10, 01:29 AM   #8
Zel
Sailor man
 
Join Date: Jun 2009
Posts: 45
Downloads: 8
Uploads: 0
Default

In the shader files, find this:


depthlength = saturate(depthlength/maxDist);

in the other file:

depthlength = saturate(depthlength/maxDist + shallowfactor);

Replace maxDist with (maxdist * X)


example: depthlength = saturate(depthlength/(maxDist*0.5));

X>1 should increase clarity
X<1 should decrease it

Mod both watertranspPS.fx and watertransp64PS.fx because i'm not sure which one the game will use.
Zel is offline   Reply With Quote
Old 06-03-10, 02:31 AM   #9
peabody
Admiral
 
Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
Default

Quote:
Originally Posted by Sailor Steve View Post
Hey! No fair picking on the old guy!

(Cool! I've finally reached an age where I have my own special 'victim' status!)


You mean, like, make a JSGME-ready folder and test it that way?

D'OH!
Yup that's what I meant. As for picking on the old guy, I'm only a step and 1/2 behind you. Woops, did I fall asleep again?

Peabody
__________________

System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2.

peabody is offline   Reply With Quote
Old 06-03-10, 10:41 AM   #10
Sailor Steve
Eternal Patrol
 
Sailor Steve's Avatar
 
Join Date: Nov 2002
Location: High in the mountains of Utah
Posts: 50,369
Downloads: 745
Uploads: 249


Default

Well, I've just spent two hours experimenting and testing, and I like it!

@ Peabody: Thanks for the suggestion on JSGME. I'm going to relable what I've done and make several folders, one for Atlantic, Med and who knows what.

@ Zel: Special thanks for telling me what I needed to know. There is one thing though - it's the opposite of what you thought. The smaller number is more clear, larger is less. I don't know why, but there it is.

Here's what I found:

.02




.05




1




2




5




Any darker than 5 and you really start to lose the boat at periscope depth. I'm thinking I'll experiment with 20 meters and see how that looks, as that's about as deep as a plane should be able to spot you. Maybe 30, so the top of the conning tower will be at about 20. We'll see how it goes.
__________________
“Never do anything you can't take back.”
—Rocky Russo
Sailor Steve is offline   Reply With Quote
Old 06-03-10, 01:18 PM   #11
ichso
Ace of the Deep
 
Join Date: Jul 2005
Location: Germany's oldest city alive
Posts: 1,066
Downloads: 57
Uploads: 0
Default

Hi there,

I was looking into the same issue some time ago and wanted to reduce the water clarity (when viewed from the surface). I was quite happy with the result and wanted to make a little release out of it.
But because of a lack of time I stopped tweaking it further - and playing too.

Here is what I got up until that point:

Also in this thread:
http://www.subsim.com/radioroom/showthread.php?t=162424

The change done was to edit the last lines of the main function in the data/shaders/waterTranspPS.fx file like this:
(IIRC, can't test right now)
Code:
     float maxDist = WaterParams.w;

     //[ser] Increase opacity near intersections to make water edge more visible
     float shallowfactor = saturate(1/(depthlength*25 + 1));
     //[ser] Attempt a pseudo-antialiasing by decreasing opacity smoothly near zero-depth
     shallowfactor = saturate(shallowfactor - pow(shallowfactor,4))*2;
    depthlength = saturate(depthlength/maxDist + shallowfactor);
ichso is offline   Reply With Quote
Old 06-03-10, 03:24 PM   #12
Sailor Steve
Eternal Patrol
 
Sailor Steve's Avatar
 
Join Date: Nov 2002
Location: High in the mountains of Utah
Posts: 50,369
Downloads: 745
Uploads: 249


Default

That's interesting. I know so little about the files and what they do that I've never considered trying anything at all, much less the fancy stuff. I keep hoping to learn but I have so many other things I'm doing that I just keep putting it off.
__________________
“Never do anything you can't take back.”
—Rocky Russo
Sailor Steve is offline   Reply With Quote
Old 06-03-10, 04:20 PM   #13
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

Hmmm, I fixed the white jaggies around the sub in PE4 - are they back again in Real Environment Ichso?
__________________
--------------------------------
This space left intentionally blank.
Nisgeis is offline   Reply With Quote
Old 06-03-10, 04:42 PM   #14
ichso
Ace of the Deep
 
Join Date: Jul 2005
Location: Germany's oldest city alive
Posts: 1,066
Downloads: 57
Uploads: 0
Default

Quote:
Originally Posted by Nisgeis View Post
Hmmm, I fixed the white jaggies around the sub in PE4 - are they back again in Real Environment Ichso?
Hm, do you mean this white rectangle on my screenshot ? That was there for some other reason I do not remember anymore.
ichso is offline   Reply With Quote
Old 06-03-10, 05:05 PM   #15
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

Quote:
Originally Posted by ichso View Post
Hm, do you mean this white rectangle on my screenshot ? That was there for some other reason I do not remember anymore.
The white rectangle was probably because of umark.dds being changed and isn't what I'm referring to. It's hard to see in your screenshots, as they have been scaled down, but it appears that there are white pixels around the wires and edges of the sub.
__________________
--------------------------------
This space left intentionally blank.
Nisgeis 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 05:24 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.