SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH4 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=219)
-   -   Transparent Water in SH4 (https://www.subsim.com/radioroom/showthread.php?t=145590)

Urbijan 12-17-08 01:30 AM

Transparent Water in SH4
 
Hi Guys, Sailors, SH4 Fans and Modders:arrgh!:

I really have a question, which bothers me quit a lot. How can I do that Water in SH4 more transparency? I used already some Mods to get a better result, but I'm still not right satisfied. That Transparency is possible I know from these Mods. Which DAT file is responsible and which entree in it has how to changed, that I get that physical right result of a transparency Water? I need a start then I couldn't find the responsible DAT file and the texture files seems to bee not responsible. I'm still not coming forward, maybe some of the Modders have a clue and like to help me.
The final Goal is to get from a angel above 15 Degree til 90 above the Water 50% til 100 % transparent - until in a depth of 30 m or 90 feet in the Pacific Ocean. It would help too, would I have the Water complete transparency, in the case that idea with the angel and different transparency doesn't work.
Thanks for the help.:up:

I'm using the SH3editor for working with DAT, SIM, ZON Files and have quite a lot Graphic Software like Adobe CS2, Gimp and Paint.net.

kriller2 12-17-08 05:00 AM

Quote:

Originally Posted by Urbijan
Hi Guys, Sailors, SH4 Fans and Modders:arrgh!:

I really have a question, which bothers me quit a lot. How can I do that Water in SH4 more transparency? I used already some Mods to get a better result, but I'm still not right satisfied. That Transparency is possible I know from these Mods. Which DAT file is responsible and which entree in it has how to changed, that I get that physical right result of a transparency Water? I need a start then I couldn't find the responsible DAT file and the texture files seems to bee not responsible. I'm still not coming forward, maybe some of the Modders have a clue and like to help me.
The final Goal is to get from a angel above 15 Degree til 90 above the Water 50% til 100 % transparent - until in a depth of 30 m or 90 feet in the Pacific Ocean. It would help too, would I have the Water complete transparency, in the case that idea with the angel and different transparency doesn't work.
Thanks for the help.:up:

I'm using the SH3editor for working with DAT, SIM, ZON Files and have quite a lot Graphic Software like Adobe CS2, Gimp and Paint.net.

Hi Urbijan, The transparency of the water is defined in the pixel shaders in the SH4/data/shaders/water, me and Nisgeis have been working on what you suggest for the water in PE4, but we was running into alot of problems due to how the shader works. We were allso trying to make the water colour azure near the shores and succeeded, but then we suddenly had a problem with how the depth is defined in the engine which resulted in strange spots around the world where the water suddenly would look azure all though you were on the middle of the pacific :o as it turned out we had to scrap the azure colour before release of PE4.

You can try download PE4 and have a look in the SH4/data/shaders/water directory, but bear in mind that if you decide to use Nisgeis work in your work remember to credit him ;), he used allmost 100 hours on those files...

Seeadler 12-17-08 05:45 AM

Quote:

Originally Posted by Urbijan
Which DAT file is responsible and which entree in it has how to changed, that I get that physical right result of a transparency Water?

Transparency is not controled by an entry in a DAT file, the transparency is calculated via a water pixel shader.

It depends on your hardware and the game settings which water pixel shader is used, there are several for various settings (3d waves on/off, high/low textures etc. ). The one which calculates the transparency is waterTransPS.fx

Urbijan 12-17-08 11:21 AM

Reply Transparent Water in SH4
 
@Seeadler

I got that feeling, that I was looking on the wrong track. Thanks.

@Kriller2

Thanks, no problem at all. I do already use that mod for gaming, great Job from you Guys. Is there a specific setting what caused the transparency? I really like PE4, but I have transparency from 0 to 15 Degree and from 15 to 90 Degree Zero Transparency, the Water is like SH3.A view through the Periscope, I can see my Bow submerged in the Water, a external View and I see by calm sea nothing through the surface. Crazy, isn't it?

Seeadler 12-17-08 12:43 PM

I assume you want something like this, seeing your sub at shallow depth.
http://img266.imageshack.us/img266/9...tsh4fl1.th.png

