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

Reply
 
Thread Tools Display Modes
Old 05-04-11, 12:11 PM   #301
Rongel
Grey Wolf
 
Join Date: Jan 2009
Location: Finland
Posts: 859
Downloads: 174
Uploads: 0
Default

I'll list here our current situation, TDW and Zedi can comment if you have something to correct:

Good things

- High quality, functional ships imported from SH 4 with all maps and textures working
- Illumination, sun affects ships lighting
- Ships take damage from Deck Gun and Torpedoes
- Damage graphics (holes and internal structure) show when looked underwater
- Possibility to add SH 5 wakes
- Animated, fully working Sh 5 crew
- Possibility to add SH 5 or Sh 4 guns and instruments to ships
- Basic importing is fast

Bad things
- Ships don't cast shadows
- Ships don't reflect through water when looked above waterline
- Illumination anomaly (wrong side of the ship illuminated) when camera is really close to ships
- Damage graphics (holes and internal structure) don't show when looked above waterline
- Guns are rendered completely black, Sh 4 guns show textures only when camera is really close to ships
- Caustics show only on one side (SH 4 feature), Sh 5 caustics don't seem to work

Uncertain things (haven't been tested yet)
- Flooding modelling is unfinished
- Some ships seem to bounce and roll too much when travelling
Rongel is offline   Reply With Quote
Old 05-04-11, 12:31 PM   #302
Zedi
Sea Lord
 
Join Date: Mar 2010
Posts: 1,845
Downloads: 184
Uploads: 2
Default

If im going wild and I create a ship in Max, how would I import it in SH5? Is that possible at all?
Zedi is offline   Reply With Quote
Old 05-04-11, 02:38 PM   #303
Rongel
Grey Wolf
 
Join Date: Jan 2009
Location: Finland
Posts: 859
Downloads: 174
Uploads: 0
Default

Quote:
If im going wild and I create a ship in Max, how would I import it in SH5? Is that possible at all?
It makes my head hurt just thinking about it Who knows, maybe it's easier than this stuff!

By the way, one weird thing I have noticed is that we can edit .val file, and the changes show, we can make a nice wake and foam, but why is .sim forbidden? I mean I can edit it in S3D or in Goblin, but haven't seen any changes in game. And it contains all the nice stuff, reflections, caustics and so on....
Rongel is offline   Reply With Quote
Old 05-04-11, 05:25 PM   #304
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Zedi View Post
If im going wild and I create a ship in Max, how would I import it in SH5? Is that possible at all?
Export to .obj format. Create new Type 4/0 node and import 3D model into it (using Pack3D). I can do this really fast using hex editor....

@ Rongel: if you look at the ships I sent you they all have the new SH5 wake controllers added. Look at the wakes (they even make their own waves at high speeds)
TheDarkWraith is offline   Reply With Quote
Old 05-04-11, 07:34 PM   #305
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

after much thought about why the caustics effect is only showing on one side (for DAT file units) I came to the conclusion that the shader isn't 'interpreting' the normal map correctly. More specifically since the normal map is mirrored to the other side of the ship it will pose problems for the caustics pixel shader (upon looking at what the caustics pixel shader was doing I was correct). So I made some changes to the caustics pixel shader
Here's what I've done:
the pixel shader takes the light direction and the texel normal and does a dot product on them (both of these are vectors). It then throws this into a saturate function which just clamps the value to between 0 and 1. Do you see the problem??? I do. If the light direction and texel normal basically point in the same direction (texel is facing light) the dot product value will be > 0. If they point in basically opposite directions the dot product value will be < 0 (texel is facing away from light). Recall the saturate function clamps to between 0 and 1. Now since the normal map is mirrored on the other side of the ship, the side facing away from the light will always have a dot product value < 0 (the light direction is from the object to the light source not the other way around). PROBLEM To fix this I made the pixel shader for the caustics check the dot product value and if it's < 0 then flip the light direction (so now the light source is coming from the other side of the unit). Now caustics are displayed on both sides of the ship

Last edited by TheDarkWraith; 05-05-11 at 01:08 AM.
TheDarkWraith is offline   Reply With Quote
Old 05-04-11, 08:09 PM   #306
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Another problem solved , thankyou .
THE_MASK is offline   Reply With Quote
Old 05-04-11, 08:31 PM   #307
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Here you can see the effects of my Caustics PS change. Clearly you can tell the sun is shining on the other side of the ship


Once again unlit side in brighter daylight. I increased the caustics effect range on the unit. Instead of rendering only to a little area next to the waterline it renders more up the side of the unit. Should it render even higher

Last edited by TheDarkWraith; 05-05-11 at 01:09 AM.
TheDarkWraith is offline   Reply With Quote
Old 05-04-11, 11:45 PM   #308
stoianm
Ocean Warrior
 
Join Date: Dec 2010
Location: Montreal, Canada
Posts: 2,776
Downloads: 833
Uploads: 11
Default

Quote:
Originally Posted by TheDarkWraith View Post

very nice... will be cool if you will find a solution to put caustic on plants and rocks... i can not do that
btw... the water color is from last dynamic?... if yes you think is to much green?
stoianm is offline   Reply With Quote
Old 05-05-11, 12:57 AM   #309
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Whoever wrote the Unified Render shaders needs their head examined

[begin rant]
Let's see....caustics effects.....they are sunlight reflections/refractions off the water onto the unit.....so why would someone model them as sunlight striking the side of the unit I rewrote the pixel shader so that the light used for lighting calcs for this effect is modeled as light coming off the water and not from the sky. Now light is absorbed by water and reflected/refracted more underwater...this is a given. So why would someone model the caustic effect above water and below water the same Once again I rewrote this part of the pixel shader so that the caustic effects above water are much more vivid than below water. The light used for the light calculations for the caustic effects below water uses light coming from the sky. C'mon now, this stuff isn't rocket science. It's quite evident that the person who wrote this shader has no clue about nature and general physics And this is the first shader I've looked at...there are many more....
[/end rant]

Almost all the problems (I believe) we are having with rendering units with .dat files is because of the shaders.

Now I must pull out my reference books on shaders and do a little reading up/refreshing....
TheDarkWraith is offline   Reply With Quote
Old 05-05-11, 01:30 AM   #310
Rongel
Grey Wolf
 
Join Date: Jan 2009
Location: Finland
Posts: 859
Downloads: 174
Uploads: 0
Default

Great work TDW! I was concerned that the shader change would mess with other, regular ships, but nice to know it's only for the dat ships.

You know I did some progress too! I think I have eliminated the illumination bug/anomaly! I can use high LOD values, guns are rendered and the lighting is good! Ships take damage and it's seen underwater.

I did few things:

1. Used SH 4 stock Normal Map (I think there may be something wrong with our maps)
2. Assigned one (and only one) material to DMG_col-nodes. It seems the material has to be the last of the list in dat-file. The one that has no cfg#TXR text, but just a "1" or "2".

But yeah! We can take some of those Bad Things out of the list!

Try it out when you have time! And shouldn't you be sleeping at this time? Here is beautiful morning already!
Rongel is offline   Reply With Quote
Old 05-05-11, 01:36 AM   #311
Zedi
Sea Lord
 
Join Date: Mar 2010
Posts: 1,845
Downloads: 184
Uploads: 2
Default

Even Bdu is very impressed with this work you guys do! Here, a present from papa Donitz

Zedi is offline   Reply With Quote
Old 05-05-11, 01:39 AM   #312
Rongel
Grey Wolf
 
Join Date: Jan 2009
Location: Finland
Posts: 859
Downloads: 174
Uploads: 0
Default



Some proof! Don't know if you can see it, but the guns aren't black anymore even when I'm far away from the ship. This wasn't possible before.

EDIT: Whoa! Spilled my morning coffee!
Rongel is offline   Reply With Quote
Old 05-05-11, 01:53 AM   #313
Zedi
Sea Lord
 
Join Date: Mar 2010
Posts: 1,845
Downloads: 184
Uploads: 2
Default

Quote:
Originally Posted by Rongel View Post
Some proof! Don't know if you can see it, but the guns aren't black anymore even when I'm far away from the ship. This wasn't possible before.

EDIT: Whoa! Spilled my morning coffee!
Hope not on you keyboard!

And how about the search light?
Zedi is offline   Reply With Quote
Old 05-05-11, 02:27 AM   #314
AOTD_MadMax
Seasoned Skipper
 
Join Date: Jun 2007
Location: Bremen/Germany
Posts: 749
Downloads: 71
Uploads: 1
Default

Hi,

i see that you are doing here a great job with converting ships from SH4 to SH5 and i beleave that you will fix all the small last problems.

If you need some more units you can get my ships i have build for SH4, fore example some US DD´s like the Porter Class.



PM me if you want them.

Regards

Maddy
__________________
AOTD is gone, iam the last survivor ........
AOTD_MadMax is offline   Reply With Quote
Old 05-05-11, 03:12 AM   #315
Rongel
Grey Wolf
 
Join Date: Jan 2009
Location: Finland
Posts: 859
Downloads: 174
Uploads: 0
Default

Quote:
Hi,

i see that you are doing here a great job with converting ships from SH4 to SH5 and i beleave that you will fix all the small last problems.

If you need some more units you can get my ships i have build for SH4, fore example some US DD´s like the Porter Class.
Thanks and wow, great looking shot! When the importing goes fine enough I think it could be added to game, but I guess that is up to Zedi, if he wants to use them in his new campaign fix.
Rongel 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 06:44 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.