New Release D3D9Client Development

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
Is exposure compensation applied selectively to very bright and dim objects, or is it applied to the whole screen all at one time?

I'd say that Orbiter is a special case. We do have extreme brightness variations between light-sources.

So I think exposure compensation should take into consideration:
- distance to the sun (don't think that Orbiter even simulates this...)
- local "day"/"night"
- angle of view related to the sun (looking at shadowed or illuminated areas).

I'd say that the last factor is the most important.


As for how it should look, my suggestion is to use modern digital photos as reference.

Here are some that cover a large illumination range:
iss_fix_nasa.jpg

iss-columbus-astronaut-eva-solarcell-desk-1024.jpg



Exposing for shadows, notice the overexposed atmosphere:
iss-18_eva-fincke.jpg

iss-22_eva_kotov.jpg


Exposing for highlights will make the earth a bit dark:
ISS_ULF3_STS-129.jpg

sts-130-endeavour-2010-02-09-iss022e059303.jpg


Yet all those photos are correct :)

Notice that there are no extreme under/over exposure and not much highlight blur (in a vacuum things are pretty razor sharp- perhaps we can have highlight blur related to atmospheric density ?).
 
Last edited:

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
Will there be an easy way to disable HDR?

It's still pretty much unknown. At first, we would need some kind of an experiment showing a good results. I don't see any point in implementing something that would make things worse.


HDR photography is meant to bring out detail, but too often HDR in simulations does the opposite, looking more like viewing the world through a cheap CCTV camera.

Yes, I have noticed the same.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
I forgot to mention that "ShaderDebug = 0" can be switched to "1" to save shader disassemply in Orbiter root. That shows how the shader are compiled and can help to optimize shaders.

Also, this line (192) should be enabled from PBR.fx
PHP:
// Convert to sRGB (approximate)
cRefl *= cRefl;
 

SolarLiner

It's necessary, TARS.
Addon Developer
Joined
Jun 14, 2010
Messages
1,847
Reaction score
2
Points
0
Location
404 ROAD NOT FOUND
Will there be an easy way to disable HDR? I'm asking because that was the single biggest turn-off for me for the D3D11 client- it was implemented very poorly, and there was no way to disable it.

Is exposure compensation applied selectively to very bright and dim objects, or is it applied to the whole screen all at one time? I don't want the exposure compensation to wash out contrast and detail in any part of the image. HDR photography is meant to bring out detail, but too often HDR in simulations does the opposite, looking more like viewing the world through a cheap CCTV camera.

IRL,the eye-brain system builds a virtual scene within the mind by combining snapshots of very different brightness levels into one idea so that nothing seems washed out and everything has lots of detail. The eye adjusts so quickly when scanning the surroundings, that it's hard to notice just how much brighter a computer screen is than a piece of paper. It's true that the eye has a much larger dynamic range, but it still adjusts so that the center of vision is in the "sweet spot" level of brightness.

If we had eye tracking, we could link the eye gaze to the exposure control, so that the exposure would compensate if I was looking at something bright or dim.

Jarmo can implement a toggle for HDR, but I'm partially working on the implementation and I'm aiming at it being way better implemented than it was in the D3D11 client (which I remember being kinda meh as well).

The way I wanted the exposure correction to work was to dim selectively the bright areas of the image instead of the whole image at once (hence the 4x4 mipmap in tTone). But the way it is implemented now it doesn't work and looks ugly (you get dark patches around places that are the brightest, for example at the edge of the earth atmosphere when in orbit), so I decided to go back to a global average (done via mipmap generation of the backbuffer, and calculate the luminance from it). A proper implementation would require yet another pass to store those luminance values into a new buffer, and it would also require either calculating the integral of light received or keeping an "old" (from let's say 1s ago) luminance buffer and averaging the two to get a time average as well. If implemented right, it could give us a much more natural image, and after further (and proper) tonemapping, display it on the screen.

