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

Reply
 
Thread Tools Display Modes
Old 07-25-11, 07:31 AM   #1
urfisch
Sea Lord
 
Join Date: Mar 2005
Location: Deep down in Germany
Posts: 1,944
Downloads: 42
Uploads: 0
[REQ] Howto assign "Bumpmap/texture" to the water

I am experimenting with the water since some days now. The surface needs a better structure, to simulate the light reflection, like sh4 and sh5 do. So i tried reaching this by harden the bump controllers, or forming smaller waves. All this is not very promising so far. It looks better, but the missing light reflection is the key.



Today i tried to assign an extra bumpmap controller or a simple texture (like the foam) to the water. No success so far. So i need help, as the way i assign them seems to be the problem (game crashes when entering the bridge).

Who can help me?



I work in the scene.dat, as here are all accessable parameters from the water, although the water itself seems to be defined somewhere else. I recognized not to to be able to change the minimum size of the waves. Changing the scaling options of the EnvData parameters had no effect. But adding a bumpmap controller to the EnvSim Node, or another WaterReflection Controller caused a crash in the game.

So adding a texture for the normal waves, like the game uses the foam textures for bigger waves, and adding bumpmaps to these, would give us a light reflection, right? And this is how we could raise the watereffect to a new level.

__________________


urfisch is offline   Reply With Quote
Old 07-25-11, 09:51 AM   #2
urfisch
Sea Lord
 
Join Date: Mar 2005
Location: Deep down in Germany
Posts: 1,944
Downloads: 42
Uploads: 0
Default

Found the bumpmap, the water in sh4 uses. But theres simply no access to the foam files, nor to the foam controller, which manages when foam is created. Had the idea, in adding a foam with bump map to the normal sea movement (even while smaller winds). But even that was unsuccessful til now...

Interestin: The EnvSim.act file contains the mentioned controllers + additional controllers, which do not appear in the scene.dat. As so the missing foam texture controllers. But there are also no variables stored, afai can see. Disassambled the EnvSim.act and went to the 2 addresses which are connected with the foam controller. But there are not values stored.

Need help.
__________________



Last edited by urfisch; 07-25-11 at 10:13 AM.
urfisch is offline   Reply With Quote
Old 07-25-11, 10:43 AM   #3
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,481
Downloads: 122
Uploads: 1
Default

I think, you know ...
The structure of the water surface (waves) is defined in scene.dat and in sim.cfg section [Mech] ...
Water Scale, Normal, Patches, BumpScale, Light/DarkColor, ReflIntensity, SupressWaves, ChoppyWave and so on.
Colour of water surface and reflections in the water are defined in SkyColors_***.dat... textures Sky_***.tga and reflex_***.tga.
Some colours and reflections are defined in EnvColors_***.dat...
Therefore you can change water surface parameters in scene.dat, add additional reflections object into SkyColors_***.dat and so on...
Also do not forget about [Glare] section in Effects.cfg.
__________________
Alex ®


Moses said: "Don't create yourself an idol"...
Anvart is offline   Reply With Quote
Old 07-25-11, 11:47 AM   #4
urfisch
Sea Lord
 
Join Date: Mar 2005
Location: Deep down in Germany
Posts: 1,944
Downloads: 42
Uploads: 0
Default

thank you anvart.

yes, i knew...but not about the mech in the sim.cfg, thanks for that. but the problem is differently located. please read my thread carefully. its about, how i make the foam appear on waves of smaller wind. and how do i apply a bumpmap to the foam on the waves?!

there is no normal access. the foam textures are listed in the EnvSim.act file but afai can see there is no value stored for them and i cant read/see the reference they point to, maybe. some calls go to the properties.dll...but there is no value defined...afaics.

somewhere there must be values beeing stored for this! definitely.
__________________


urfisch is offline   Reply With Quote
Old 07-25-11, 12:45 PM   #5
Wolfstriked
Grey Wolf
 
Join Date: Apr 2011
Posts: 756
Downloads: 238
Uploads: 0
Default

Urfisch,do not take this wrong way.I posted this in other thread and you did not respond.Try the GWX16km mod as its tweaked the water and not just moved the view further away.It looks very good to me with just some times of day the water turning baby blue.But there is a difference in how the water looks by large amount.Here are pics comparing stock GWX water to GWX16km mod.This is run at 1024x768 and this game looks even better when at 1600x1200.












This is how my game looks like...looks really good to me with the only thing being the shadows on the water are very jaggy.I am trying to rid that though....






Last edited by Wolfstriked; 07-25-11 at 01:07 PM.
Wolfstriked is offline   Reply With Quote
Old 07-25-11, 01:38 PM   #6
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 5,991
Downloads: 109
Uploads: 2


Default

Perhaps if the reflections of sky and clouds could be made flat bright white and broken into a myriad of small pieces it could have a similar effect to what you want If the reflection was just a texture, then it sure could be done, but the reflection I think is hardware.
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 07-26-11, 06:24 AM   #7
Hans Witteman
Kaleun of U-3
 
Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,815
Downloads: 123
Uploads: 0
Default

Hi mate,

