New Release D3D9Client Development

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
I know it's difficult to characterize a bug with no examples or screenshot, but here goes:

If you have colored lights and then add white spotlights, the spotlights will sometimes shine with colors! Those colors change with distance / intensity.
Also you see some sort of z-fighting between the lights.
I've discovered this while coding spotlights onto my Altair lander. So there's a chance of an error no my code. But on the inline client all it well.

Has anyone encountered such issues?

I haven't noticed an issue like that.

Are the colored lights a point-lights or beacons ?
When the spot-lights change a color do they retain a spot-light properties (i.e. cone angle) or do they become a point-lights emitting light all-around ?

z-fighting doesn't make sense but similar anomalies can occur when a light calculations end-up in the well known NAN space.
 

Marg

Active member
Joined
Mar 20, 2008
Messages
483
Reaction score
68
Points
28
The vessel self shadowing is so beautiful?
Aaaaa-hhhh did I miss this? I was waiting for this so long!!!!
And I found out this only now???
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,907
Reaction score
205
Points
138
Location
Cape
It's very new. Maybe a week.
And yes it is beautiful. :thumbup:
 

Marg

Active member
Joined
Mar 20, 2008
Messages
483
Reaction score
68
Points
28
Everything went suspiciously well, updated Orbiter, then client. No CTD's.
Now I began to test my Multistage2015 Space Shuttle flights.
Interesting - my STS-31 HST launch - all shadows OK, even STS casts high quality shadow on MLP (all my MLP's are vessels), with ET in focus.
But: in STS-1 launch scenario shadow of right SRB disappears as soon as I go away ~ 50m or more from the STS stack.
STS-3 - no such problem exists, but STS does not casts quality shadow onto MLP, unless I focus MLP...
I have typical options - "all visible objects", etc...
Strange, because all shuttle, mlp meshes are configured in the same manner.
Why STS-31 is totally OK, but not STS-1?
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,907
Reaction score
205
Points
138
Location
Cape
All time of day the same ?
 

Marg

Active member
Joined
Mar 20, 2008
Messages
483
Reaction score
68
Points
28
STS-1 and STS-31 very close... sun in the east in the pre-noon. Really confusing.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
STS-1 and STS-31 very close... sun in the east in the pre-noon. Really confusing.

There are a few shadowing issues detected with vessels in the latest build and those issues are being worked on. So, don't worry too much about it right now.

Also, In some scenarios surface base object shadows aren't working properly. Some meshes should be re-organized (re-grouped) to work better and that's (likely) not going to happen anytime soon.
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
689
Points
203
There are a few shadowing issues detected with vessels in the latest build and those issues are being worked on. So, don't worry too much about it right now.

Also, In some scenarios surface base object shadows aren't working properly. Some meshes should be re-organized (re-grouped) to work better and that's (likely) not going to happen anytime soon.
Speaking of shadows, the shadows of the particle stream stop being rendered when you get a few kilometers up. This is most evident with persistent particle streams such as as the smoke trails of the shuttle SRBs. Another particle stream related issue is that only diffuse particle streams casts shadows so it leaves a gap between the actual vessel shadows and where the emissive particle stream shadow should be.
 

Marg

Active member
Joined
Mar 20, 2008
Messages
483
Reaction score
68
Points
28
But overall impression is shocking... Seeing as FSS casts shadow on Shuttle, handrails, lightning mast's shadow on ET. Also in orbit - all these payloads, spacelab or satellite clamshells, or IUS payloads and cradles. Especially when suns illuminates payload bay from the side, bottom of bay is dark... I believed this is achievable.
And - I do not feel any FPS problems. Jawdropping.:thumbup:
 
Last edited:

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
Hi,
just a note about a couple of issues that have come up while developing an add-on. I'm using Orbiter2016 and D3D9Client2016-R2-1 .

1. Trying to make a "Virtual Cockpit" HUD display.
Using oapiVCRegisterHUD works with default graphics (HUD is displayed on mesh group) but not with D3D9 client - mesh group becomes completely transparent.

Am I missing something? Here's what I have in my clbkLoadVC:

Code:
bool my_vessel::clbkLoadVC (int id)
{
	DWORD nmesh = 5;
	DWORD ngrouph = 32;

	VECTOR3 hud_centre = _V(-0.25,1.05,1.9);
	double hud_size = 0.4;

	static VCHUDSPEC hud_right = {
		nmesh,
		ngrouph,       
		hud_centre,        
		hud_size     
	};

	oapiVCRegisterHUD (&hud_right);

	return true;
}

and material used for the mesh group:
Code:
MATERIAL material04
0 0 0 1
0 0 0 1
0 0 0 1
0 0 0 1

2. Particle Streams
Does D3D9 Client handle DIFFUSE particle streams? Mine always come out EMISSIVE, whether I specify DIFFUSE or EMISSIVE.

Many thanks,
BrianJ
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,917
Reaction score
2,921
Points
188
Website
github.com
mesh group becomes completely transparent.
I thought it (the group the HUD is drawn) was supposed to be invisible? There is info about this somewhere in an Orbiter manual.
Anyway, in SSU we have the HUD group with FLAG 7 and it works.
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
I thought it (the group the HUD is drawn) was supposed to be invisible?
I think you're right. I mean the HUD graphics are also invisible.


Anyway, in SSU we have the HUD group with FLAG 7 and it works.
That's fixed it. Thanks so much! Behaviour is now same in both default and D3D9 graphics. Mesh group is invisible, HUD graphics displayed. Note: HUD mesh group material needs some emissive value to display HUD graphics.
Thanks again.
 

mrozigor

Donator
Donator
Joined
May 14, 2010
Messages
24
Reaction score
0
Points
16
Location
Wrocław
Finally I tried to install Orbiter on Linux. Steps I made:
* downloaded 2016 version from official website,
* downloaded newest revision from repo,
* downloaded D3D9 (version for newest revision),
* downloaded d3dx9_43.dll with winetricks,
* enabled D3D9 on modules tab (with few others like transx, ScnEditor etc.).

When I tried to run some default scenario dialog window with "DirectX Runtime may be missing" and Orbiter hangs. Below is Orbiter.log:

Code:
**** Orbiter.log
000000.000: Build Oct 10 2017 [v.171010]
000000.000: Timer precision: 1e-007 sec
000000.000: Found 0 joystick(s)
000000.000: Module AtlantisConfig.dll .... [Build 171010, API 171010]
000000.000: Module AtmConfig.dll ......... [Build 171010, API 171010]
000000.000: Module DGConfigurator.dll .... [Build 171010, API 171010]
000000.000: Module D3D9Client.dll ........ [Build 180512, API 171010]
000000.000: Module CustomMFD.dll ......... [Build 171010, API 171010]
000000.000: Module LuaMFD.dll ............ [Build 171203, API 171010]
000000.000: Module transx.dll ............ [Build 160216, API 160214]
000000.000: Module ScriptMFD.dll ......... [Build 171203, API 171010]
000000.000: Module LuaConsole.dll ........ [Build 171203, API 171010]
000000.000: Module DX9ExtMFD.dll ......... [Build 150812, API 100830]
000000.000: Module ExtMFD.dll ............ [Build 171010, API 171010]
000000.000: Module FlightData.dll ........ [Build 171010, API 171010]
000000.000: Module Framerate.dll ......... [Build 171010, API 171010]
000000.000: Module Rcontrol.dll .......... [Build 171010, API 171010]
000000.000: Module ScnEditor.dll ......... [Build 171010, API 171010]
000000.000: 
000000.000: **** Creating simulation session
000000.000: D3D9: [DirectX 9 Initialized]
            D3D9: 3D-Adapter.............. : NVIDIA GeForce GTX 460M
            D3D9: MaxTextureWidth......... : 16384
            D3D9: MaxTextureHeight........ : 16384
            D3D9: MaxTextureRepeat........ : 32768
            D3D9: VolTexAddressCaps....... : 0x3F
            D3D9: NumSimultaneousRTs...... : 4
            D3D9: VertexDeclCaps.......... : 0x30F
            D3D9: XNA Math Support........ : Yes
            D3D9: Vertex Texture.......... : Yes
            D3D9: Shadow Mapping.......... : Yes
            D3D9: D3DFMT_A16B16G16R16F.... : Yes
            D3D9: D3DFMT_A32B32G32R32F.... : Yes
            D3D9: D3DFMT_D32F_LOCKABLE.... : Yes
            D3D9: D3DFMT_A2R10G10B10...... : Yes
            D3D9: D3DFMT_L8............... : Yes
            D3D9: D3DDTCAPS_DEC3N......... : No
            D3D9: D3DDTCAPS_FLOAT16_2..... : Yes
            D3D9: D3DDTCAPS_FLOAT16_4..... : Yes
            D3D9: Runs under WINE......... : Yes
            D3D9: Available Texture Memory : 1512 MB
000000.000: D3D9: [3DDevice Initialized]
D3D9: ERROR: D3D9Surface.cpp Line:2015 Error:-2005530516 D3DXCreateEffectFromFileA(pDev, name, 0, 0, 0, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/CKBlit.fx)
D3D9: ERROR: D3D9Pad.cpp Line:83 Error:-2005530516 D3DXCreateEffectFromFileA(pDev, name, 0, 0, 0, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/Sketchpad.fx)

It looks like problem with DX runtimes but those are installed as in manual. Do you have idea what is wrong with this installation? ;)
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
Required library for the latest build is d3dx9_42.dll not *_43.dll. This may change depending on build environment. So, better to have them both.
 