HDR is all about expanding the dynamic range and thus the contrast (the ratio between the darkest and brightest luminance that can be displayed). I'm trying to base my code on this blog post which has a functioning demo program with an HDR implementation, luminance mapping with time averaged exposure correction and tonemapping, all available with different algorithms. As you can see cycling through the environment maps and the algorithms, there are options to retain that detail in every part of the image, no matter how bright or dark.
 

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
...
Exposing for shadows, notice the overexposed atmosphere
...
Exposing for highlights will make the earth a bit dark
...
The exact same happens in "normal" photography (I'm sure you know).
Your second sentence made me think about the "grey snow" pictures, where a big superwhite area tends to trick the exposimeter into underexposing the whole picture, thus turning the white into grey.

http://www.digitalphotomentor.com/snow-grey-winter-photos/

But that's for another thread! :tiphat:
 
Last edited:

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
Yes, I know that :)

For those who don't like the HDR effect:
It's a trend and very misused. On a normal monitor, with a normal contrast range, the images will be washed out and grey.

Yet, for the client HDR means another thing. It means that the calculations can take into account a larger dynamic range.

SolarLiner, I'm not a great fan of tonemapping and other "artistic" transfer functions.
I prefer "exposure compensation" keeping things more or less "linear".
Here's a (random) example that I like:
https://www.youtube.com/watch?v=ovlI3ko4l1I
 
Last edited:

JMW

Aspiring Addon Developer
Joined
Aug 5, 2008
Messages
611
Reaction score
52
Points
43
Location
Happy Wherever
What's going on here?
Can anyone help please -

Code:
D3D9Client Log




