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 02-16-09, 01:00 AM   #31
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by rascal101
I'm very interested in this please keep investigating and keep us informed, also curious if any one knows how to improve glare, ie when light hits a metal surfacew there is a reflected glare, would be more pronounced on wet surfaces. does any one think this can be improved or modded?
play with the specular. If you're going for a desired effect for one particular item then you'll need to create a new 2/0 node for it.

Well I took what I found above and applied it to the hull and turm of the VIIb and it's very interesting what came about from it. The shading of light is very pronounced and profound - I like it! And it hasn't even been tweaked yet, this was just slapped together to see how it would appear in game.

left side:


camera moved over to right side:


okay played enough today. I'm tired
Maybe Privateer will let us know what he did and we can get some very interesting effects. If not, in time I'll figure it out.
TheDarkWraith is offline   Reply With Quote
Old 02-16-09, 05:58 AM   #32
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

RB, your pics ... "Ìíîãî øóìà èç íè÷åãî" ...
Speech about shadow, not illumination ...
__________________
Alex ®


Moses said: "Don't create yourself an idol"...
Anvart is offline   Reply With Quote
Old 02-16-09, 09:33 AM   #33
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Anvart
RB, your pics ... "Ìíîãî øóìà èç íè÷åãî" ...
Speech about shadow, not illumination ...
Hey Anvart, I have no clue what you said let alone do I really care. But let me pose this question to you....why not work with me on this? I know you're good with hex editing as I am. Oh, and this should put your whatever you said above to rest....




By replacing the light source from ambient to sunlight I was able to have the object cast shadows onto itself. Now I just have to have it project those shadows onto other objects.....
TheDarkWraith is offline   Reply With Quote
Old 02-16-09, 07:58 PM   #34
Reece
CINC Pacific Fleet
 
Reece's Avatar
 
Join Date: Sep 2003
Location: Down Under
Posts: 32,736
Downloads: 171
Uploads: 0
Default

Quote:
Now I just have to have it project those shadows onto other objects.....
Is that all!!
BTW, G'day.
__________________

Sub captains go down with their ship!
Reece is offline   Reply With Quote
Old 02-17-09, 08:38 AM   #35
Uber Gruber
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Brillianty stuff RacerBoy and a big thumbs up to your open attitude, its a refreshing thing to have.

Say NO to fuddy duddy modders, say YES to Glasnost!

  Reply With Quote
Old 02-17-09, 10:46 AM   #36
Weiss Pinguin
Ocean Warrior
 
Join Date: Nov 2008
Location: Auburn, Alabama
Posts: 3,333
Downloads: 101
Uploads: 0
Default

Wow, looking forward to this, hopefully my rig can take it.
__________________
Weiss Pinguin is offline   Reply With Quote
Old 02-17-09, 11:11 AM   #37
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

You might be waiting awhile. I understand how to make it work on the 88mm gun but I don't fully understand why it works. Also I have not been able to make it cast those shadows onto other objects.
I've been trying to make other objects cast shadows onto themselves and haven't had much luck yet
So today's project is picking the 88mm completely apart, node by node, playing node isolation and node hiding to try and fully understand why it works on the 88mm.
I've been hoping Privateer might chime in since it appears he's obviously figured out how to cast shadows onto other objects. Maybe even Anvart might take an interest and dive into the files with his hex editor and discover something?
The 88mm casting shadows onto itself didn't even make my laptop (2.0 GHz 8600 GeGorce) flinch. It doesn't appear to use much processing power to make them. The shadow is basically a reflection but instead of on water it's on the object.
Time to get busy.
TheDarkWraith is offline   Reply With Quote
Old 02-17-09, 11:40 AM   #38
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

It can't be as trivial as setting UseObjectVisibility = False to "True" in the DynamicShadowCast controller, right?