What have you done to me after your thread the idea was haunting me and i did a full night of testing and i know exactly the effect you are after regarding faking the reflection since we lack of a modern shader model.

So i fiddle again with the reflex atlantic.tga and did a noise map to get the smallest possible speckle of white mix with some slight tonal color value.

The result came out not exactly the way i want them but i know why it doesn't show the way i want it is because of the size of that graphic that is 512x256 if someone can figured out how to make this image twice the size then we will have that great realistic look for the water.

This graphic is composed of multiple tiles that are trigger by the game engine to represent different time of the day and i already tried to double it size but it is not correctly read when re-size.

The point is if i can get a higher resolution i can then have better reflection detail on water surfaced and even there is a possibility of animating a reflection pattern on it that could simulated a much more advanced shader.



See the left lower tile is the reflection.




This one is the greenish tinted



For the blueish lovers.

Note these image are not realistic because of the distortion in reflect speckle and also i modified a lot of setting that i didn't reverted before taking screenshots.

Best regards Hans
__________________




Hans Witteman is offline   Reply With Quote
Old 08-01-11, 06:02 PM   #8
urfisch
Sea Lord
 
Join Date: Mar 2005
Location: Deep down in Germany
Posts: 1,944
Downloads: 42
Uploads: 0
Default

interesting point, anvart. will try this! thanks!
__________________


urfisch is offline   Reply With Quote
Old 08-01-11, 06:18 PM   #9
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,481
Downloads: 122
Uploads: 1
Default

Quote:
Originally Posted by Anvart
Quote:
Originally Posted by Hans Witteman View Post
...
The point is if i can get a higher resolution i can then have better reflection detail on water surfaced
and even there is a possibility of animating a reflection pattern on it that could simulated a much more advanced shader.
...
Best regards Hans
I wrote already ... You can create additional object such as SkyColor, and use this object as sky reflection model (reflection in the water)... mesh of this object must have a slightly
smaller radius than SkyColor object... and this object (we call it SkyReflection) should not
be visible... then you texture this object (texture with noise, glare and so on... and
with alpha blending!!!)... and then you can even animate this texture and/or make slow
rotation of this object... may be.
May be bad idea,... because, i think, the new object will close reflection of SkyColor's object ... even if the new object is invisible and with a-blend?? or not bad??? can't test it...
__________________
Alex ®


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

Last edited by Anvart; 08-01-11 at 07:09 PM.
Anvart is offline   Reply With Quote
Old 08-02-11, 05:09 AM   #10
urfisch
Sea Lord
 
Join Date: Mar 2005
Location: Deep down in Germany
Posts: 1,944
Downloads: 42
Uploads: 0
Default

Quote:
Originally Posted by Anvart View Post
May be bad idea,... because, i think, the new object will close reflection of SkyColor's object ... even if the new object is invisible and with a-blend?? or not bad??? can't test it...
dont know either, will test tomorrow. but the key of better water is not only the reflection map, its the surface map of the water, like the foam is. that was my initial idea: having the parameters of the foam creation set to wave high "0" and add a certain foam to these parameter. the new foam is a bump map, which scatters the surface, so we have better looking light reflection.

but i have no skills for that. havnt found the source-parameters of the foam creation either.
__________________


urfisch is offline   Reply With Quote
Old 08-02-11, 03:12 PM   #11
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,481
Downloads: 122
Uploads: 1
@urfisch
First let play/experiment with SeaFoam parameters in EnvSim controller in scene.dat file.
... and term bump of water it's not texture bumping...
__________________
Alex ®


Moses said: "Don't create yourself an idol"...
Anvart is offline   Reply With Quote
Old 08-04-11, 07:55 PM   #12
Hans Witteman
Kaleun of U-3
 
Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,815
Downloads: 123
Uploads: 0
Default Finally!

Hi mate,

Finally after almost a week of testing every possible combinations i did achieve the look i was after and it was no ride in the park!

I had to think outside the box for this one because the parameters we have for reflective materials in our 3d software is not related at all with the reflective materials in SH3 so i tried thinking in reversed mode.

First everything had to work in combination like the reflex_Atlantic.tga i did a lot of blending in paint program to achieve a very subtle effect almost invisible to the eyes in the program but that was the key to avoid too much flickering in SH3.

After that i crank the FresnelCoe to high value and raised the reflection distorsion to brake the pattern from showing on top of breakink wave and to finish i adjust clouds reflexion to get this :













I am totally satisfy with this kind of ocean for SH3 with stock shader i will adjust it further a bit but this one truly work and have zero impact on frame rate.

Edit: I forgot to mention that i forced my antialias setting to 4xx on video card.

Best regards Hans
__________________





Last edited by Hans Witteman; 08-04-11 at 08:06 PM.
Hans Witteman is offline   Reply With Quote
Old 08-05-11, 03:38 AM   #13
urfisch
Sea Lord
 
Join Date: Mar 2005
Location: Deep down in Germany
Posts: 1,944
Downloads: 42
Uploads: 0
Default

looks not bad, hans! nice shader. could you send me this one via pm? will have some test with it also.
__________________


urfisch is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 02:34 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.