(0: 0.0s 39614276.11ms)(0xD10) [Not Compiled With nVidia API]
(1: 0.0s 03.36ms)(0xD10) ================ clbkInitialise ===============
(2: 0.0s 00.06ms)(0xD10) Orbiter Version = 160412
(3: 0.0s 11.19ms)(0xD10) Index:0 320 x 200 60Hz (22)
(4: 0.0s 00.38ms)(0xD10) Index:1 320 x 240 60Hz (22)
(5: 0.0s 00.68ms)(0xD10) Index:2 400 x 300 60Hz (22)
(6: 0.0s 01.34ms)(0xD10) Index:3 512 x 384 60Hz (22)
(7: 0.0s 00.98ms)(0xD10) Index:4 640 x 400 60Hz (22)
(8: 0.0s 00.96ms)(0xD10) Index:5 640 x 480 60Hz (22)
(9: 0.0s 01.01ms)(0xD10) Index:6 800 x 600 60Hz (22)
(10: 0.0s 01.21ms)(0xD10) Index:7 1024 x 768 60Hz (22)
(11: 0.0s 00.86ms)(0xD10) Index:8 1152 x 864 60Hz (22)
(12: 0.0s 00.78ms)(0xD10) Index:9 1280 x 600 60Hz (22)
(13: 0.0s 00.80ms)(0xD10) Index:10 1280 x 720 60Hz (22)
(14: 0.0s 00.79ms)(0xD10) Index:11 1280 x 768 60Hz (22)
(15: 0.0s 00.84ms)(0xD10) Index:12 1280 x 800 60Hz (22)
(16: 0.0s 00.83ms)(0xD10) Index:13 1360 x 768 60Hz (22)
(17: 0.0s 00.80ms)(0xD10) Index:14 1366 x 768 60Hz (22)
(18: 0.0s 00.79ms)(0xD10) Index:15 1440 x 900 60Hz (22)
(19: 0.0s 00.90ms)(0xD10) Index:16 1600 x 900 60Hz (22)
(20: 1.7s 1710.89ms)(0xD10) Scenario = .\Scenarios\(Current state).scn
(21: 1.7s 07.86ms)(0xD10) ================ clbkCreateRenderWindow ===============
(22: 1.8s 07.20ms)(0xD10) Window Handle = 0x61079E
(23: 1.8s 04.20ms)(0xD10) [VideoConfiguration] Adapter=0, ModeIndex=0
(24: 1.8s 00.20ms)(0xD10) 3D-Adapter = Intel(R) HD Graphics 4000
(25: 1.8s 00.37ms)(0xD10) dwFSMode = 0
(26: 1.8s 00.05ms)(0xD10) MaxTextureBlendStages..: 8
(27: 1.8s 00.02ms)(0xD10) MaxTextureWidth........: 8192
(28: 1.8s 00.31ms)(0xD10) MaxTextureHeight.......: 8192
(29: 1.8s 00.29ms)(0xD10) MaxTextureRepeat.......: 8192
(30: 1.8s 00.30ms)(0xD10) VolTexAddressCaps......: 0x3F
(31: 1.8s 00.30ms)(0xD10) MaxVolumeExtent........: 2048
(32: 1.8s 00.03ms)(0xD10) MaxPrimitiveCount......: 8388607
(33: 1.8s 00.02ms)(0xD10) MaxVertexIndex.........: 16777215
(34: 1.8s 00.02ms)(0xD10) MaxAnisotropy..........: 16
(35: 1.8s 00.02ms)(0xD10) MaxSimultaneousTextures: 8
(36: 1.8s 00.07ms)(0xD10) MaxStreams.............: 16
(37: 1.8s 00.03ms)(0xD10) MaxStreamStride........: 255
(38: 1.8s 00.02ms)(0xD10) MaxVertexBlendMatrices.: 4
(39: 1.8s 00.02ms)(0xD10) MaxVShaderInstrExecuted: 4294967295
(40: 1.8s 00.02ms)(0xD10) MaxPointSize...........: 256.000000
(41: 1.8s 00.02ms)(0xD10) VertexShaderVersion....: 0x300
(42: 1.8s 00.02ms)(0xD10) PixelShaderVersion.....: 0x300
(43: 1.8s 00.02ms)(0xD10) NumSimultaneousRTs.....: 4
(44: 1.8s 00.39ms)(0xD10) D3DPTEXTURECAPS_POW2...: 0
(45: 1.8s 00.03ms)(0xD10) NONPOW2CONDITIONAL.....: 0
(46: 1.8s 00.02ms)(0xD10) VertexDeclCaps.........: 0x37F
(47: 1.8s 00.31ms)(0xD10) DevCaps................: 0x19AE50
(48: 1.8s 00.03ms)(0xD10) DevCaps2...............: 0x51
(49: 1.8s 00.02ms)(0xD10) XNA Math Support.......: Yes
(50: 1.8s 00.35ms)(0xD10) Vertex Texture.........: Yes
(51: 1.8s 00.31ms)(0xD10) Shadow Mapping.........: Yes
(52: 1.8s 00.31ms)(0xD10) D3DFMT_A16B16G16R16F...: Yes
(53: 1.8s 00.29ms)(0xD10) D3DFMT_A32B32G32R32F...: Yes
(54: 1.8s 00.27ms)(0xD10) D3DFMT_D32F_LOCKABLE...: No
(55: 1.8s 00.27ms)(0xD10) D3DFMT_A2R10G10B10.....: Yes
(56: 1.8s 00.27ms)(0xD10) D3DDTCAPS_DEC3N........: No
(57: 1.8s 00.34ms)(0xD10) D3DDTCAPS_FLOAT16_2....: Yes
(58: 1.8s 00.43ms)(0xD10) D3DDTCAPS_FLOAT16_4....: Yes
(59: 1.8s 00.55ms)(0xD10) Window Size = [1494, 814]
(60: 1.8s 09.33ms)(0xD10) Creating a BackBuffer SURFHANDLE=0xC50F0B0 D3DSURF=0x79058E0
(61: 1.8s 00.05ms)(0xD10) Available Texture Memory = 1782 MB
(62: 1.8s 04.85ms)(0xD10) === [3DDevice Initialized] ===
(63: 1.8s 00.58ms)(0xD10) ----- Initialize D3D9ClientSurface Tech -----
(64: 1.9s 95.64ms)(0xD10) Render Target = 0x79058E0
(65: 2.0s 173.68ms)(0xD10) [NEW FONT] ( Courier New), Size=20, Weight=400 Pitch&Family=31
(66: 2.1s 08.39ms)(0xD10) Font Video Memory Usage = 512 kb
(67: 2.1s 01.18ms)(0xD10) Font and Charter set creation succesfull
(68: 2.1s 01.13ms)(0xD10) Texture D3D9Noise.dds Loaded. Handle=0xC50F678, (128x128), MipMaps=8, Format=0x32
(69: 2.1s 01.56ms)(0xD10) Texture Null.dds Loaded. Handle=0xC50F300, (16x16), MipMaps=1, Format=0x35545844
(70: 2.2s 155.70ms)(0xD10) Starting to initialize D3D9Client.fx a rendering technique...
(71: 2.2s 14.69ms)(0xD10)[ERROR] D3D9Effect.cpp Line:257 Error:-2147467259 D3DXCreateEffectFromFileA(pDev, name, macro, 0, D3DXSHADER_NO_PRESHADER, 0, &FX, &errors)
(72: 2.2s 00.31ms)(0xD10)[ERROR] Effect Error: Vessel.fx(122,33): error X3018: invalid subscript 'cSpe' 
(73: 170.6s 168365.87ms)(0xD10) --------------ExitModule------------
(74: 170.6s 03.55ms)(0xD10) Log Closed

