Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 29 30 31 [32] 33 34 35 ... 109   Go Down

Author Topic: graphics extender  (Read 305400 times)

Ace-Medic and 1 Guest are viewing this topic.

slibenli

  • member
  • Offline Offline
  • Posts: 619
    • IL-2 Graphics Extender
Re: graphics extender
« Reply #372 on: January 03, 2019, 06:32:30 AM »

Hi Slibenli I notice the latest builds are only 85kb in size is this normal?
HAPPY NEW YEAR!!

No, something went wrong there ... looking into it.

Fixed! :)

slibenli

  • member
  • Offline Offline
  • Posts: 619
    • IL-2 Graphics Extender
Re: graphics extender
« Reply #373 on: January 04, 2019, 02:09:10 AM »

Have you looked at public void setAstronomic(int i, int j, int k, float f, float f1)

Looking at the code it seems ....

iAltitudeAngular height of sun above the horizon in degrees
jAzimuth partLooks like the compass direction of the sun, 0 = north,3 =east
kAzimuth partLooks like the detail part of the azimuth
fTime of dayUsed for lunar cycle
f1Cloud level

The only line of code that doesn't make sense to me is this one.

Code: [Select]
float f2 = (float)((j * 30 + k) - 80) * DEG2RAD;

It seems to convert the two input variables into an azimuth angle.... but WTF!

I haven't looked at it in detail, but at least I figured out that the remaining parameters to setNative are ambient, diffuse, specular, red, green, blue.
And apparently setNative is used for both sun and moon, depending on the time of day.
But I figured out that the vectors to sun and moon are both passed to Landscape.cPreRender() - so that's what I'm using now.

->  Now it's pitch dark at night :)

Rostic

  • member
  • Offline Offline
  • Posts: 51
Re: graphics extender
« Reply #374 on: January 04, 2019, 03:30:53 PM »

As for the game, it is too dark, maybe.
I watched some night flight video... and this black ground looks like real, but should not be stars on the sky?  ;D


Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: graphics extender
« Reply #375 on: January 04, 2019, 06:18:29 PM »

I'm an amateur astronomer, with my own guesswork after looking at 4.09 code in Sun.java...

It looks to me that setAstronomic(i, j, k, l, i1, j1) variables are:
year, month, day, hour, minute and second.

(j * 30 + k) - 80) * DEG2RAD

means month number times 30 plus day of month to get number of days since beginning of year.

The subtraction of 80 would seem to be the number of days from start of year to vernal equinox (~Mar 21). This is when the Sun is crossing the equator going north, and is a useful fiducial because the Sun's declination range of +-23.5 degrees uniformly straddles this. So in this case the 'astronomical' year effectively begins on Mar 21.

This result is then converted to radians. But this seems weird, in that there is no apparent determination of the *fraction* of the 365-day-year elapsed since the vernal equinox, which necessarily involves dividing the number of days by 365. Only when the *fractional* year is determined can conversion to an angle proceed.

The later appearance of 22.5 is a little odd, and I wonder if it's supposed to be 23.5, or the inclination of the ecliptic (Sun's path across the sky) w.r.t. the celestial equator.

The value of 29.53 is the lunar month duration in days, or the interval between successive New moons (or Full Moons).

The value of 6.283185 is the number of radians in a 360 degree circle.



Just a few pointers that hopefully can lead to some progress.

I know that the Moon position code is a bit buggered. There are times where it *clearly* lies far from the ecliptic plane, with the result that the phase is notably incongruent with the angular separation from the Sun, and the azimuth is well out of whack.

I might point out that I've written star charting code (in BASIC) to generate maps for the illustrations I've published in books and magazines. As well as having been involved with a commercial software Sky charting product. Not to mention an active involvement in amateur astronomy since 1975.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: graphics extender
« Reply #376 on: January 04, 2019, 08:08:32 PM »

Looking a bit more closely, it seems the first element (i) in setAstronomic could be the fraction of the year expressed in degrees. For instance, June 1 would be 180.

I just altered two lines of code that I suspected had overlooked to convert to the fractional year. One is for the Sun and the other for the Moon. They are identical:

(j * 30 + k) - 80) * DEG2RAD

Becomes

((j * 30 + k) - 80) / 365) * DEG2RAD

With this the Moon now has a much better position relative to the Sun, the ecliptic and the horizon!

For example (and in 4.08)...

Previously, with the MTO map load.ini month set to 5, and the game time set to 18:00 (Sun still up, low in the west), the gibbous Moon--*PAST full!--was positioned *above* the horizon to the *NE* (!). For that phase angle, the Moon should be *below* the horizon and nearer to E.

