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 03-26-07, 07:01 AM   #1
Kruger
Commander
 
Join Date: Jun 2006
Posts: 476
Downloads: 21
Uploads: 0
Default Environmental effects

Since my game was stuttering a lot in fog, I disabled the environmental effects. Good....the game looks very nice and runs smoothly now. But...I've lost water transparency, I no longer see my boat under the waves. Is there a way to get rid of the volumetric fog but keep the water effects ?>
Kruger is offline   Reply With Quote
Old 03-26-07, 07:35 AM   #2
SAMiV
Watch
 
Join Date: Jul 2005
Location: Finland
Posts: 19
Downloads: 145
Uploads: 0
Default

I'd like to know answer for this one too.
I also wonder, that would it be possible for the devs to add extra option, so that you can seperately turn the fog and transparent water on or off.
SAMiV is offline   Reply With Quote
Old 03-26-07, 03:44 PM   #3
Hartmann
Sea Lord
 
Join Date: Mar 2005
Location: Grid CH 26, Spain ,Barcelona
Posts: 1,857
Downloads: 204
Uploads: 0
Default

Yes, could be very interesting extra options.

perhaps when sh3 hex edit genius and modders look into game files and can discover about change water transparency or other graphic options.
__________________
But this ship can't sink!...

She is made of iron, sir. I assure you, she can. and she will. It is a mathematical certainty.

Strength and honor
Hartmann is offline   Reply With Quote
Old 03-26-07, 03:51 PM   #4
PeriscopeDepth
Sea Lord
 
Join Date: Jul 2002
Location: Pacific NW
Posts: 1,894
Downloads: 6
Uploads: 0
Default

Yeah, I wish they seperated the fog and water transparency too, but currently it's either both or none. I wonder which is more of a performance hit, fog or transparent water?

PD
PeriscopeDepth is offline   Reply With Quote
Old 03-26-07, 04:05 PM   #5
GoldenEagle8
Engineer
 
Join Date: Mar 2007
Location: I think I'm lost?
Posts: 206
Downloads: 4
Uploads: 0
Default

What are the chances of that sort of opotion being in the next patch?

(slim to none?)
__________________

"YES! Everything I do is a surprise! EVEN TO ME!"
"Laws are like sausages, it is better not to see them being made." ~Otto von Bismarck
"I thought so little, they rewarded me by making me the ruler of the Queen's Navy." ~Sir Joseph Porter (HMS Pinafore)
GoldenEagle8 is offline   Reply With Quote
Old 03-26-07, 05:06 PM   #6
Mud
Captain
 
Join Date: Mar 2005
Posts: 541
Downloads: 50
Uploads: 0
Default

Guys test something please ,'cos I think this makes the fog disappear.
Main folder /Data/shaders/VolumetricFog/VolumetricFogPS.fx <--- open with notepad and copy & paste this .... MAKE A BACKUP though.

struct PS_IN
{
float4 WSPos : TEXCOORD0;
float CSZ: TEXCOORD1;
float2 Tex:TEXCOORD2;
};

float elapsedTimeMod1000: register(c0);
float intensity: register(c1);
float3 fogColor: register(c2);


sampler3D volnoise: register(s0);
sampler depthBuffer: register(s1);


float ExpCutoff(float v,float cover,float sharpness)
{
float c=cover-v;
c=max(c,0);
c = 1 - pow(sharpness,c);
return c;
}

