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 04-11-11, 01:31 AM   #1
reignofdeath
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Awesome!!! I would love the graphical flooding, but I would love more so the transparent water!
  Reply With Quote
Old 04-11-11, 01:44 AM   #2
Hans Witteman
Kaleun of U-3
 
Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,815
Downloads: 123
Uploads: 0
Default

Quote:
Originally Posted by USNSRCaseySmith View Post
Awesome!!! I would love the graphical flooding, but I would love more so the transparent water!
Hi mate,

Like i say don't put hope to high it is not yet done but there is a good chance it would work.

But for transparency i really think it would be very difficult to achieve in any way because we don't have access to the ocean shader it is hard coded.

Even with dll injection i don't think it could be done.

What i try once was to simulate the boat silhouette under water with a large particle system plane where i apply a render of the boat i did underwater in 3d program but when the plane move up and dow with the sub buoyancy it was not looking good at all.

Will try to find early picture test of water flooding to show you how it would look if i can find a trigger like i say earlier.

Best regards Hans
__________________




Hans Witteman is offline   Reply With Quote
Old 04-11-11, 01:47 AM   #3
reignofdeath
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by Hans Witteman View Post
Hi mate,

Like i say don't put hope to high it is not yet done but there is a good chance it would work.

But for transparency i really think it would be very difficult to achieve in any way because we don't have access to the ocean shader it is hard coded.

Even with dll injection i don't think it could be done.

What i try once was to simulate the boat silhouette under water with a large particle system plane where i apply a render of the boat i did underwater in 3d program but when the plane move up and dow with the sub buoyancy it was not looking good at all.

Will try to find early picture test of water flooding to show you how it would look if i can find a trigger like i say earlier.

Best regards Hans

Ahh thats too bad it was hardcoded, I mean the did it when looking out of the water ( i watched your vids for HAHD) and when you were showing the sub on surface from under water you could see the conning tower and all of that) It makes no sense whatsoever why they wouldnt do the same when looking down in the water But at any rate, maybe you'll be able to figure something out, I have faith

Also, is your mod going to change anything gameplay wise like GWX did too?? (Damage, realistic flooding, crush depths etc etc.)
  Reply With Quote
Old 04-13-11, 08:08 AM   #4
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Quote:
Originally Posted by Hans Witteman View Post
because we don't have access to the ocean shader it is hard coded.
This is the ocean pixel shader code used in SH3

Code:
    ps_1_1
    tex t0
    texbem t1, t0
    mad t1, t1, c0.w, c1.w
    dp3_sat r0, v0_bx2, t0
    lrp r0.xyz, r0.w, c0, c1
    lrp r0.xyz, v0.w, t1, r0
  + mov r0.w, t0.w

// approximately 6 instruction slots used (2 texture, 4 arithmetic)
Seeadler is offline   Reply With Quote
Old 04-13-11, 12:46 PM   #5
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia Ū
Posts: 2,481
Downloads: 122
Uploads: 1
Default



ps.1.1
tex t0
texbem t1, t0
tex t2
tex t3
mad t1, t1, c0.a, c1.a
dp3_sat r0, v0_bx2, t0
lrp r0.rgb, r0.a, c0, c1
lrp r0.rgb, v0.a, t1, r0
+mov r0.a, t0.a
mul r1, t3, t2
mul r1, r1, v1
lrp r0.rgb, r1.a, r1, r0
*********************
ps.1.1
tex t0
texbem t1, t0
mad t1, t1, c0.a, c1.a
dp3_sat r0, v0_bx2, t0
lrp r0.rgb, r0.a, c0, c1
lrp r0.rgb, v0.a, t1, r0
+mov r0.a, t0.a
__________________
Alex Ū


Moses said: "Don't create yourself an idol"...
Anvart is offline   Reply With Quote
Old 04-13-11, 04:50 PM   #6
reignofdeath
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Uhhh what does all this stuff below me mean?? Translate it to english! PLEASE!! lol
  Reply With Quote
Old 04-13-11, 08:36 PM   #7
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 149
Uploads: 0
Default

Just some OT comments (sorry) but at least have something in common:the sh3 water...

days ago i was looking at the Sh3 shadows issue again and as the ships (stock at least) have out of the box nice shadows and the uboats too (we can live without shadows on crew)...seems that the main problem is how to cast shadows over the water (ocean). The hard point is that the ocean isnīt a "visible" 3D object on sh3 files, so we canīt put on it the dynamicsShadows controller...so my question is : with the Seeadler's input above (ocean pixel shaders) we can have again some hope to have shadows cast on the water?
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 04-13-11, 10:03 PM   #8
reignofdeath
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by Rubini View Post
Just some OT comments (sorry) but at least have something in common:the sh3 water...

days ago i was looking at the Sh3 shadows issue again and as the ships (stock at least) have out of the box nice shadows and the uboats too (we can live without shadows on crew)...seems that the main problem is how to cast shadows over the water (ocean). The hard point is that the ocean isnīt a "visible" 3D object on sh3 files, so we canīt put on it the dynamicsShadows controller...so my question is : with the Seeadler's input above (ocean pixel shaders) we can have again some hope to have shadows cast on the water?
Dont worry about it being off topic, I just really want to know what that there chunk of information is. And what I dont get though, is why we cant have transparent water, I mean, its set so you can see up and out of the water (Looking up from external view you can see ships and such from underwater) but why cant you see down IN the water ?? I want this so badly, you dont even know. That and the shadows are a good idea too
  Reply With Quote
Old 04-14-11, 07:52 AM   #9
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Quote:
Originally Posted by Rubini View Post
The hard point is that the ocean isnīt a "visible" 3D object on sh3 files, so we canīt put on it the dynamicsShadows controller...so my question is : with the Seeadler's input above (ocean pixel shaders) we can have again some hope to have shadows cast on the water?
Maybe!

In my widescreen dll I have hooked the DirectX function CreatePixelShader() and then dissassembled the buffer with the actual pixelshader code and dump it in a text file. Now I have every hardcoded pixel shader of SH3 as asm shader source code in separate files.

Unbelievable but SH3 uses only 5 pixel shaders

1 = shadow shader
2 = water reflection shader
3 = water shader
4 = terrain shader
5 = ??????

in comparison SH4 approx 200


Quote:
Originally Posted by Rubini View Post
Yes itīs true. If we could change the water pixel shader perhaps we could have finally transparent water! Yeah!
Now in a second step I loaded this simple asm shader code

Code:
ps.1.1
tex t0 
mov r0, t0
from a file into the buffer and replaced the hardcoded water shader with it. This shader code simply takes the texture stored in register t0 and moves it to the output register r0



This is just a proof of concept to change the pixel shaders in SH3 from external files such in SH4/5. It needs allot more work, ...extend to shader version 2.0, make use of more texture registers, storing own textures in the registers and so on...
Seeadler 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:35 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.