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 03-30-11, 03:44 PM   #1
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default [TEC]Fire&Moon light...

Hi guys,

Yesterday, after spent another almost all night mod work I was messing with something to bring real light effects for fire and the moon.

The fires light was easy to achieve (but a intensivelly work to add light in the exact proportion to all fire effects on the game...) but the most interesting was the moon light. The light works flawless, it changes direction following the moon, exactly as in RL. Was amazing to look to our uboat and ships soft enlighted by the moon! It is a very additive realistic step for sh3!

But i quickly found some problems. The main one is that the light is attached to the moon object on scene.dat, and late i observed that the game renders the moon all the time using "a totally dark texture" when the moon isn't at the night sky in RL. So, as the light is attached to the moon object we will end with moon light all nights.

Another problem is that Sh3 uses the same sun's horizon(under/above) light settings angles to any sky object, so some time before/after the moon arise or set we yet have a small moon light. Also the light will be the same for any moon phase.

Probably the best workaround will be using sh3 patch plus a new .dat in the library folder just with four moon light types, this way when the sh3.exe indicates a new moon phase a exactly light will be used.

At this point this is a idea to Stiebler or TDW or anyone skilled on sh3 patch. Unless someone have another idea or find another way to do it, what we already saw here so much times.

Cheers,

Rubini.
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve

Last edited by Rubini; 03-30-11 at 06:38 PM.
Rubini is offline   Reply With Quote
Old 03-30-11, 04:53 PM   #2
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

In 2006 i was experimenting with the moonlight ... I connected the light object to the moon and this object "turn on light" at night (night light colour - not black) and "turn off light" in the morning (day light colour - black) and did a moonlight track too… IIRC, i published scrinshots on forum in WernerSobe thread...
Unfortunately now i have a broken computer and I can't see my works ...
Yes moon light was (at night) even when moon was invisible (clouds and so on)...
__________________
Alex ®


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

Last edited by Anvart; 03-30-11 at 05:43 PM.
Anvart is offline   Reply With Quote
Old 03-31-11, 07:48 AM   #3
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Thanks Anvart by the input. Yesterday I tried a bit more, using all approachs that I could imaginate...just to find that Sh3 uses some type of Einstein's Quantic phisics for sky/skyobjects as the particles conditions are always true: don't exist heigh, below, water tests don't work, the particles are always in all places!!

So, I really guess that isn't possible to have a good solution only with the sh3 controllers. Well, at least for now.

Cheers!

Rubini.
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-31-11, 08:06 AM   #4
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Yes, i agree...
The reason is a simple-primitive graphics engine...
__________________
Alex ®


Moses said: "Don't create yourself an idol"...
Anvart is offline   Reply With Quote
Old 03-31-11, 10:43 AM   #5
Hans Witteman
Kaleun of U-3
 
Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,816
Downloads: 123
Uploads: 0
Default

Hi Rubini,

Nice work you are doing mate

If only we could find a way to add trigger events based on hours of the day with dll injection i wonder if it would be possible?

Give me a trigger and a whole new world would open because many of my ideas so far where abruptly end because the lack of trigger.

Best regards Hans
__________________




Hans Witteman is offline   Reply With Quote
Old 03-31-11, 10:51 AM   #6
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

@ Rubini.

Did you try to place light object at a distance less than the radius of the sky (clouds hemisphere) so that the light object has interacted with water?
If no, try it...
__________________
Alex ®


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

Last edited by Anvart; 03-31-11 at 12:52 PM.
Anvart is offline   Reply With Quote
Old 03-31-11, 02:42 PM   #7
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by Anvart View Post
@ Rubini.

