New Release D3D9Client Development

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
As far as I can tell, it doesn't save the modifications you do. That is what I talking about.

I haven't heard that before. I'll check it out, I may have forgotten something. However, the texture "tuning" values aren't saved they are intended to be applied to the textures them selves.

---------- Post added at 23:48 ---------- Previous post was at 23:23 ----------

As far as I can tell, it doesn't save the modifications you do. That is what I talking about.

A quick test didn't reveal any problem there. Could you check that destination files aren't flagged as "read only" ?
 

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
Before release I wanted to show you this problem regarding recorded flights annotations.
Installation is latest Orbiter 2016 RC1 in its own new folder, no other addons (other than D3D9), the scenario is \Scenarios\Tutorials\DG to the Moon:


Orbiter 2016 RC1 (inline)



Orbiter 2016 RC1 + D3D9 24



Orbiter 2016 RC1 + D3D9 24.1



Displayed text definitely has some problems.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
Displayed text definitely has some problems.
That issue is already solved (a more recent version of D3D9Client including that fix should already be posted her, I think)
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,870
Reaction score
2,868
Points
188
Website
github.com
I found 2 problems with the text output in r24.1.
I have the following code to output text so that it ends at the specified coordinates (for instance 21º)....
Code:
skp->SetTextAlign( oapi::Sketchpad::RIGHT );
sprintf_s( cbuf, 8, "%3.0f%c", dtmp, 176 );
skp->Text( 377, 325, cbuf, strlen( cbuf ) );
...but the "º" (that's char 176) shows up to the right of the coordinates, like it wasn't recognized as text but still being printed.

Another issue is having something like this
Code:
sprintf_s( cbuf, 8, "%c", 255 );
so I can get a specific char. If I want char 254 it works and prints what I want, but when using 255 nothing is printed.
 

SolarLiner

It's necessary, TARS.
Addon Developer
Joined
Jun 14, 2010
Messages
1,847
Reaction score
2
Points
0
Location
404 ROAD NOT FOUND
Here's a new build of the HDR branch for RC1
Changes:
  • New Lens Flare shader - completely rewritten to go with LGPL (the old one was taken and modified from a Shadertoy shader; this one should operate the same, might even perform better (simpler shader for almost the same result), and is 100% my creation)
  • Reverted tonemap formula back to Reinhard - more natural result, less contrasted but brighter
  • The graphics client now better uses the new dynamic range
  • Actually is the most recent one. I feel pretty much stupid at this point... :hide:
Warning: Disabling post-processing effects will result in a overexposed and flat image.

----
jarmo and kuddel: Using build_release.bat gives mea "forUnknown" filename - which apparently is the result of over.exe giving nonsense for the batch script; changing the flag to over /L runs better, but the filename syntax differs. Any idea?
Running over.exe prints this:
Code:
C:\Games\Orbiter\D3D9Client\branches\HDR\Utils\D3D9Client>over /N                                                                                                                                             
Retrieving version information from Orbiter repository...                                                                                                                                                           
160712:0451
(program appears to hang for a minute after printing the command - I'm assuming it's trying to connect to a remote repository)
 

Attachments

  • D3D9ClientBeta24.1-for2016-07-12(r744).zip
    1.6 MB · Views: 16
Last edited:

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
I found 2 problems with the text output in r24.1.

Could you check if this build fixes these two issues and the polygon of course.
Also surface tile load issues should be addressed.
 

Attachments

  • D3D9Client-Test.zip
    2 MB · Views: 72

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
That issue is already solved (a more recent version of D3D9Client including that fix should already be posted her, I think)
I don't know if this test version posted by Jarmonik is the "more recent version" Kuddel wrote about, but my recorded flights annotations problem is still the same with it.
Text goes off screen to the far right, as in my last screenshot at post #3987
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,870
Reaction score
2,868
Points
188
Website
github.com
Could you check if this build fixes these two issues and the polygon of course.
Also surface tile load issues should be addressed.

All 3 fixed! Thank you so much! :hail:
 

Marg

Active member
Joined
Mar 20, 2008
Messages
482
Reaction score
66
Points
28
Here's a new build of the HDR branch for RC1
Changes:
  • New Lens Flare shader - completely rewritten to go with LGPL (the old one was taken and modified from a Shadertoy shader; this one should operate the same, might even perform better (simpler shader for almost the same result), and is 100% my creation)
  • Reverted tonemap formula back to Reinhard - more natural result, less contrasted but brighter
  • The graphics client now better uses the new dynamic range
Warning: Disabling post-processing effects will result in a overexposed and flat image.

----
jarmo and kuddel: Using build_release.bat gives mea "forUnknown" filename - which apparently is the result of over.exe giving nonsense for the batch script; changing the flag to over /L runs better, but the filename syntax differs. Any idea?
Running over.exe prints this:
Code:
C:\Games\Orbiter\D3D9Client\branches\HDR\Utils\D3D9Client>over /N                                                                                                                                             
Retrieving version information from Orbiter repository...                                                                                                                                                           
160712:0451
(program appears to hang for a minute after printing the command - I'm assuming it's trying to connect to a remote repository)

Somehow does not work. I noticed that some files are not in this pack... for example sketchpad.fx. I see black and white overexposed image again.
(postprocessing is enabled).
 

Eduard

Member
Joined
Dec 18, 2015
Messages
57
Reaction score
6
Points
8
Warning: Disabling post-processing effects will result in a overexposed and flat image.
Ok, I enabled following option:
Video->Advanced->Enable post-processing effects
But then, de result changes from this:
16.07.24 13-28-49 GL-01S.jpg
to this:
16.07.24 13-29-11 GL-01S.jpg
Still bad. In fact even worse. But from space, I can see the nice shiny sun now (beautifull, seriously good work!).

Another thing:
Why is this option still disabled by default in the D3D9Client.cfg within your ZIP file?
 
Last edited:

Eduard

Member
Joined
Dec 18, 2015
Messages
57
Reaction score
6
Points
8
Could you check if this build fixes these two issues and the polygon of course.
Also surface tile load issues should be addressed.
As far as I can see the low and high res textures are all loading now.

But in both now posted versions the orange screentexts in the "DG to the moon" scenario still run out of the screen.
 

SolarLiner

It's necessary, TARS.
Addon Developer
Joined
Jun 14, 2010
Messages
1,847
Reaction score
2
Points
0
Location
404 ROAD NOT FOUND
Okay, so the problem was that I was having two working copies of the code, and I published an older, definitely not for-release version...

This one should look and feel and be better now.
 

Attachments

  • D3D9ClientBeta24.1-for2016-07-12(r744).zip
    1.6 MB · Views: 55

Eduard

Member
Joined
Dec 18, 2015
Messages
57
Reaction score
6
Points
8
Okay, so the problem was that I was having two working copies of the code, and I published an older, definitely not for-release version...

This one should look and feel and be better now.
Much better, but is the following a known issue (Sun is visible through buildings)?:
16.07.24 20-09-53 GL-01S.jpg



Furthermore, I am experiencing an extreme drop in framerate now. For example, when orbiting the Earth:
Old framerate: 250 - 300 fps
New framerate: 40 - 50 fps

I believe this problem is partially due to enabling post-processing effects.
I tested that now with the previous build (D3D9ClientBeta24.1-forBETA r58(r733).zip), resulting in a drop to about: 75 to 90 fps.

But the extremely low framerates of 40 - 50 are only with the newest build.

(All mentioned values here are based on the setting "Disable vertical sync" enabled. Otherwise framerates are locked to a maximum of 60 fps.)

My screen resolution: 3840x2160 (4k Ultra HD).
 
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
Sun shining through buildings is a known issue, I have to try and find a good way to test for light obstruction...
For the framerate it is also expected, post-processing effects cost quite a bit on the GPU and the fact that you're having a 4k screen to render to makes it that much greater in terms of computation.

Running in 4K with my GTX 970 yields 85-90 fps against 450-500 otherwise. That is because other than those effects not much is going on while running Orbiter, which means that your graphics card is not really working hard.
That being said, there is always place for optimization, however I am not the best for that so if anyone wants to dig into the shader code and provide me with modifications that would improve the runtime I'd take it!
 

Marg

Active member
Joined
Mar 20, 2008
Messages
482
Reaction score
66
Points
28
[ERROR] Invalid Window !! RenderWndProc() called after calling clbkDestroyRenderWindow() uMsg=0x1
I see this message in log files. And black screen after 0,5 secs when scenario is loaded...
 

Marg

Active member
Joined
Mar 20, 2008
Messages
482
Reaction score
66
Points
28
Image (after I look around with a mouse):
 

Attachments

  • Orbiter1.jpg
    Orbiter1.jpg
    212.4 KB · Views: 25

Eduard

Member
Joined
Dec 18, 2015
Messages
57
Reaction score
6
Points
8
Sun shining through buildings is a known issue, I have to try and find a good way to test for light obstruction...
For the framerate it is also expected, post-processing effects cost quite a bit on the GPU and the fact that you're having a 4k screen to render to makes it that much greater in terms of computation.

Running in 4K with my GTX 970 yields 85-90 fps against 450-500 otherwise. That is because other than those effects not much is going on while running Orbiter, which means that your graphics card is not really working hard.
That being said, there is always place for optimization, however I am not the best for that so if anyone wants to dig into the shader code and provide me with modifications that would improve the runtime I'd take it!

Ok, thanks for your answer.
I forgot to say that I have a GTX 750 Ti graphics card. I don't know how much slower my videocard is, but the relative size of performance difference between both settings you experience is not much different I understand.

As long as optimization has not been done, I have to live with it.

Is there / will there be a way to disable post-processing without having an over exposed image, like in the previous builds?
 

SolarLiner

It's necessary, TARS.
Addon Developer
Joined
Jun 14, 2010
Messages
1,847
Reaction score
2
Points
0
Location
404 ROAD NOT FOUND
Is there / will there be a way to disable post-processing without having an over exposed image, like in the previous builds?

I've been thinking about that, and I see it two ways:
- Either "disabling post-process" means disabling the bloom, lens flare and color correction effects, but keeping the tonemapping
- Or with disabling post-processing we get the old behavior, but that means having conditional statements everywhere in the shaders - might not be the best performance-wise.

So yes, that will surely will happen, but as long as the HDR branch is a branch and not in the main trunk, I won't think about that - first let's have things working correctly (the branch still lacks an auto-exposure feature) before thinking about backward compatibility.

---------- Post added at 21:38 ---------- Previous post was at 21:35 ----------

Image (after I look around with a mouse):

What happened here? Does the light accumulates over time?
It might be better visualizing what's happening if you were able to record a video of Orbiter while loading a scenario. You can do so with OBS Studio
 
Top