HDR: High Dynamic Range illumination

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 4 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

HDR: High Dynamic Range illumination

Post #1by cartrite » 27.03.2008, 16:30

I've updated my site to include Revision 4230. This includes an update that fixed the experimental HDR version. I included an executable that is HDR enabled.
I took some screen shots of the Earth, Mars and Titan in OGL2. that shows what to expect when running the HDR version. I'm not sure what else this version is capable of so.........
Here are the screen shots.
earth-backlit.jpg

titan-backlit.jpg

mars-backlit.jpg

These images are back lit. There is a max of 3 images so.......
cartrite
Last edited by cartrite on 27.03.2008, 16:37, edited 1 time in total.

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 4 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: SVN Windows Executable

Post #2by cartrite » 27.03.2008, 16:36

Here are the front lit images.
titan-front-lit.jpg

mars-front-lit.jpg

earth-front-lit.jpg

The OGL2 is a little bright if you have a specmap. The stars also disappear when a planet or moon is in the view.
This includes the Sun also.
cartrite
Last edited by cartrite on 27.03.2008, 16:48, edited 1 time in total.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 11 months

Re: SVN Windows Executable

Post #3by ElChristou » 27.03.2008, 16:38

cartrite wrote:... I included an executable that is HDR enabled.

What about performances around Earth? (on osX I had a drastic FPS drop with Earth on screen)
Image

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 4 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: SVN Windows Executable

Post #4by cartrite » 27.03.2008, 16:46

I can have My BMNG textures with clouds, cloud shadows, normalmap, specmap, etc and get about 30 to 33 fps.
This is with the QT4 version running on Linux.
When I run the KDE version, I get slightly less, 28 to 30 fps running the same. This did not have HDR enabled.
I didn't check the fps on the Windows build.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 11 months

Re: SVN Windows Executable

Post #5by ElChristou » 27.03.2008, 17:33

cartrite wrote:I can have My BMNG textures with clouds, cloud shadows, normalmap, specmap, etc and get about 30 to 33 fps.
This is with the QT4 version running on Linux.
When I run the KDE version, I get slightly less, 28 to 30 fps running the same. This did not have HDR enabled.
I didn't check the fps on the Windows build.
cartrite

I'm asking for HDR version relative to the official (non HDR yet version) on the same system; can you note a difference or nothing important? (in another words, do HDR have an impact on the fps on your system?)
Image

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 4 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: SVN Windows Executable

Post #6by cartrite » 27.03.2008, 17:45

I checked the Windows build R4230 with HDR and without HDR and can't see any difference in frame rates.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 11 months

Re: SVN Windows Executable

Post #7by ElChristou » 27.03.2008, 18:25

cartrite wrote:I checked the Windows build R4230 with HDR and without HDR and can't see any difference in frame rates.
cartrite

Tx; I will have to test a new build with HDR on osX because in previous (experimental) version there was a BIG difference... (at least on my poor config)
Image

abramson
Posts: 408
Joined: 22.07.2003
With us: 21 years 6 months
Location: Bariloche, Argentina

hdr pt2

Post #8by abramson » 27.03.2008, 20:06

cartrite wrote:I've updated my site to include Revision 4230. This includes an update that fixed the experimental HDR version.
What do you need to do to build with the HDR enabled? I didn't understand that from the log comment on svn by Chris.

Guillermo

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 4 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: SVN Windows Executable

Post #9by cartrite » 27.03.2008, 21:59

Since I used the MS2008C++ GUI, the way I did it was right click on the celestia project and chose properties.
When the window came up, I expanded C/C++ and chose Preprocessor. On the right hand side was was a list of Preprocessor Defininitions. When I clicked on the list a little browse box appeared on the right. When I clicked on the little box a little window opened and I added USE_HDR and HDR_COMPRESS to the window which also had

Code: Select all

CELX
LUA_VER=0x050100
USE_SPICE
WINVER=0x0400
_WIN32_WINNT=0x0400
_CRT_SECURE_NO_DEPRECATE

So after I finished the window looked like

Code: Select all

CELX
LUA_VER=0x050100
USE_SPICE
WINVER=0x0400
_WIN32_WINNT=0x0400
USE_HDR
HDR_COMPRESS
_CRT_SECURE_NO_DEPRECATE

I did try Wordpad at first to edit the line but it didn't work.
When I looked at the build log the definitions were not added.
I'm not sure what I did wrong but after that I just do it in the Visual C++ GUI.
If you compile with the mak files (makerelease.bat), then you'll need to find a way of editing those files to include USE_HDR and HDR_COMPRESS. The 4 exrtra shader files also need to be in the shaders folder. If you run the executable from the build folder they are there already. But you'll need to add them to the shaders folder if you are running the executable from the 1.5.0 installed folder.
EDIT:
In the file celestia/src/win32.mak, add USE_HDR and HDR_COMPRESS to the lines

Code: Select all

COMPILE_OPTS=/nologo /W3 /EHsc /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D WINVER=0x0400 /D _WIN32_WINNT=0x0400 /D _CRT_SECURE_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS

I didn't try it but it should work.
cartrite
Last edited by cartrite on 27.03.2008, 22:22, edited 1 time in total.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

abramson
Posts: 408
Joined: 22.07.2003
With us: 21 years 6 months
Location: Bariloche, Argentina

Re: SVN Windows Executable

Post #10by abramson » 27.03.2008, 22:21

I see. Thanks. I'm using VS2005, so I will try to change project propeties in the same way. Thanks, Steve.

