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 06-19-07, 02:57 PM   #1
OakGroove
中国水兵
 
Join Date: Apr 2005
Location: Germany
Posts: 275
Downloads: 10
Uploads: 0
Default

Nice work! Is there also a red filter version available?
OakGroove is offline   Reply With Quote
Old 07-23-07, 02:43 AM   #2
jmr
Commander
 
Join Date: Sep 2004
Posts: 462
Downloads: 62
Uploads: 0
Default

Quote:
Originally Posted by OakGroove
Nice work! Is there also a red filter version available?
Now that 1.3 is out a red filter version would be nice indeed.
jmr is offline   Reply With Quote
Old 07-23-07, 05:45 AM   #3
Canonicus
XO
 
Join Date: Mar 2007
Location: In your baffles...
Posts: 434
Downloads: 624
Uploads: 7
Default

Yes!....

Mraah...you need to get busy and give us a real nice red display.

PLEASE?
Canonicus is offline   Reply With Quote
Old 07-23-07, 06:15 AM   #4
Jace11
Seasoned Skipper
 
Join Date: Mar 2005
Location: UK
Posts: 683
Downloads: 104
Uploads: 1
Default

This is an old one...




We need new ones..
Jace11 is offline   Reply With Quote
Old 07-29-07, 07:17 AM   #5
Mraah
Engineer
 
Join Date: Apr 2007
Location: Conning Tower - repairing the radar.
Posts: 200
Downloads: 8
Uploads: 0
Default

Jace11,

Is this real and working or just a bit of smoke and mirrors?

Mraah

Quote:
Originally Posted by Jace11
This is an old one...




We need new ones..
Mraah is offline   Reply With Quote
Old 07-29-07, 08:30 AM   #6
Jace11
Seasoned Skipper
 
Join Date: Mar 2005
Location: UK
Posts: 683
Downloads: 104
Uploads: 1
Default

That picture is REAL but its my PPI in 1.2 using an edited version of your PPI grid (edited colour and radial blurs, softened text etc) so it shows up as orange on the red background...

I removed the RANGE and the RANGE NUMBERS too using anvarts SH4controller.act as a guide...

I copied the original 1.3 shader into 1.2:

Original 1.3 PPIRadarPS.fx

float Fade:register(c0);
float Intensity:register(c1);
sampler map: register(s0);
sampler grid: register(s1);
sampler noise: register(s2);
sampler fadetex: register(s3);
struct PS_IN
{
float2 Tex0 : TEXCOORD0;
float2 Tex1 : TEXCOORD1;
float2 Tex2 : TEXCOORD2;
float2 Tex3 : TEXCOORD3;
};

float4 main( PS_IN In ) : COLOR
{
// compute blurred color
float4 blur=0;
int N = 7;
float R = 0.08;
float Rcolor = 0.005;
blur = tex2D(map, In.Tex0);
for(int i=0;i<N;i++)
{
float angle = i*2*3.1419265/N;
float2 coordblur = In.Tex0 + float2(cos(angle),sin(angle))*R;
float2 coordcolor = In.Tex0 + float2(cos(angle),sin(angle))*Rcolor;
blur += tex2D(map, coordblur);
blur += tex2D(fadetex, coordcolor);
}
blur/=(2*N+1);
blur = pow(blur,1.7);
//blur = pow(max(0,(blur-0.2)*1.3+0.2),2);
//blur.rb+=pow(blur.g,8);

//float4 noise=tex2D(noise,In.Tex2*4)*Intensity;

float4 color = tex2D(fadetex,In.Tex0);
//color.rb+=pow(color.g,8);

float4 ret=color;//+blur*0.25;

ret.rb+=pow(ret.g,16);
ret=pow(ret,1.5);

ret = ret+blur*3;

ret.rgb = ret.gbr * float3(1.15, 1, 1);

return ret * (0.5 + Intensity*0.5);

/*
color=color+(noise.r-0.5f)*0.5f;
float4 grid=tex2D(grid,In.Tex1);
color=lerp(color,grid,grid.a);

return color;
*/
}