After my little code changes, now the moon at that time is invisible, rising in the E well after sunset, just as expected.

Now, one thing the code does not seem to do is orient the Moon image correctly. In reality, the mean lunar terminator is perpendicular to the great circle containing the Sun and Moon. In the game this orientation can be notably violated. But at least having a more correct placement in the sky is a good step forward.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: graphics extender
« Reply #377 on: January 05, 2019, 02:40:14 AM »

I had some further thoughts, but closer examination raised more questions, and so deleted my scribblings.

Based on a couple of assumptions, running code in a spreadsheet and graphing results gives pretty decent concordance with expectations. But in-game Sun/Moon positioning differ, and so my assumptions must be wrong.

I need to determine with certainty what the setAstronomic() variables are.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

slibenli

  • member
  • Offline Offline
  • Posts: 619
    • IL-2 Graphics Extender
Re: graphics extender
« Reply #378 on: January 05, 2019, 09:03:16 AM »

As for the game, it is too dark, maybe.
I watched some night flight video... and this black ground looks like real, but should not be stars on the sky?  ;D

I'm not yet taking moonlight into account.
Stars would be nice of course, but that's not a priority for me ATM.

@WxTech: I can't really contribute anything in terms of astronomical calculations.
Something to consider is that, with the earth's curvature modeled, the viewer's horizon depends on his altitude.
Unless you meant the astronomical horizon ;)

ACDCdrfc123

  • member
  • Offline Offline
  • Posts: 25
Re: graphics extender
« Reply #379 on: January 08, 2019, 09:10:32 AM »

Will this work with the VP modpack?
Logged

slibenli

  • member
  • Offline Offline
  • Posts: 619
    • IL-2 Graphics Extender
Re: graphics extender
« Reply #380 on: January 08, 2019, 03:02:28 PM »

Will this work with the VP modpack?

Yes.

KingTiger503

  • Legendary History Luftwaffe Elite Ace ,,,
  • Supporter
  • member
  • Offline Offline
  • Posts: 1994
  • KT503 Elite
Re: graphics extender
« Reply #381 on: January 09, 2019, 04:15:08 AM »

Slibenli, can you make a Star and the Moon during the Night. I know you do your best.

Best Regards KT503
Logged
My Greatest and Best Regards KT503

slibenli

  • member
  • Offline Offline
  • Posts: 619
    • IL-2 Graphics Extender
Re: graphics extender
« Reply #382 on: January 09, 2019, 09:42:45 AM »

Slibenli, can you make a Star and the Moon during the Night. I know you do your best.

Best Regards KT503

See my post above - it's currently not a priority.

sowercrowd

  • member
  • Offline Offline
  • Posts: 24
Re: graphics extender
« Reply #383 on: January 10, 2019, 04:52:50 AM »

Hi Slibenli,
just tried out the lastest build 143773471. Gives me ctd at 100% mission load.
Log seems to be incomplete, but still may contain some hints  ?