Guillermo

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 3 months

Re: SVN Windows Executable

Post #11by dirkpitt » 27.03.2008, 22:34

cartrite wrote:The OGL2 is a little bright if you have a specmap.

This is a known bug.

The stars also disappear when a planet or moon is in the view.
This includes the Sun also.

This is NOT a bug, but a result of the adaptive exposure kicking in. Note that for planets with already very low magnitude (e.g., Pluto), stars will not darken so much, as expected.
Also try viewing the dark sides of planets/moons. With the sun in full eclipse, stars will brighten.

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 4 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: SVN Windows Executable

Post #12by cartrite » 28.03.2008, 01:24

dirkpitt wrote:This is NOT a bug, but a result of the adaptive exposure kicking in. Note that for planets with already very low magnitude (e.g., Pluto), stars will not darken so much, as expected.
Also try viewing the dark sides of planets/moons. With the sun in full eclipse, stars will brighten.
Yes. Your quite right. If you position the planet just right, almost all the stars are visible.
I didn't want to turn this into a bug report but when I tried to take a screen shot with Linux QT4, I got strange results.
See here. There are stars everywhere when I view this while Celestia is running but the screen shot does not agree.
stars.jpg

stars2.jpg

You can clearly see the box where the capture image window was positioned.
cartrrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 4 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: SVN Windows Executable

Post #13by cartrite » 28.03.2008, 01:46

The previous screen shots from linux QT4 seem to be related to linux QT4. EDIT I built QT4 HDR enabled with Visual C++ MS2008 and I didn't have a problem with capture image. So this seems to be something wrong with linux. PNG library?
The Windows version is different. No problems with capture image.
But I did notice that you had to move farther away from the Earth to get some stars to appear.
This screen shot is about 544060 km away and some stars are visible.
stars1-win.jpg

This screen shot is about 310720 km away and the stars disappear. Only planets, asteroids, spacecraft, etc. are visible.
stars2-win.jpg

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 3 months

Re: SVN Windows Executable

Post #14by dirkpitt » 28.03.2008, 03:55

cartrite wrote:But I did notice that you had to move farther away from the Earth to get some stars to appear.
This screen shot is about 544060 km away and some stars are visible.
..
This screen shot is about 310720 km away and the stars disappear.

On my Mac, I didn't have to move that far away to see stars. I'm guessing different Mac and PC gammas are producing unexpected results here. The exposure adaptation is currently not gamma corrected, so this is definitely an area for improvement.

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 11 months

Re: SVN Windows Executable

Post #15by ElChristou » 28.03.2008, 10:23

What about a thread about HDR? (to avoid the off topic and continue testing and debugging)
Image

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 4 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: SVN Windows Executable

Post #16by cartrite » 28.03.2008, 11:26

dirkpitt wrote:On my Mac, I didn't have to move that far away to see stars. I'm guessing different Mac and PC gammas are producing unexpected results here. The exposure adaptation is currently not gamma corrected, so this is definitely an area for improvement.
By far, the best results I've gotten were from QT4 builds even with the messed up capture image in the linux QT4 vesion. At automag set to 12.00, almost all stars become visible when the sun is blocked by the planet (eclipsed). The outer planets also look much better and are in a softer light suggesting a more realistic view from the outer solar system with HDR enabled.

ElChristou wrote:What about a thread about HDR? (to avoid the off topic and continue testing and debugging)
Sounds good to me. Should I just rename this or maybe Selden could remove the posts starting from where I brought up HDR and start a new thread about HDR.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 4 months
Location: NY, USA

Re: HDR: High Dynamic Range illumination

Post #17by selden » 28.03.2008, 15:39

I think I split the topic appropriately.
It's not something I want to do frequently, so please start new topics whenever it seems appropriate. Splitting topics with multiple pages and interleaved posts takes a significant amount of work, although at least split and merge both are available in phpbb v3.
Selden

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 11 months

Re: HDR: High Dynamic Range illumination

Post #18by ElChristou » 28.03.2008, 15:41

Tx Selden!
Image

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 4 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: HDR: High Dynamic Range illumination

Post #19by cartrite » 28.03.2008, 16:47

selden wrote:I think I split the topic appropriately.
It's not something I want to do frequently, so please start new topics whenever it seems appropriate. Splitting topics with multiple pages and interleaved posts takes a significant amount of work, although at least split and merge both are available in phpbb v3.
Thanks Selden and Sorry.
I didn't anticipate that there would be this many responses to the HDR part of that post.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

abramson
Posts: 408
Joined: 22.07.2003
With us: 21 years 6 months
Location: Bariloche, Argentina

Re: HDR: High Dynamic Range illumination

Post #20by abramson » 28.03.2008, 23:23

I find this HDR rendering very nice and very realistic. I tried it just today building from SVN with VS2005, on XP. I want to make a couple of observations before my two weeks trip starting tomorrow, before I forget.

1. Appearance and dissappearance of stars is a little too sudden. In fact appearance is gradual (but fast), while dissappearance seems completely abrupt.

2. Appearance and dissappearance of stars does nor work the same when the sun is eclipsed behind a planet, and when you move it out of the screen. In the first case, I see stars appearing when the disk of the sun is half way eclipsed. In the second, stars appear only when the last pixel of the star (or illuminated planet, you get the idea) is noved out of the window.

Both small issues, since I imagine they can be fixed.

Excellent work, to whoever came up with this idea and coded this!

Guillermo


Return to “Development”