I lack the will to stick a SH3 gun on something to try it (as simple as that is, I'm feeling lazy right now).
tater is offline   Reply With Quote
Old 02-17-09, 12:33 PM   #39
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by tater
It can't be as trivial as setting UseObjectVisibility = False to "True" in the DynamicShadowCast controller, right?

I lack the will to stick a SH3 gun on something to try it (as simple as that is, I'm feeling lazy right now).
I'm hoping to discover what the UseObjectVisibility actually does (and how to use it). Currently I have them all disabled (0x00) to make the shadows on the 88mm. I tried setting that to true (0x01) which killed the shadow (now the question is why?)
TheDarkWraith is offline   Reply With Quote
Old 02-17-09, 01:04 PM   #40
Jaeger
Chief
 
Join Date: Jul 2005
Posts: 316
Downloads: 28
Uploads: 0
Default

Quote:
Originally Posted by Uber Gruber
Brillianty stuff RacerBoy and a big thumbs up to your open attitude, its a refreshing thing to have.

Say NO to fuddy duddy modders, say YES to Glasnost!

absolutely correct. i hope privateer will read this and enjoy the process for the best result. more brains working on the same prob can find more ways...
__________________
Everything comes to him who waits
Jaeger is offline   Reply With Quote
Old 02-17-09, 01:53 PM   #41
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

this is like a living document of my tearing the 88mm deckgun apart in the GUNS_SUB.dat file:

well here's observation #1: before I went to bed last night shadows were working on the 88mm. I wake up this morning and shadows don't work After pulling my hair out for a couple of hours I walked away from the computer and thought about what I did right before I went to bed. Then it occured to me that I deleted a file from the \SilentHunterIII directory.....that file was SH3Controllers.ACT and renamed the backup copy of it to it's original name. Why does this matter? Here's why:

SH3 version 1's SH3Controllers.ACT file is 148kb. SH3 version 1.4b's SH3Controllers.ACT file is 144kb. When you look at both using a hex editor you see that the DynamicShadows render controller was removed from the 1.4b version. So step #1 in getting shadows to work is you have to use SH3 1.0's SH3Controllers.ACT file.

observation #2: I was thinking that a WaterReflection controller might need to be attached to them to make it work (since the 88mm had some WaterReflection controllers in it and in the 3D world you make 'projections' of the object to cast shadows of it and the WaterReflection is a type of projection) but no. I removed all the WaterReflection controllers and still got wonderful shadows:


you can see the wheels and the knobs of the wheels being reflected along with the harnesses on the 88mm itself I'll keep picking it apart.

observation #3: where the DynamicShadow light source is placed matters. Placing it at the root node (one with no 3D model ID and no parent ID) will not produce shadows. It has to be placed on a node with a 3D model AND a parent ID. I tried adding a dummy node to the root so that the dummy node had a parent ID to see if it would work - nope. It appears it needs a 3D model with the light source. Now whether it will work on a node with a 3D model ID and no parent ID is something to try. The light source comes from the \data\scene.DAT file.

From SH3 v1.0 SH3Controllers.ACT file:
DynamicShadow.......DynamicShadow Render Controller. The entire sub hierarchy will receive shadow from all objects with DynamicShadowCast user data (NOT DRAWLIST & FREE) in this sub hierarchy. d..lG...G..`G...G...G..NG..Light...object..Paralle l light which will cast shadow... ... a...E...E...E...c..HG..BG..<G...\DynamicShadow.cpp

I'm thinking 'NOT FREE' means no parent ID and/or no 3D model ID. 'NOT DRAWLIST' has me stumped.

observation #4: the node the DynamicShadow light source is attached to DOES NOT need an SHD_ node attached to it. Ok, this makes sense now. Trying to attach the DynamicShadow light source to the root node with no 3D model will have it trying to projects shadows onto nothing. Once I moved it to the beginning node with a 3D model in the 88mm gun (the base or copil) then it had a place to cast shadows onto (the base or copil and the hierarchy under it). An SHD node was not needed for this base (or copil) because this is where the shadows are being projected onto (the entire hierarchy of copil). Well that puts observation #3 partially to rest.

observation #5: using different light sources produces different effects or none at all. Using ambient light gives blocky, black shadows (of different shades depending on light) over the entire object surface (you can't tell what's being shadowed), using sunlight for the light source gives the results above in the screenie, using sun_reflection as the light source gives no shadows. Have to try making my own light source and figure out how this works.

observation #6: everything under copil that is wanting to be shadowed has to have (appears as of now) an SHD type node with a DynamicShadowCast controller attached to that SHD node. Time to tear this apart and see how it works.
as I suspected it works. Removed the SHD_88mm_UDeck_Gun_High_Base node (along with it's DynamicShadowCast node) and here's what I got (just the shadowing from the main gun body):


From SH3 v1.0 SH3Controllers.ACT file:
DynamicShadowCast...DynamicShadowCast User Data.....UseObjectVisibility.Use the object visibility for shadow.... ....b...E...E...E...b..HG..BG..<G...T...b...b...E. ..E.. c..`c...F...F..e:\ubi_projects\silenthunter_root\s ilenthunter3\src\sh3controllers\DynamicShadow

now to determine the different combinations (if any besides the known) that will bring back the missing shadows that I removed. Time to play.

Gave 88mm_UDeck_Gun_High_Base node:
- just SHD node - buzzer
- just DynamicShadowCast with UseObjectVisibility set to 0x0 - buzzer
- just DynamicShadowCast with UseObjectVisibility set to 0x1 - buzzer
- SHD node and DynamicShadowCast node with UseObjectVisibility set to 0x0 - buzzer
- SHD node and DynamicShadowCast node with UseObjectVisibility set to 0x1 - buzzer
- SHD node with DynamicShadowCast node attached to it with UseObjectVisibility set to 0x1 - buzzer
- SHD node with DynamicShadowCast node attached to it with UseObjectVisibility set to 0x0 - ding ding winner!! (as I expected)

now to try and make another gun cast shadows onto itself. 20mm single looks like a good one...

Last edited by TheDarkWraith; 02-17-09 at 05:42 PM.
TheDarkWraith is offline   Reply With Quote
Old 02-17-09, 03:21 PM   #42
robbythesub
Captain
 
Join Date: Jul 2007
Location: Somewhere under the ocean
Posts: 504
Downloads: 302
Uploads: 0
Default

Hi Guys

Great to know that you are working on such a necessary and refreshing update- just to say that I very much appreciate your efforts and will watch this very closely!

Good luck
robbythesub is offline   Reply With Quote
Old 02-17-09, 03:34 PM   #43
UberTorpedo
Planesman
 
Join Date: Jun 2006
Location: Southern California
Posts: 194
Downloads: 78
Uploads: 0
Racerboy

Privateer stated (back in post 13) that they were still in version 1.4 but that there were "other" problems involved??
I hope somebody can make it work
This would be spectacular!

Quote:
Originally Posted by privateer
Dynamic Shadows are nothing new for SH3.
They were in version 1.0
And are still in version 1.4
Not sure which patch disabled them.
cheers
UberTorpedo is offline   Reply With Quote
Old 02-17-09, 03:38 PM   #44
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

that is a correct statement, DynamicShadows are in 1.4b BUT they are disabled because they removed DynamicShadows from the SH3Controllers.ACT file (the controllers file) in 1.4b. There are other reasons they are disabled (like missing light sources for one). From my post ealier I lost my shadows when I used the 1.4b SH3Controllers.ACT file.
Now I have not been able to duplicate Privateer's casting shadows onto other objects. Maybe he has found something else here than I have.
TheDarkWraith is offline   Reply With Quote
Old 02-17-09, 06:22 PM   #45
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

ok I added what was missing to the 88mm deckgun to get good looking shadows. I'm not finished with ensuring it's totally correct (SHD nodes need all their 3D models verified for one) but here's a working example for you all to view and see how it looks on your computer (SH3 v1.0 SH3Controllers.ACT included in it):

http://rapidshare.com/files/19938658...esting.7z.html

just unzip to MODS folder. Enable 'SHD_testing' and then run the single mission 'SHD_testing'. Let me know what you think so far.

Note: all reflections have been stripped out of this one for the 88mm. I needed a base to work from.

Rapidshare says only 10 people get to download this. Get it while it's hot
TheDarkWraith 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 04:20 PM.


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