mrozigor

Donator
Donator
Joined
May 14, 2010
Messages
24
Reaction score
0
Points
16
Location
Wrocław
Downloaded also version 42, but nothing changed. Or to be more specific - without version 42, Orbiter failed with information about error begin wrote to Orbiter.log. With version 42 it hangs.
 

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
I don't know what that means in Linux, but in Windows having the 42 or the 43 dll means to download either the DirectX9 February 2010 update or its subsequent June update.
 
Last edited:

mrozigor

Donator
Donator
Joined
May 14, 2010
Messages
24
Reaction score
0
Points
16
Location
Wrocław
It looks like on Linux installing DirectX Runtimes also helps (instead of only dlls with winetricks). Thanks for help!
 

fatcat

Member
Joined
May 21, 2008
Messages
110
Reaction score
7
Points
18
fyi jarmonik,

D3D9Client2016-R3b works on Mac laptop with WineHQ!:thumbup:

Only issue so far noticed is some blurry runway lights.
 

Attachments

  • Screen Shot 2018-07-28 at 12.47.56.jpg
    Screen Shot 2018-07-28 at 12.47.56.jpg
    74.9 KB · Views: 58
  • Screen Shot 2018-07-28 at 15.35.30.jpg
    Screen Shot 2018-07-28 at 15.35.30.jpg
    121.7 KB · Views: 47
  • Screen Shot 2018-07-28 at 15.30.02.jpg
    Screen Shot 2018-07-28 at 15.30.02.jpg
    48 KB · Views: 47
Last edited:

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
689
Points
203

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
Does the current iteration of the self-shadow implementation not support casting shadows on attached objects?


It should be casting shadows. However, some bugs have been detected and I am working on it. I haven't had much time to code during the summer.
 
Top