_Java_com_maddox_il2_engine_Landscape_cRender0@12
WARNING: ***( GL error: 0x0500 (SetData0)
creating shader program: invisible
invisible: num fragment shaders: 1
invisible: num vertex shaders: 0
-----------------------------------------------------------
Assertion failed: wgl_wrapper::isMainContextCurrent()
File: /builds/vrresto/il2ge/core_wrapper/gl_wrapper/gl_wrapper_main.cpp:180
-----------------------------------------------------------
Aborted.
current thread: 0xb60
waiting for backtrace thread to finish ...
target thread: 0xb60
-----------------------------------------------------------

Error occurred on Thursday, January 10, 2019 at 12:12:01.

Registers:
eax=00000000 ebx=5614f940 ecx=00000000 edx=00000000 esi=00000000 edi=00000000
eip=77bd1d2d esp=0018f5d8 ebp=0018f648 iopl=0         nv up ei pl zr na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00200246

AddrPC   Params
77BD1D2D 00000130 000006A4 FFFFFFFF  C:\Windows\SysWOW64\ntdll.dll!NtSignalAndWaitForSingleObject
560E7583 562116C0 0018F6CE 00000001  E:\IL-2 _4.12.m_VPmedia\il2ge.dll!abort  [/builds/vrresto/il2ge/common/exception_handler.cpp @ 221]
560E78C5 56213F00 56213EA0 000000B4  E:\IL-2 _4.12.m_VPmedia\il2ge.dll!_assert  [/builds/vrresto/il2ge/common/exception_handler.cpp @ 340]
560DF5BC 00000000 00000000 00000200  E:\IL-2 _4.12.m_VPmedia\il2ge.dll!wrap_glViewport  [/builds/vrresto/il2ge/core_wrapper/gl_wrapper/gl_wrapper_main.cpp @ 180]
100BA273 12C01A90 00AADD88 00000000  E:\IL-2 _4.12.m_VPmedia\il2_corep4.dll!Java_com_maddox_il2_engine_CfgFlagsEngine_Set
100DBDB8 00AADE0C 0018F860 00000000  E:\IL-2 _4.12.m_VPmedia\il2_corep4.dll!Java_com_maddox_il2_engine_Landscape_cRender0
560E9276 00AADE0C 0018F860 00000000  E:\IL-2 _4.12.m_VPmedia\il2ge.dll!cRender0  [/builds/vrresto/il2ge/core_wrapper/jni_wrapper/wrap_Landscape.cpp @ 53]
044D4F47 00000000 0018F894 044D459B
044D4D8B 00000000 80F3B640 00AAD998
044D459B 81C439C8 80F2F110 0018F8CC
044D42B1 81C439C8 80F2F110 0018F8B4
00C9A082 81C439C8 00000780 81C43AA8
04222732 80F31788 80EDC2D8 00000001
042215A7 80F31788 00AADD88 00AAF6EC
0423E46B 00000000 80F44920 0018F968
0420D9D7 80F44920 80F5A158 F0CD01A0
0420D79C 80F44920 80F5A158 EF0467B8
0420D1E2 80F44920 80F5A158 0018F9A8
0420CB52 80F44920 80F5A158 00000001
0420C6EB 80F5A158 00000000 00000000
042091F1 80F2F640 EF7B4108 00AADD88
6D4DB41C 0018FB08 0018FC64 0000000A  E:\IL-2 _4.12.m_VPmedia\bin\hotspot\jvm.dll!JVMCI_InstallStackOvrFlowExceptionFilter
6D44034E 0000000A 00000000 0018FBCC  E:\IL-2 _4.12.m_VPmedia\bin\hotspot\jvm.dll!JVM_DisableCompiler
6D46932D 6D440266 0018FC5C 0018FBB4  E:\IL-2 _4.12.m_VPmedia\bin\hotspot\jvm.dll!JVM_FindSignal
6D440262 00AADE0C 0018FC5C 00000000  E:\IL-2 _4.12.m_VPmedia\bin\hotspot\jvm.dll!JVM_DisableCompiler
6D446827 00AADD88 00AADF4C 0F2E4028  E:\IL-2 _4.12.m_VPmedia\bin\hotspot\jvm.dll!JVM_DisableCompiler
004020BC 00AADE0C 00AADF4C 0F2E4028  E:\IL-2 _4.12.m_VPmedia\il2fb.exe!Java_com_maddox_rts_SFSInputStream_close
00401FFF 77BE3436 77CA0412 00000000  E:\IL-2 _4.12.m_VPmedia\il2fb.exe!Java_com_maddox_rts_SFSInputStream_close
77BE3407 77CA0412 00000000 027201CC  C:\Windows\SysWOW64\ntdll.dll!RtlQueryPerformanceCounter
77BE3436 02720150 77CA0432 02720178  C:\Windows\SysWOW64\ntdll.dll!RtlQueryPerformanceCounter
77BE3407 025B79B0 025B8E88 025B8E68  C:\Windows\SysWOW64\ntdll.dll!RtlQueryPerformanceCounter
77BDE0C3 02720000 00000000 025B79B0  C:\Windows\SysWOW64\ntdll.dll!RtlFreeHeap
75C814AD 02720000 00000000 025B79B0  C:\Windows\syswow64\kernel32.dll!HeapFree
00411B76 00000000 00000000 0040F731  E:\IL-2 _4.12.m_VPmedia\il2fb.exe!RTS_free
0040F7D7 FFFDE000 0018FFD4 77BE9802  E:\IL-2 _4.12.m_VPmedia\il2fb.exe!Java_com_maddox_rts_TrackIRWin_nGetAngles
75C8343D FFFDE000 77CA0612 00000000  C:\Windows\syswow64\kernel32.dll!BaseThreadInitThunk
77BE9802 00412829 FFFDE000 00000000  C:\Windows\SysWOW64\ntdll.dll!RtlInitializeExceptionChain
77BE97D5 00412829 FFFDE000 00000000  C:\Windows\SysWOW64\ntdll.dll!RtlInitializeExceptionChain

...and yes, Water=1 was set in config.ini.
Best regards
Logged
Pages: 1 ... 29 30 31 [32] 33 34 35 ... 109   Go Up
 

Page created in 0.046 seconds with 27 queries.