PDA

View Full Version : Astronomy in SH5


Obelix
01-08-11, 08:54 AM
Recently I noticed a serious error concerning the heavenly bodies.
Grossly violated phases of the moon. Rather the relative position of the moon and the sun does not match the phase of the moon. Screenshots of this excellent show.
In the first screenshot shows the waning moon, the second and third - increases.
http://www.subsim.com/radioroom/picture.php?albumid=354&pictureid=3525
http://www.subsim.com/radioroom/picture.php?albumid=354&pictureid=3526
http://www.subsim.com/radioroom/picture.php?albumid=354&pictureid=3527
Those who are somewhat familiar with astronomy will immediately recognize that this can not be.
Question: Is it possible that as a fix?
Any ideas?

TheDarkWraith
01-08-11, 08:58 AM
Doesn't that happen because of W_clear's environment mod? Have you tried disabling the environment mod and seeing if you get the same results? :hmmm:

Obelix
01-08-11, 09:04 AM
Doesn't that happen because of W_clear's environment mod? Have you tried disabling the environment mod and seeing if you get the same results? :hmmm:
While I did not get to check it. I disabled the mod of the environment, but can not catch a similar relative position of the sun and moon. As soon turned up a similar position - always check

Obelix
01-08-11, 10:29 AM
OK, I disabled the mod W_Clear and got a picture.
http://www.subsim.com/radioroom/picture.php?albumid=354&pictureid=3528
Nevertheless, the situation continues to embarrass the lunar crescent. In this situation, it should be tilted to the left instead of right.

Obelix
01-08-11, 10:38 AM
This means that the mod W_Clear's contains even more errors. Thus, all still have to look for him to alternative. Unfortunate.

PL_Andrev
01-08-11, 10:47 AM
Not exactly - I played without mods and have this effect.
I know how to fix it (rotate the correct moon texture with the correct angle) but it depends from current sun and moon position.

But I don't know: is possible to read sun/moon position or angle form/to player?
I asked TDW but no answer...

TheDarkWraith
01-08-11, 11:13 AM
Not exactly - I played without mods and have this effect.
I know how to fix it (rotate the correct moon texture with the correct angle) but it depends from current sun and moon position.

But I don't know: is possible to read sun/moon position or angle form/to player?
I asked TDW but no answer...

I haven't figured out how to do that and don't think it's even possible.

Obelix
01-08-11, 11:29 AM
This picture illustrates how the crescent moon must be located in the evening and morning.
http://www.subsim.com/radioroom/picture.php?albumid=354&pictureid=3529
Above - the moon phase, observed in the evening. Waxing moon.
Below - the moon phase, observed in the morning. Waning moon

Zedi
01-08-11, 11:55 AM
Its not possible to fix this problem, W_Clear tried many times but failed.

TheDarkWraith
01-08-11, 12:00 PM
Its not possible to fix this problem, W_Clear tried many times but failed.

I think \data\Textures\Tnormal\tex\Moon.dds is the key. We need to change that file to represent the correct phases of the moon.

Obelix
01-08-11, 12:12 PM
I think \data\Textures\Tnormal\tex\Moon.dds is the key. We need to change that file to represent the correct phases of the moon.
Yes, indeed. I compared these files - a file from W_Clear waxing and waning moon confused.
In this connection, I raise questions file moon_hallo.dds - have W_Clear is just a piece of the sky. Although originally there should be samples of lunar halo.

Obelix
01-08-11, 12:33 PM
It's stock moon:
http://www.subsim.com/radioroom/picture.php?albumid=354&pictureid=3530
And it's moon W_Clear
http://www.subsim.com/radioroom/picture.php?albumid=354&pictureid=3531
W_Clear why that set the whole image of the moon in the alpha channel, while in the sink the game image is placed in the RGB and alpha channel only phase.

PL_Andrev
01-08-11, 01:21 PM
W_Clear why that set the whole image of the moon in the alpha channel, while in the sink the game image is placed in the RGB and alpha channel only phase.

The problem is that the stock moon textures are not correctly rotated to current sun position and this is the source of this "moon" bug.

Obelix
01-09-11, 05:36 AM
The problem is that the stock moon textures are not correctly rotated to current sun position and this is the source of this "moon" bug.
I'm not quite sure what you mean. If we compare with W_Clear, then stock the moon over the right and the moon W_Clear unfolded illuminated side of the sun. This is illustrated by screenshots of post number 1. Stock as the moon turned to sun is almost correct (post number 4)

PL_Andrev
01-09-11, 06:19 AM
Stock as the moon turned to sun is almost correct (post number 4)
"Almost correct" doesn't mean "correct" - as I wrote in the past, I played without mods and moon was not correctly rotated to sun - it means that the moon did not unfold illuminated side to the sun.