http://img183.imageshack.us/img183/8...ingsmu6.th.png
first check if your settings correspond to these, only with this high settings the watertransPS.px is used. With other settings, one of the other pixel shader files for water are used, these shaders are for PC's without high-end graphic cards and implement the tranparency in a lesser way or not

Urbijan 12-17-08 05:44 PM

Transparent Water in SH4
 
@Seeadler

yes, the first picture is that what I mean, more transparent I would like. PE4 brings that increase in the transparency, is there more possible?
The settings are right, to get transparency, you have to check primary the Env. Effects in the graphic settings of SH4.
The used graphic card is older, it is a Nvidia XFX Geforce 6800 XT with 256 MB, AGP 8x, Pixel shader 2.0. The card is able to show that Transparency effect.

Seeadler 12-18-08 03:37 AM

Quote:

Originally Posted by Urbijan
PE4 brings that increase in the transparency, is there more possible?

I use an own heavily modified WaterTransPS.fx file. I will take a look at it during the weekend to see what's the difference to PE4 and whether my modifications has some influence to the transparency.

Nisgeis 12-18-08 03:42 AM

Hi Urbijan,

There are two parts to what you want to do. The first is the angle, which is called fresnel (pronounced frennel) and that's the factor that determines how much of the transparency you can see, depending on the angle of the camera, due to refraction. I think it's in scene.dat, as it's a parameter passed to the shaders. So, have a look in there to see if you can find that value. The alternative is to edit the shader code to change the way it processes that value. the variable in there is called fresnel (I am almost sure about that).

The second factor is the depth that you can see down to. That's passed as information in a sampler (like a bitmap of the scene that the graphics angine has drawn) and it has information on how shallow your submarine or the land is. It's set to only draw quite shallow in stock. As has been said the shaders control a lot of what happens, but it depends on what data is passed to it by the game engine.

Urbijan 12-18-08 05:09 AM

Great
 
Quote:

Originally Posted by Seeadler
I use an own heavily modified WaterTransPS.fx file. I will take a look at it during the weekend to see what's the difference to PE4 and whether my modifications has some influence to the transparency.

That sounds really good :up: can't wait til tomorrow ;)

Urbijan 12-18-08 05:34 AM

Okay, great and now?
 
Quote:

Originally Posted by Nisgeis
... I think it's in scene.dat, as it's a parameter passed to the shaders. So, have a look in there to see if you can find that value. The alternative is to edit the shader code to change the way it processes that value. the variable in there is called fresnel (I am almost sure about that).

The second factor is the depth that you can see down to. That's passed as information in a sampler (like a bitmap of the scene that the graphics engine has drawn) and it has information on how shallow your submarine or the land is. It's set to only draw quite shallow in stock. As has been said the shaders control a lot of what happens, but it depends on what data is passed to it by the game engine.

So, sound really interesting. I was already looking in the scene.dat. Which settings are where to do? I found fresnel parameters by more, Sky makes no sense for me, either sun, moon, weather, fog and even underwater not. I'm not really on the way for a solution.
Can you specify what I need to do, maybe you have an walk through for me:up:. I need the line, where to change, the exact parameter and his value. Do you know something about that?

@ all here: Thanks a lot for your help Guys, I reall appreciate your support.

Greetings:up:

Urbijan 12-25-08 06:01 AM

Any Help in Sight?
 
...so, I wait and test and test and wait ...:hmm:
Some Guys offered their help here and by all that Christmas Stuff and the Time around I feel being forgotten now.;)
One thing I figured out by my own, by searching around in the subsim-forum.
Env.Effects disturbing the Transparency with their extra layer of shadow effects of clouds on the water. I unchecked this in the graphic options and instead I checked the volumetric fog. That was a great step forward. I have now Transparent Water, if the sea is calm. And this with the scene.dat of the Stockversion from SH4 1.5 UBM.:up:

Have all a merry Christmas, a happy New Year and too a happy hunting in the next year.:up:

http://i292.photobucket.com/albums/m...an/SH4/NC8.jpg

http://i292.photobucket.com/albums/m...an/SH4/NC3.jpg

http://i292.photobucket.com/albums/m...n/SH4/NC11.jpg


All times are GMT -5. The time now is 05:22 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.