New ReleaseD3D9Client Development

JDat

Member
Hope you are creating oapiCreateFont(50, true, "*Seven Segment"); in void Atlantis::clbkPostCreation ()

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Thanks. I think i got her to work no ctd the log entry is this:
 000000.000: D3D9: [Scene Initialized] 000000.000: Finished initialising panels 000003.195: D3D9: [Session Closed. Scene deleted.] 000003.195: D3D9: [Destroy Render Window Called] D3D9: ERROR: [Failed to Reset DirectX Device] (Likely blocked by undeleted resources) 000003.195: **** Closing simulation session 
Like I said before this can be mostly ignored. The client is supposed to release all user resources that the user have forgotten to release. It could be a problem on a client side or maybe some add-on has forgotten to release a HDC

gattispilot

Addon Developer
Addon Developer
yes void Atlantis::clbkPostCreation () { font1 = oapiCreateFont(50, true, "*Seven Segment"); font2 = oapiCreateFont(40, true, "*Seven Segment"); //font3 = oapiCreateFont(-11, true, "Arial"); font3 = oapiCreateFont(70, true, "Arial"); font4 = oapiCreateFont(25, true, "*Seven Segment"); 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
D3D9Client 4.23 is out.

There is a new beta uploaded. Since, it's almost a year from a previous "stable" release. Might be good idea to check that no major bugs CTD's exists to prevent running the client. So, that a new "stable" release could be made.
I have added some sanity checks in resource allocation/release to spot possible problems. For add-on developers it's recommended to check the Orbiter.log for errors.

- Terrain "vibration" should be fixed.

turtle91

Active member
I have tested 4.23 within my Linux/WINE configuration and it works so far...like the previous version.
However, one question I have in mind since years...
This is Linux/WINE specific, so...I know not the supported OS/env....

This is what happens many times over the last couple of years in Orbiter 2016 using various WINE/D3D9-client and different (native and WINE-built-in) version of DirectX:

-starting Orbiter with D3D9Client = Orbiterng seg-fault right before see the rendered scenario, loadingscreen was fine
-happens mostly with newer Add-Ons like the SpaceX or Delta-rockets addons
-workaround (not allways helpfull, but much more stable loading): chnaging the SCN-file to have a camera-focus to empty space.
-if then the SCN loads fine, I (mostly) switch back to vessel-view, and have a lower chance to run in a CTD.

So my question/idea:

Could there be a race-condition during initial SCN-rendering, like i.e. in WINE where we have to deal with delayed caused by "translated" SYS-CALLS.
If this might be the cause of the issues, maybe a D3D9-client "start-render-delay-in-ms" could be a cheap dirty workaround for such emulated environments ?

Maybe I am complete wrong, but there is nothing in the logs, just "loaded fine" and CTD.
I have seen this issue now on three different machines over the last years, both INTEL and AMD CPU's....and AMD and NVIDIA graphics cards.
The fact, that this problem might be easier to repro using recent addons, might be related that newer addons are using more recent texture and mesh features ?

GLS

Well-known member
Orbiter Contributor
Addon Developer
D3D9Client 4.23 is out.

There is a new beta uploaded. Since, it's almost a year from a previous "stable" release. Might be good idea to check that no major bugs CTD's exists to prevent running the client. So, that a new "stable" release could be made.
I have added some sanity checks in resource allocation/release to spot possible problems. For add-on developers it's recommended to check the Orbiter.log for errors.

- Terrain "vibration" should be fixed.
I'm getting this in both logs at exit: [ERROR] Release(0xCF71440) Ref. count not zero
No CTDs, but also no clue (can't find that address elsewhere in the logs).

turtle91

Active member
I got tons of (orbiter_d3d9.log)
warn: D3D9DeviceEx::QueryInterface: Unknown interface query
warn: 85c31227-3de5-4f00-9b3a-f11ac38c18b5

2.5 megabytes of log in just a couple of minutes Orbiter up/runtime, might could cause issues on an SSD drive on a long term.

And I see this one....not so important:

Maybe WINE specific, at the end of "orbiter.log" I got some:
D3D9: ERROR: Call [Àu)EPEøPèûÿÿuüEüÿuøPèÁlûÿMÉtjÿå]Â] Failed. D3D9 Graphics services off-line

I tried different encodings, but always got the above "Call".
However, I believe those messages can be ignored...maybe another race condition caused by delyed SYS/FUNCTION calls within an emulated env.

Felix24

Active member
I've noticed a small bug in the lens flare effect. It is in the right place vertically, but it's not in the right place horizontally. It's as if there is an invisible mesh occluding the lens flare effect that is distorted and stretched horizontally on the screen, and doesn't match mesh that is visible. This leads to the sun shining through places it shouldn't, like the tail of Shuttle Atlantis. And not shining where it should be, since it sometimes thinks there's an occlusion where there isn't one. Here's a screenshot:

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
How is the new exhaust system coming along? Or the reflection system?

DDasng1352

Addon Tester
Question, so basically the PBR shadier is enabled by default or do I have to enable it manually. Also, how do you save your changes once you change that thing to the shader.

n72.75

Addon Developer
Addon Developer
Tutorial Publisher
Donator
Randomly wondering how you got the CSM to look like that. I tried it, but it didn't work.
It took a lot of fiddling with the metalness and specularity settings. This was with the release that was contemporary with my post (can't remember).

I didn't save it because:
NASSP needs an external texture overhaul for the CSM anyway.
D3D9 client for Orbiter BETA isn't updated with this feature yet, so NASSP wouldn't be able to use it. (I'm not complaining about the lack of updates for orbiter beta, just in case it sounded like that.)

But down the road I am very excited by this feature and would love to implement it for all the shiny metal parts.

DDasng1352

Addon Tester
NASSP needs an external texture overhaul for the CSM anyway.
Pretty true if you ask me.

n72.75

Addon Developer
Addon Developer
Tutorial Publisher
Donator
Pretty true if you ask me.
And we're always open to new contributors, btw.

JDat

Member
Sorry for offtopic and, maybe, silly question: Is D3D9 project open source?

DDasng1352

Addon Tester
And we're always open to new contributors, btw.
tbh I'm not good at making textures and things, but I could contribute and test out the new updates.

kuddel

Donator
Donator
Sorry for offtopic and, maybe, silly question: Is D3D9 project open source?
Yes, yes it is! The source code rpository is here: svn://mirror.orbiter-radio.co.uk/D3D9client/
2016 branch: svn://mirror.orbiter-radio.co.uk/D3D9client/branches/2016/
BETA "branch": svn://mirror.orbiter-radio.co.uk/D3D9client/runk/

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
New "stable" Build for Orbiter 2016 is available
New build for Orbiter Beta is also available

I haven't done much testing with Orbiter Beta due to limited time, so, it might be good idea to run some tests with the Metalness shader to see if everything is working properly.

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
I've noticed a small bug in the lens flare effect. It is in the right place vertically, but it's not in the right place horizontally. It's as if there is an invisible mesh occluding the lens flare effect that is distorted and stretched horizontally on the screen, and doesn't match mesh that is visible. This leads to the sun shining through places it shouldn't, like the tail of Shuttle Atlantis. And not shining where it should be, since it sometimes thinks there's an occlusion where there isn't one. Here's a screenshot:

The lens flare should be re-implemented. Personally I don't really like it due to being too bright and large. Also, it's mathematically heavier that everything else we have all together. With the time used for that effect we could have SSAO running. Also, the sun and other light sources are usually visualized as sharper and spikier not as a smooth "flowers". I suppose we could use simple textures for flares and glares. and some math to control size and intensity. That's what most games do.