Obelix
01-09-11, 06:46 AM
"Almost correct" doesn't mean "correct" - as I wrote in the past, I played without mods and moon was not correctly rotated to sun - it means that the moon did not unfold illuminated side to the sun.
:hmmm:
Strange. In the screenshot (post #4, mods environmental disabled) horn crescent moon turned to the right, as it should be. Here are just a tilt of sickle should be the other way. The screenshots post #1 (Environmental enabled) horns are turned the other way - so should not be. Although the slope is generally correct. But while the sun should be on the other side of the moon.
To eliminate the misunderstanding between us, I would like to see screenshots explaining your words.

PL_Andrev
01-09-11, 08:34 AM
Its not possible to fix this problem, W_Clear tried many times but failed.

I think that it is possible, but it should be completely reworked - what we need:

1. Sun/moon angle position - done (base: Otto's Chalkboard mod)
2. Sun height - done (current latitude)
3. Moon height - don't know how to calculate yet
4. Math formula to calculate current moon phase and current angle of moon (always illuminated side to sun) - can be prepared by me
5. Put current moon texture to SH5 sky based at: angle position, height, phase, texture angle - don't know how to do it

The problem is that Otto's Chalkboard mod and datas based on real scripts but not on real sun/moon positions in game.
The perfect solution is:
- read current sun/moon position
- math phase and angle
- delete existing texture
- put new texture
...but TDW told me that is impossible to read current sun/moon position from game.

But here is other problem:
Now we have 16 sun phases. Each sun phase should be rotated to curent sun position (always illuminated side to sun)
Each sun phase with 10° accuracy = 360°/10 = 36x16 phases = 576 moon textures...
:doh:

Obelix
01-09-11, 09:16 AM
I think that it is possible, but it should be completely reworked - what we need:

Sounds promising.:) But when I see this implementation complexity. I think such precision is needed only when the sun and moon are in the sky simultaneously. At dawn and dusk accuracy can be increased. At night can also prevent an even greater error.

Cerberus62
01-09-11, 09:56 AM
I'm sure that whatever we try, it wouldn't fix this error. That's because of the simple method SH5 calculates the position and displays the image of the Moon.

First: Orbital planes and trajectories aren't calculated precisely in this game. Second: It's not possible to simulate the different aspects of a sunlit body with 16 images. Even if you would rotate the images it would look wrong, because you would incline the axis of the Moon together with the aspect of the surface.

I reworked the Moon.dds and Moon_halo.dds texture files and replaced each single phase by it's counterpart. After this I often found the correct side of the Moon facing the Sun, but not always. So this error only occured less frequently. But the rework introduced another error. Now the lunar phases develop in the wrong direction: Starting with New moon you'll see the waning crescent followed by the last quarter and so on during the synodic cycle.

To get rid of this problem we would need a three-dimensional textured spherical body, illuminated by an almost point-shaped source of light. I think that's far beyond the possibilities of the SH5 game engine. :dead:

For those who are interested in astronomy and still don't know the wonderful freeware program Celestia: http://www.shatters.net/celestia/

homsikpanda
01-09-11, 11:36 AM
poor moon D: it's not your fault youcan't line up with the sun correctly!, i can understand how everything is 2 dimenionsal and it's hard to give the appearance of 3d -gives moon a hug- atleast you try!

PL_Andrev
01-09-11, 12:03 PM
Second: It's not possible to simulate the different aspects of a sunlit body with 16 images. Even if you would rotate the images it would look wrong, because you would incline the axis of the Moon together with the aspect of the surface.
That's right, I'm not sure that game generates different height of sun at noon for different seasons with white night / black day at polar regions...
But it is not important. It is not important where moon exactly was at 06:43 15.sep.1942. But if we'll have positions and height of sun and moon we can calculate correct phase and correct position of crescent of the moon to avoid stupid situations like it:

No mods, stock game only, 5.30 AM
http://img267.imageshack.us/img267/8523/sunae.jpg

- difference between bearings builds moon phase,
- difference between heights builds moon texture's rotation angle

iidesu
01-12-11, 03:12 AM
well, frankly, I've never delved into that part.

Meldric
01-12-11, 02:43 PM
I have seen the problem with the moon being lit from the wrong side today (after I have red this thread). I have a number of mods, but I am not using Env-mod:

Generic Mod Enabler - v2.6.0.157
[C:\Spiele\Silent Hunter 5\MODS]

000_00_Antilag
001_00_RemoveLogoIntroTheDarkWraith
001_01_CommandKeys v1.02
002_01_Detailed Caustics v1.0
002_01_ShadowImprovement LR
002_03_ConusGraphicMod v1.1
002_04_OldStyleExplosions V1.1
002_05_SH3_to_SH5_sub_physics
002_06_NoDamnBubblesNoDamnHalo
002_07_Dooms Decks for VIIABC41 1.4
002_08_AilRain 1.0
002_99_CustomEmblem - Wolf
003_00_MightyFineCrewMod v1.2.1 - Alt w beards
003_01_MoraleMod
003_03_LiteCampaign v1.21
003_05_CriticalhitsTorpedos v1.1
004_00_CapthelmsAudioMod
004_01_DBSM_Speech_1_0_5
004_02_DBSM_Music_1_0_5
004_03_GrossdeutscherRundfunk
004_04_MightyFineLessAnnoyingFootsteps v1.0
004_05_Speech fixes and additions (german version) V1.0
005_00_FX_Update_0_0_11_ByTheDarkWraith
005_01_FX_Update_0_0_11_BARF_1_3_Full_Fix
006_00_NewUIs_TDC_6_3_4_ByTheDarkWraith
006_01_NewUIs_TDC_6_3_4_Das_Boot_Crew_Mod_by_Illyu strator
006_02_NewUIs_TDC_6_3_4_emtguf_rework_scopes_5_8_r atio
006_03_NewUIs_TDC_6_3_4_ERM_Reaper7_NightVision
006_03_NewUIs_TDC_6_3_4_ERM_Reaper7_NightVision_Bl ack_Skin
006_05_NewUIs_TDC_6_3_4_No_Aircraft_Spotting_At_De pth
006_20_IRAI_0_0_29_ByTheDarkWraith
006_21_IRAI_0_0_29_No_Aircraft_Spotting_At_Depth
006_50_Sub_Exhaust_1_0_4_byTheDarkWraith
006_51_SubFlags_0_0_5_byTheDarkWraith
007_00_IO_StrategicMap_2_2_for_TDW_6_0_0
007_01_IO_MapCourseLine_normal pencil_mod

vickers03
02-05-11, 02:28 PM
For those who are interested in astronomy and still don't know the wonderful freeware program Celestia: http://www.shatters.net/celestia/thanks:yeah: