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 12-11-11, 11:29 PM   #1
iambecomelife
Silent Hunter
 
Join Date: Apr 2005
Posts: 4,744
Downloads: 303
Uploads: 0


Default

Beautiful. Thank you for your hard work. Sadly I know next to nothing about adding bump maps & shaders to models - this inspires me to look for a good tutorial. I'm tired of my models having a "washed out" look in SH4 and SH5.
iambecomelife is offline   Reply With Quote
Old 12-12-11, 01:23 AM   #2
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

You don't add shaders to the model. Those are for rendering in Game.
The Bump or 'Normal' textures are just converted from the base texture.
Photoshop will do them as will Gimp.
SH5 uses the Blue looking ones you get right off the bat.
SH4 swizzles the Blue and Green channels so you get the green looking ones.
The normals are mapped to channel 1 so no more UV mapping is needed from the base UV's.
  Reply With Quote
Old 12-12-11, 09:14 AM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by iambecomelife View Post
Beautiful. Thank you for your hard work. Sadly I know next to nothing about adding bump maps & shaders to models - this inspires me to look for a good tutorial. I'm tired of my models having a "washed out" look in SH4 and SH5.
You have shaders in SH4 unlike SH3. The shaders control the final pixel colors you see in-game. The great thing about shaders is you can make them do just about anything you want. I would suggest playing around with the shaders in SH4 to get rid of the washed out look. It's more than likely a post-processing effect that's controlling the final look of the game.

Shaders don't have to just control final pixel color in rendering. You can have them write to a texture and then you can use that texture later on in another shader (a type of shadows does this). You can do many things with them once you understand what you have available to you. I would read up on any DirectX books dealing with shaders you can find. Real time rendering is a great book but it's geared to the intermediate and up levels. A great first book is 'Introduction to 3D Game programming with DirectX 9.0c A shader approach' by Frank D. Luna. It was the first book I read when starting to learn about shaders and what you can do with them. Knowledge of C++ is needed for that book. I now write just about everything in C# and only use C++ when I need raw speed or when C# can't do what I need it to do. Microsoft made a managed library called Managed DirectX for C# but then quickly abandoned it. Why I don't know as it works quite well. That's what I'm using in this app (Managed DirectX) despite everyone saying don't use it.

DX10 and DX11 really opened up the power of shaders. With those you can generate verticies in the shaders! You can also do a great many things that DirectX9 shaders won't let you do. I have yet to read up on DX10 and DX11 shaders.

nVidia's FX Composer 2.5 is a great free app for shaders. Has a little bit of a steep learning curve to use but once you understand it you can litterly spend hours experimenting with different shaders and making your own and testing the changes. The great thing about it is it will verify your shaders for errors. It's fine to write them with Notepad but you get no error checking. FX Composer will find your typos and missing references.

Last edited by TheDarkWraith; 12-12-11 at 09:37 AM.
TheDarkWraith is offline   Reply With Quote
Old 12-12-11, 04:53 PM   #4
Jaeger
Chief
 
Join Date: Jul 2005
Posts: 316
Downloads: 28
Uploads: 0
Default

Hi TDW,

with your shader know how, would it be possible to change the unrealistic blurry look of sh4 to the more greyish atlantic look of sh3? the sh3 look is way more authentic in my view... atm the big plus of sh3 is the most immersive ingame look.


greetz, Jaeger
__________________
Everything comes to him who waits
Jaeger is offline   Reply With Quote
Old 12-12-11, 08:13 PM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Jaeger View Post
Hi TDW,

with your shader know how, would it be possible to change the unrealistic blurry look of sh4 to the more greyish atlantic look of sh3? the sh3 look is way more authentic in my view... atm the big plus of sh3 is the most immersive ingame look.


greetz, Jaeger
Should be fairly easy to do. It's more than likely a post-process effect. A post-process effect works on the frame buffer (everything that was rendered for the scene). I'll have to look and see what SH4 has for post-process effects...I see some likely candidates that could be doing it located in \data\Filters. I'll play around with them

It wasn't a post-process effect like I thought. It was a compound filter! Anyways I have it looking SH3 like now. Making a mod of it and going to put in SH4 threads. User has option to choose between 4 different rendered 'scenes' by simply editing a text file.

Here's the link to the mod for those interested: http://www.subsim.com/radioroom/show...98&postcount=1

I can change the rendered scene color to anything...if you want it more biased to red, blue, green, or any other color just let me know

Last edited by TheDarkWraith; 12-12-11 at 09:28 PM.
TheDarkWraith is offline   Reply With Quote
Old 12-13-11, 04:51 AM   #6
Jaeger
Chief
 
Join Date: Jul 2005
Posts: 316
Downloads: 28
Uploads: 0
Default

you are genius, tdw!,

its a pity i cant test. will be back home in two weeks and test it!
__________________
Everything comes to him who waits
Jaeger is offline   Reply With Quote
Old 12-17-11, 01:31 AM   #7
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

been working heavily on this app:


Now I remember why I don't use shadow maps....Point lights I was coding in the ability to cast shadows from the lights and all was well till I enabled a point light (a directional light would've been a problem also since one has to change how the camera 'sees' the scene and has to move the camera to a position from the light's perspective and that position has to encompass the view frustum) Now I have to go back and remove the shadow maps code and change it to shadow volumes instead. Yes they are heavier on the fill rates but with such a simple 'scene' being rendered here it should be no issue.

I gave the app the ability to render the mesh's bounding sphere and/or bounding box. Currently these are the computed ones by DirectX but I'll add the ability to use the bounding box defined in the GR2 file.

Multi-sampling was added (up to 8X). The app will check what the capabilities of your video card is and set the appropriate multi-sampling.

Text overlays have been added. Pressing H will show the overlay on the upper right. Press T will show the overlay on the upper left.

The upper left overlay shows total verticies rendered (including those for the fog depth map and (upcoming) shadow volumes). It also shows the total time (in milliseconds) to render a frame (the scene). The scene is not automatically updated because there is no game loop and no message pump per se. But clicking on the model area and moving mouse back and forth will cause the 'scene' to be re-rendered.

I also added camera frustum culling to help with rendering HUGE meshes. The current number of meshes culled by the camera from it's current viewpoint is shown. Culling is done by testing AABBs against the camera frustum planes.

Fixed some bugs in my shader code dealing with lighting.

Going to add the ability to change text overlay color and bounding box/bounding sphere colors. Currently they are linked to the Render tabs solid color.

When you are using the shaders as the renderer I'm using a post-process shader to render the final image. This way I can add fog effects to the scene based on the fog depth map.

Might add the ability to set an environment cube map so you can have a 'scene'. Thought about adding water or some kind of terrain so a true scene can be had...


Last edited by TheDarkWraith; 12-17-11 at 01:48 AM.
TheDarkWraith is offline   Reply With Quote
Old 12-17-11, 07:30 AM   #8
tonschk
Sea Lord
 
Join Date: Mar 2007
Posts: 1,897
Downloads: 172
Uploads: 0
Default

This is Really Very Good , Well Done TheDarkWraith
__________________
What we do in life echoes in Eternity
tonschk 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 05:01 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.