Code:
**** Orbiter.log
000000.000: Build Apr 12 2016 [v.160412]
000000.000: Timer precision: 4.27637e-007 sec
000000.000: Found 0 joystick(s)
000000.000: Module AtlantisConfig.dll .... [Build 150906, API 150906]
000000.000: Module AtmConfig.dll ......... [Build 150906, API 150906]
000000.000: Module DGConfigurator.dll .... [Build 150906, API 150906]
000000.000: Module D3D9Client.dll ........ [Build 160505, API 160412]
000000.000: Module OrbiterSound.dll ...... [Build 121120, API 100830]
000000.000: 
000000.000: **** Creating simulation session
000000.000: D3D9: [DirectX 9 Initialized]
000000.000: D3D9: 3D-Adapter = Intel(R) HD Graphics 4000
000000.000: D3D9: MaxTextureWidth........: 8192
000000.000: D3D9: MaxTextureHeight.......: 8192
000000.000: D3D9: MaxTextureRepeat.......: 8192
000000.000: D3D9: VolTexAddressCaps......: 0x3F
000000.000: D3D9: NumSimultaneousRTs.....: 4
000000.000: D3D9: VertexDeclCaps.........: 0x37F
000000.000: D3D9: XNA Math Support.......: Yes
000000.000: D3D9: Vertex Texture.........: Yes
000000.000: D3D9: Shadow Mapping.........: Yes
000000.000: D3D9: D3DFMT_A16B16G16R16F...: Yes
000000.000: D3D9: D3DFMT_A32B32G32R32F...: Yes
000000.000: D3D9: D3DFMT_D32F_LOCKABLE...: No
000000.000: D3D9: D3DFMT_A2R10G10B10.....: Yes
000000.000: D3D9: D3DDTCAPS_DEC3N........: No
000000.000: D3D9: D3DDTCAPS_FLOAT16_2....: Yes
000000.000: D3D9: D3DDTCAPS_FLOAT16_4....: Yes
000000.000: D3D9: Available Texture Memory = 1782 MB
000000.000: D3D9: [3DDevice Initialized]
000000.000: D3D9: ERROR: D3D9Effect.cpp Line:257 Error:-2147467259 D3DXCreateEffectFromFileA(pDev, name, macro, 0, D3DXSHADER_NO_PRESHADER, 0, &FX, &errors)
000000.000: D3D9: ERROR: Effect Error: Vessel.fx(122,33): error X3018: invalid subscript 'cSpe'
 
Last edited:

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
What's going on here?
Can anyone help please -

Some files in your installation are from an older version of the client. Reinstall the client and make sure that all files get replaced.
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
Also get a similar error. All previous files overwritten.