float4 main( PS_IN In ) : COLOR
{
//return 0.1;
//return float4(In.WSPos.xyz,1);
float4 wsp=tex2D(depthBuffer,In.Tex);
//return In.WSPos.y;
//return 0;
//return In.CSZ/50;
if(wsp.a<=0)wsp.a=1e10;
clip(wsp.a-In.CSZ);
//if(wsp.a>0 && wsp.a-In.CSZ<=0)return 0;
//else{
//return In.WSPos;
//return float4(1,1,1,0.02);

float scale=0;
float speed=0.00;
float3 windDirection={0,-0,0};

float3 t0=scale*In.WSPos.xyz*0.0031+elapsedTimeMod1000*0. 11*speed*windDirection;
float3 t1=scale*In.WSPos.xyz*0.0037+elapsedTimeMod1000*0. 13*speed*windDirection;
float3 t2=scale*In.WSPos.xyz*0.0029+elapsedTimeMod1000*0. 17*speed*windDirection;
float3 t3=scale*In.WSPos.xyz*0.0023+elapsedTimeMod1000*0. 19*speed*windDirection;
//float3 t4=scale*In.WSPos.xyz*0.0031+elapsedTimeMod1000*0. 05*speed*windDirection;
//float3 t5=scale*In.WSPos.xyz*0.0041+elapsedTimeMod1000*0. 29*speed*windDirection;
//float3 t6=scale*In.WSPos.xyz*0.0043+elapsedTimeMod1000*0. 23*speed*windDirection;
//float3 t7=scale*In.WSPos.xyz*0.0047+elapsedTimeMod1000*0. 07*speed*windDirection;

//return float4(wsp,1);
float3 v=In.WSPos.xyz-wsp.xyz;
float L=saturate(In.WSPos.y/2);
//L=1;
//return float4(v,1);
//float L=saturate(length(v)/10);
//L=saturate(dot(v,v)/40);
//L=1;
//return float4(L,L,L,1);
intensity*=L;
intensity*=saturate(1-In.WSPos.y/40);


float f=tex3D(volnoise,t0)+
tex3D(volnoise,t1*2)/2+
tex3D(volnoise,t2*4)/4+
tex3D(volnoise,t3*8)/8;
/*tex3D(volnoise,t4*16)/16+
tex3D(volnoise,t5*32)/32;
tex3D(volnoise,t6*64)/64+
tex3D(volnoise,t7*128)/128*/;
//f=saturate((f-0.2)*2);
//f*=1;
//f-=1.5;
//f=ExpCutoff(f,0.3,0.1);
//f+=saturate(1-In.WSPos.y/30);
//float brightness=0.2;
/*float a0=0.4;
float a1=0.0;
float a2=0.0;
if(f>a2)f=0;
else if(f<a0)f=0;
else{
if(f<a1)f=(f-a0)/(a1-a0);
else f=(a2-f)/(a2-a1);
}

//f=step(0.4,f)-step(0.45,f);
fogColor=float3(1,0,0)*f;*/

//intensity=1;
float alpha=pow(f,0.0)*intensity;
//return intensity;
//fogColor=0.2;
return float4( fogColor/*+brightness*/, alpha*0.0);

The fog is gone but it need testing.

Mud
__________________
Mud is offline   Reply With Quote
Old 03-26-07, 05:18 PM   #7
Probex
Soundman
 
Join Date: May 2006
Posts: 148
Downloads: 24
Uploads: 0
Default

I tested this code and the fog wasn't visible anymore. BUT, I am curious whether the fog is simply not visible but still calculated by the hardware, therefore offering no benefit, or is it truly off.
I think that the DEVs might be in a better position to implement this properly.

What I did notice with the fog off, were the lightshafts now visible in the atmospehere.
I guess the lightshafts interact with the fog to give it more realistic look.

Ideally we would want to disable the lightshafts (ABOVE water and NOT under the water) along with the fog. Or perhaps only the shafts above the water and leave the fog on.

There is separate code for the shafts above and below the surface, so it makes sense that it may be disabled separately.

Just a few more display options in the menu.
Probex is offline   Reply With Quote
Old 03-26-07, 05:55 PM   #8
malkuth74
Sonar Guy
 
Join Date: Feb 2005
Posts: 377
Downloads: 20
Uploads: 0
Default

I had to shut it off too and it sucks. Some kind of bug where your framerates drop to 1 if you look at a certain spot. Some people have taken pictures of these so called spots and something is not right.
__________________

malkuth74 is offline   Reply With Quote
Old 03-26-07, 05:58 PM   #9
DJSatane
Electrician's Mate
 
Join Date: Apr 2005
Posts: 140
Downloads: 1
Uploads: 0
Default

Well, I hope you guys also know about the bug related to environmental effects that is displayed in detail in this thread:

http://www.subsim.com/radioroom/showthread.php?t=108938

I am curious whether that bug still occurs when you disable just the fog.

What we would really want is to fix that mysterious polygon that appears with Environmental effects on and kills fps, maybe removing some routines while still having water transparency is possible.
__________________
DJSatane - https://twitter.com/DJSatane
DJSatane 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 04:14 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.