EDITED VERSION:

float Fade:register(c0);
float Intensity:register(c1);
sampler map: register(s0);
sampler grid: register(s1);
sampler noise: register(s2);
sampler fadetex: register(s3);
struct PS_IN
{
float2 Tex0 : TEXCOORD0;
float2 Tex1 : TEXCOORD1;
float2 Tex2 : TEXCOORD2;
float2 Tex3 : TEXCOORD3;
};

float4 main( PS_IN In ) : COLOR
{
// compute blurred color
float4 blur=0;
int N = 7;
float R = 0.04;
float Rcolor = 0.004;
blur = tex2D(map, In.Tex0);
for(int i=0;i<N;i++)
{
float angle = i*2*3.1419265/N;
float2 coordblur = In.Tex0 + float2(cos(angle),sin(angle))*R;
float2 coordcolor = In.Tex0 + float2(cos(angle),sin(angle))*Rcolor;
blur += tex2D(map, coordblur);
blur += tex2D(fadetex, coordcolor);
}
blur/=(2*N+1);
blur = pow(blur,1.8);
//blur = pow(max(0,(blur-0.2)*1.3+0.2),2);
//blur.rb+=pow(blur.g,8);

//float4 noise=tex2D(noise,In.Tex2*4)*Intensity;

float4 color = tex2D(fadetex,In.Tex0)+tex2D(grid,In.Tex1);
//color.rb+=pow(color.g,8);

float4 ret=color;//+blur*0.6;

ret.rb+=pow(ret.g,16);
ret=pow(ret,1.4);

ret = ret+blur*3;

ret.rgb = ret.gbr * float3(1.2, 1, 1);

return ret * (0.5 + Intensity*0.85);

/*
color=color+(noise.r-0.5f)*0.5f;
float4 grid=tex2D(grid,In.Tex1);
color=lerp(color,grid,grid.a);

return color;
*/
}

HIGHLIGHTED in yellow is the main change:

Basically the same edit you guys used to get the PPI grid to show.. I think you could do the same in 1.3 and get it to show again but there is the new grid lines, which may interfere, and I don't know how to remove them...
Jace11 is offline   Reply With Quote
Old 07-29-07, 07:18 PM   #7
LukeFF
Silent Hunter
 
Join Date: Apr 2005
Location: Riverside, California
Posts: 3,610
Downloads: 41
Uploads: 5
Default

Question: the PPI's beam in 1.3 has a very jagged edge to it. Is there any way to clean it up so it has a more smooth edge to it?
LukeFF is offline   Reply With Quote
Old 07-30-07, 02:18 AM   #8
Mraah
Engineer
 
Join Date: Apr 2007
Location: Conning Tower - repairing the radar.
Posts: 200
Downloads: 8
Uploads: 0
Default

Quote:
Originally Posted by Jace11
I removed the RANGE and the RANGE NUMBERS too using anvarts SH4controller.act as a guide...


float4 color = tex2D(fadetex,In.Tex0)+tex2D(grid,In.Tex1);

HIGHLIGHTED in yellow is the main change:

Basically the same edit you guys used to get the PPI grid to show.. I think you could do the same in 1.3 and get it to show again but there is the new grid lines, which may interfere, and I don't know how to remove them...
jace11,

Very good work!! You're well ahead of me on this subject .

When you have a moment, can you provide a link to your modded ACT file or explain your change to remove the text. I looked at the ACT earlier but I couldn't figure out where and what to change.

I have a feeling the new grid lines where coded into the ACT file as well or somewhere. If we can drop their lines we'll be back in business. Again, Anvart might be able to do it ... he's has more of a grasp on the inner workings.

Oh, I tried the "lerp" command but you had it right, the old "+tex2d(grid,In.Tex1)" additon seemed to work fine.

Mraah
Mraah is offline   Reply With Quote
Old 07-23-07, 07:31 AM   #9
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Quote:
Originally Posted by Canonicus
Yes!....

Mraah...you need to get busy and give us a real nice red display.