Did you try to place light object at a distance less than the radius of the sky (clouds hemisphere) so that the light object has interacted with water?
If no, try it...
Already tried it. I made the moon radius = 50 (it's 970 in stock), the moon was at its normal place on visible sky and the particle system continues to not work as intent. Seems that the game handle the sky env in a different way than the player game space...

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

Nice work you are doing mate

If only we could find a way to add trigger events based on hours of the day with dll injection i wonder if it would be possible?

Give me a trigger and a whole new world would open because many of my ideas so far where abruptly end because the lack of trigger.

Best regards Hans
Yes, it's an old "fault" of the mission editor. This limit to much the single missions ideas and possibilities. I guess that this is why we have so few very good and challenge single missions...
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-31-11, 03:34 PM   #8
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Quote:
Originally Posted by Rubini View Post
Already tried it. I made the moon radius = 50 (it's 970 in stock),...

In my case, light-object is the child object (separate object) of the moon... and this light-object can be located relative to the moon so that it was inside of the clouds hemisphere... the moon no shifted.
... and this light-object is point light source.
... and this object don't has any particles generators.
...
Second... you can try to use the large object (similar to fog in stock) and make it hollow and closed ... theoretically it should prevent light flux ...
__________________
Alex ®


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

Last edited by Anvart; 03-31-11 at 04:16 PM.
Anvart is offline   Reply With Quote
Old 03-31-11, 04:16 PM   #9
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by Anvart View Post

In my case, light-object is the child object (separate object) of the moon... and this light-object is located relative to the moon so that it was inside of the clouds hemisphere... the moon no shifted.
... and this light-object is point light source.
...
Second... you can try to use the large object (similar to fog in stock) and make it hollow and closed ... theoretically it should prevent light flux ...
I used a omni light directly attached to the moon at first (others light types don't even followed the moon), late tried it as a node in different places related to the moon (similar to your idea above), later a node with particle that calls another object with omni light when the particle hits water (to prevent moon light befor/after rise/set)...always the light is there but with particles idea the light don't followed the moon (it's another object).
All others attempts (and I tried a lot of approachs...) had the light following correctly the moon. But I can't achieve a way to have light only when the moon was visible.This is the main problem. And a killer one to the intention of the mod.

I will really leave this to the Sh3.exe patch modders experts. I'm convinced that only then this will have a chance to work correctly.
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-31-11, 04:55 PM   #10
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Quote:
Originally Posted by Rubini View Post
I used a omni light directly attached to the moon at first...
IIRC, i used direct light object... can't see now...
Quote:
... (others light types don't even followed the moon)
did you used corresponding controller (FollowParent)?
Quote:
... , late tried it as a node in different places related to the moon (similar to your idea above), later a node with particle that calls another object with omni light when the particle hits water (to prevent moon light befor/after rise/set)...always the light is there but with particles idea the light don't followed the moon (it's another object).
All others attempts (and I tried a lot of approachs...) had the light following correctly the moon. But I can't achieve a way to have light only when the moon was visible.This is the main problem. And a killer one to the intention of the mod.

It's one of the reasons why i didn't published my work in 2006...2007... and have used this effect only in my game.

Quote:
I will really leave this to the Sh3.exe patch modders experts. I'm convinced that only then this will have a chance to work correctly.
Good luck.

P.S.
It was (in my case) very simple work...
Main actions:
1) In scene.dat create direct MoonLight object (similar as Sun light) and adjust Colour parameter (optional)...
2) Join to MoonLight object InteriorLight controller (similar as in any interior)... and adjust DayLightColour and NightLightColour...
3) Join MoonLight to Moon object (maybe via buffer-object for interaction with water) and adjust position of MoonLight (or buffer-object) relative Moon object.
__________________
Alex ®


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

Last edited by Anvart; 04-04-11 at 08:00 AM.
Anvart is offline   Reply With Quote
Old 04-02-11, 03:37 AM   #11
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Do anyone have any fresh thoughts on this topic?
__________________
Alex ®


Moses said: "Don't create yourself an idol"...
Anvart is offline   Reply With Quote
Old 04-02-11, 10:10 PM   #12
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by Anvart View Post
Do anyone have any fresh thoughts on this topic?
Hi Anvart,

At least no news from my side. Like I said, i give up after a lot of attempts and before my wife throw my pc out the window!
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini 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:38 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.