Code:
**** Orbiter.log
000000.000: Build Apr 12 2016 [v.160412]
000000.000: Timer precision: 4.26667e-007 sec
000000.000: Found 0 joystick(s)
000000.000: Module AtlantisConfig.dll .... [Build 150906, API 150906]
000000.000: Module AtmConfig.dll ......... [Build 150906, API 150906]
000000.000: Module DGConfigurator.dll .... [Build 150906, API 150906]
000000.000: Module D3D9Client.dll ........ [Build 160505, API 160412]
000000.000: Module ScnEditor.dll ......... [Build 160412, API 160412]
000000.000: Module OrbiterSound.dll ...... [Build 121120, API 100830]
000000.000: Module AeroBrakeMFD.dll ...... [Build ******, API 100830]
000000.000: ---------------------------------------------------------------
000000.000: >>> WARNING: Obsolete API function used: oapiRegisterMFDMode
000000.000: At least one active module is accessing an obsolete interface function.
000000.000: Addons which rely on obsolete functions may not be compatible with
000000.000: future versions of Orbiter.
000000.000: ---------------------------------------------------------------
000000.000: Module LolaMFD.dll ........... [Build 120403, API 100830]
000000.000: 
000000.000: **** Creating simulation session
000000.000: D3D9: [DirectX 9 Initialized]
000000.000: D3D9: 3D-Adapter = NVIDIA GeForce GT 640 
000000.000: D3D9: MaxTextureWidth........: 16384
000000.000: D3D9: MaxTextureHeight.......: 16384
000000.000: D3D9: MaxTextureRepeat.......: 8192
000000.000: D3D9: VolTexAddressCaps......: 0x3F
000000.000: D3D9: NumSimultaneousRTs.....: 4
000000.000: D3D9: VertexDeclCaps.........: 0x30F
000000.000: D3D9: XNA Math Support.......: Yes
000000.000: D3D9: Vertex Texture.........: Yes
000000.000: D3D9: Shadow Mapping.........: Yes
000000.000: D3D9: D3DFMT_A16B16G16R16F...: Yes
000000.000: D3D9: D3DFMT_A32B32G32R32F...: Yes
000000.000: D3D9: D3DFMT_D32F_LOCKABLE...: Yes
000000.000: D3D9: D3DFMT_A2R10G10B10.....: Yes
000000.000: D3D9: D3DDTCAPS_DEC3N........: No
000000.000: D3D9: D3DDTCAPS_FLOAT16_2....: Yes
000000.000: D3D9: D3DDTCAPS_FLOAT16_4....: Yes
000000.000: D3D9: Available Texture Memory = 4022 MB
000000.000: D3D9: [3DDevice Initialized]
000000.000: D3D9: ERROR: D3D9Effect.cpp Line:257 Error:-2147467259 D3DXCreateEffectFromFileA(pDev, name, macro, 0, D3DXSHADER_NO_PRESHADER, 0, &FX, &errors)
000000.000: D3D9: ERROR: Effect Error: PBR.fx(233,20): warning X3206: 'dot': implicit truncation of vector type
Vessel.fx(122,33): error X3018: invalid subscript 'cSpe'
 
Last edited:

SolarLiner

It's necessary, TARS.
Addon Developer
Joined
Jun 14, 2010
Messages
1,847
Reaction score
2
Points
0
Location
404 ROAD NOT FOUND
Yes, I know that :)

For those who don't like the HDR effect:
It's a trend and very misused. On a normal monitor, with a normal contrast range, the images will be washed out and grey.

Yet, for the client HDR means another thing. It means that the calculations can take into account a larger dynamic range.

SolarLiner, I'm not a great fan of tonemapping and other "artistic" transfer functions.
I prefer "exposure compensation" keeping things more or less "linear".
Here's a (random) example that I like:
https://www.youtube.com/watch?v=ovlI3ko4l1I

Amateur photographer here, HDR is a trend, but it isn't being misused, at least lot generally. HDR is useful when the contrast is great, greater than what a picture could normally reproduce linearly. Actually, that's false; HDR is the process of gathering a high range of luminosity values (IRL photography uses bracketing for example or special sensors), and tonemapping is the process of preserving as much detail as possible through a low dynamic range medium, when coming from a high(er) dynamic range.

To take home-crafted examples, these photos don't need to be taken in HDR due to the relatively low contrast (first picture is in a cloudy weather, and so all of the incoming light is indirect, and on the second, it's mostly reflected diffuse light coming from a sunny sky), and therefore don't need any tonemapping. But these photos needed it because on the first one the contrast between the direct light of the setting sun was too high compared to the rest of the sky (and the beach), and the on second one the sea and silhouettes would have been completely blown out in the dark (and also i'd have lost details in the cloud patch, which adds to the "fullness" of the picture here).

Thing is, your own eye is doing the tonemapping to allow you to see details in the shadows as well as in the bright lights. In fact the eye can register a much high contrast than any camera currently does, pretty much.