PLEASE?
Devs have hidden PPI texture ...
__________________
Alex ®


Moses said: "Don't create yourself an idol"...
Anvart is offline   Reply With Quote
Old 07-29-07, 07:13 AM   #10
Mraah
Engineer
 
Join Date: Apr 2007
Location: Conning Tower - repairing the radar.
Posts: 200
Downloads: 8
Uploads: 0
Default

Quote:
Originally Posted by Anvart
Quote:
Originally Posted by Canonicus
Yes!....

Mraah...you need to get busy and give us a real nice red display.

PLEASE?
Devs have hidden PPI texture ...
Anvart,

Thanks for tips!! Yes, I noticed PPI texture no longer being used. I suspect it's being drawn by code in the SHController.act file ???? I say this because it's clean and basic, just lines and straight azimuth text. Perhaps you can have a look please? I'm thinking the text can be removed like you did in v1.3.

Thanks

Mraah
Mraah is offline   Reply With Quote
Old 08-01-07, 03:50 AM   #11
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Quote:
Originally Posted by Mraah
Quote:
Originally Posted by Anvart
Quote:
Originally Posted by Canonicus
Yes!....

Mraah...you need to get busy and give us a real nice red display.

PLEASE?
Devs have hidden PPI texture ...
Anvart,

Thanks for tips!! Yes, I noticed PPI texture no longer being used. I suspect it's being drawn by code in the SHController.act file ???? I say this because it's clean and basic, just lines and straight azimuth text. Perhaps you can have a look please? I'm thinking the text can be removed like you did in v1.3.

Thanks

Mraah
I think, that it's hidden texture...?
Because when you reduce brightness of PPI image (shader-code), you can see non-even painting of figures ...????
I can be not right ...
And next, blur must to be for target-mark only (as reflected signal)...
__________________
Alex ®


Moses said: "Don't create yourself an idol"...

Last edited by Anvart; 08-01-07 at 12:38 PM.
Anvart is offline   Reply With Quote
Old 07-23-07, 07:28 AM   #12
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Quote:
Originally Posted by jmr
Quote:
Originally Posted by OakGroove
Nice work! Is there also a red filter version available?
Now that 1.3 is out a red filter version would be nice indeed.
You can to change color in PPIRadarPS.vx.
Examples (i have removed blur, it is not pleasant to me):

1) Red:

float Fade:register(c0);
float Intensity:register(c1);
sampler map: register(s0);
sampler grid: register(s1);
sampler noise: register(s2);
sampler fadetex: register(s3);
struct PS_IN
{
float2 Tex0 : TEXCOORD0;
float2 Tex1 : TEXCOORD1;
float2 Tex2 : TEXCOORD2;
float2 Tex3 : TEXCOORD3;
};

float4 main( PS_IN In ) : COLOR
{
float4 color = tex2D(fadetex,In.Tex0);
float4 ret=color;

ret.rb+=pow(ret.g,16);
// ret=pow(ret,1.5);
ret.rgb = ret.gbr * float3(1.8, 0.6, 0.6);

return ret * (0.5 + Intensity*0.5);
}

2) Green:

float Fade:register(c0);
float Intensity:register(c1);
sampler map: register(s0);
sampler grid: register(s1);
sampler noise: register(s2);
sampler fadetex: register(s3);
struct PS_IN
{
float2 Tex0 : TEXCOORD0;
float2 Tex1 : TEXCOORD1;
float2 Tex2 : TEXCOORD2;
float2 Tex3 : TEXCOORD3;
};

float4 main( PS_IN In ) : COLOR
{
float4 color = tex2D(fadetex,In.Tex0);
float4 ret=color;

ret.gb+=pow(ret.r,16);
// ret=pow(ret,1.5);
ret.rgb = ret.rgb * float3(0.1, 1.6, 0.1);

return ret * (0.5 + Intensity*0.5);
}
__________________
Alex ®


Moses said: "Don't create yourself an idol"...

Last edited by Anvart; 07-23-07 at 09:54 AM.
Anvart 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 03:11 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.