What that means for Orbiter, is that if we go the HDR route, we can't discard tonemapping, because adaptation only would either leave bright areas completely white or dark areas completely black. With space scenes there's a much, much higher contrast than any scene on the ground, because we have the darkness of space and the bright sun at the same time (or most of the time, a bright planet shining against the really dark cosmic microwave background).
In fact, the way it was set before, and the way it is set up in the inline client, is somewhat of a poor man's tonemapping: light intensities are set so that everything will be in the right luminosity range for the monitor to display it correctly. In fact, the sun light intensity is constant and doesn't decrease with distance to prevent the outer planets from being shown too dark.
Even in the newer versions of D3D9 for Beta with the atmospheric scattering, there is a tonemapping pass for bring everything down to the [0,1] range that the monitor can display. And in the game engine that you showed, I'm sure there's even a basic Reinhard tonemapping pass with the eye adaptation.

This is why we have to choose the right processing for the HDR to LDR conversion, and why I also wanted to implement CLUTs, so that people could weigh in and make their own "perfect display"of the game.

---------- Post added at 12:48 ---------- Previous post was at 12:44 ----------

That makes me think, the tonemapping of the scattering still remains on the latest build, whereas it was removed on the test builds, which allowed for a better behavior of the tonemapper in post-process.
 

JMW

Aspiring Addon Developer
Joined
Aug 5, 2008
Messages
611
Reaction score
52
Points
43
Location
Happy Wherever
Same as 4throck:
Code:
**** Orbiter.log
000000.000: Build Apr 12 2016 [v.160412]
000000.000: Timer precision: 4.27634e-007 sec
000000.000: Found 0 joystick(s)
000000.000: Module AtlantisConfig.dll .... [Build 150906, API 150906]
000000.000: Module AtmConfig.dll ......... [Build 150906, API 150906]
000000.000: Module DGConfigurator.dll .... [Build 150906, API 150906]
000000.000: Module D3D9Client.dll ........ [Build 160505, API 160412]
000000.000: Module OrbiterSound.dll ...... [Build 121120, API 100830]
000000.000: 
000000.000: **** Creating simulation session
000000.000: D3D9: [DirectX 9 Initialized]
000000.000: D3D9: 3D-Adapter = Intel(R) HD Graphics 4000
000000.000: D3D9: MaxTextureWidth........: 8192
000000.000: D3D9: MaxTextureHeight.......: 8192
000000.000: D3D9: MaxTextureRepeat.......: 8192
000000.000: D3D9: VolTexAddressCaps......: 0x3F
000000.000: D3D9: NumSimultaneousRTs.....: 4
000000.000: D3D9: VertexDeclCaps.........: 0x37F
000000.000: D3D9: XNA Math Support.......: Yes
000000.000: D3D9: Vertex Texture.........: Yes
000000.000: D3D9: Shadow Mapping.........: Yes
000000.000: D3D9: D3DFMT_A16B16G16R16F...: Yes
000000.000: D3D9: D3DFMT_A32B32G32R32F...: Yes
000000.000: D3D9: D3DFMT_D32F_LOCKABLE...: No
000000.000: D3D9: D3DFMT_A2R10G10B10.....: Yes
000000.000: D3D9: D3DDTCAPS_DEC3N........: No
000000.000: D3D9: D3DDTCAPS_FLOAT16_2....: Yes
000000.000: D3D9: D3DDTCAPS_FLOAT16_4....: Yes
000000.000: D3D9: Available Texture Memory = 1791 MB
000000.000: D3D9: [3DDevice Initialized]
000000.000: D3D9: ERROR: D3D9Effect.cpp Line:257 Error:-2147467259 D3DXCreateEffectFromFileA(pDev, name, macro, 0, D3DXSHADER_NO_PRESHADER, 0, &FX, &errors)
000000.000: D3D9: ERROR: Effect Error: PBR.fx(233,20): warning X3206: 'dot': implicit truncation of vector type
Vessel.fx(122,33): error X3018: invalid subscript 'cSpe'
:shifty:
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
Also get a similar error. All previous files overwritten.

Sorry, about that. Looks like there is a problem related to local light sources. I'll try prepare a new build soon. Meanwhile, you can enable local light sources from a visual effects tab to avoid the error.
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
What that means for Orbiter, is that if we go the HDR route, we can't discard tonemapping, because adaptation only would either leave bright areas completely white or dark areas completely black....

I agree with your comments.
It comes down to taste. I just prefer a more linear tonemapping function, with under and overexposure. More or less as it is today.
So your effort in a customizable LUT is very welcome!

For the sake of discussion, Wikipedia (https://en.wikipedia.org/wiki/Tone_mapping) has excellent examples.

HDR image (strange looking to me - interior spotlights are brighter than sunlight?):
Old_saint_pauls_1.jpg


Raw exposures (to me the 5th image looks "real"):
HDRI-Example.jpg


So for Orbiter some way of changing exposure, just like these 6 images, would be ideal. Even better if it was by key-press.

Anyway, it comes down to personal taste X realism. So customization is really important.
 
Last edited:

SolarLiner

It's necessary, TARS.
Addon Developer
Joined
Jun 14, 2010
Messages
1,847
Reaction score
2
Points
0
Location
404 ROAD NOT FOUND
I agree with your comments.
It comes down to taste. I just prefer a more linear tonemapping function, with under and overexposure. More or less as it is today.
So your effort in a customizable LUT is very welcome!

For the sake of discussion, Wikipedia (https://en.wikipedia.org/wiki/Tone_mapping) has excellent examples.

HDR image (strange looking to me - interior spotlights are brighter than sunlight?):
Old_saint_pauls_1.jpg


Raw exposures (to me the 5th image looks "real"):
HDRI-Example.jpg


So for Orbiter some way of changing exposure, just like these 6 images, would be ideal. Even better if it was by key-press.

Anyway, it comes down to personal taste X realism. So customization is really important.

Well, this example is a good one... to show tonemapping done badly. Of course the windows should have a higher luminosity, but to get both the details of the luminary(?) and the interior, you can see that HDR tonemapping is required; in the raw exposures, either the window of the interior is getting proper exposure. (that's 3rd and 6th pictures). Now imagine the interior is your ship and the window is the planet over which you're orbiting, contrast-wise, but times 1000. There's clearly no way to be able to linearly map the input values to the monitor and have a balaned image.

But as with any photography / graphic tool it is left to artists to choose the right values. Here we don't exactly have an artistic department (I mean, I'd be the closest to being one here, but I'm far, faaarr from that :rofl: ), so I'll make an effort to expose parameters to tweak on top of the shader, or even in the D3D9 Options if such parameters become official (Or at least on the Debug Control window to allow for realtime changes). It becomes each and everyone's choice, but plan linearity isn't much of an option anymore I'm afraid.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
Of course the windows should have a higher luminosity, but to get both the details of the luminary(?) and the interior, you can see that HDR tonemapping is required; in the raw exposures, either the window of the interior is getting proper exposure.

Why would we need to fit a dark object and a bright object in fine detail on the same screen at the same time ? I thought the goal was pretty much the opposite of it. Capture a short range from a wider spectrum into a visible image like a human eye does and let the outside regions be mostly saturated and detailess.
 

SolarLiner

It's necessary, TARS.
Addon Developer
Joined
Jun 14, 2010
Messages
1,847
Reaction score
2
Points
0
Location
404 ROAD NOT FOUND
Why would we need to fit a dark object and a bright object in fine detail on the same screen at the same time ? I thought the goal was pretty much the opposite of it. Capture a short range from a wider spectrum into a visible image like a human eye does and let the outside regions be mostly saturated and detailess.

No, tonemapping is trying to preserve details as much as possible, from low brightness as well as bright ends. As of why would we need to do that, well, you kinda want to look at the Earth from the inside of the Arrow Freighter, or more realistically, the inside of the Cupola, don't you? ;)
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
I can do that. Here's the Earth viewed from Cupola. Now, what's wrong in it that could be fixed with tonemapping ?
 

Attachments

  • Cupola.jpg
    Cupola.jpg
    267.9 KB · Views: 58

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
What's wrong in it that could be fixed with tonemapping ?

The Canadarm is "over-exposed" compared to the Earth for one...
 
Last edited:

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
The Canadarm is "over-exposed" compared to the Earth for one...

Could that simply be a problem in a material specs ?

EDIT: Also, compared to this photo it doesn't look like over exposured very much. There are brighter objects in this photo than the Earth.

sts-130-endeavour-2010-02-09-iss022e059303.jpg
 
Last edited:
Top