New Release D3D9Client Development

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,450
Reaction score
705
Points
203
What are the required items to be able to compile the D3D9Client sources? I want to do some tweaks to sunrise/sunset color and it seems like you can't do that from the fx files.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
508
Points
113
What are the required items to be able to compile the D3D9Client sources? I want to do some tweaks to sunrise/sunset color and it seems like you can't do that from the fx files.

From Orbitersdk\D3D9Client\README.txt :

Code:
1. Required components
----------------------

To compile the sources of the D3D9 graphics client, you need:

* The latest Orbiter release (base + SDK packages), available from the
  download page at the Orbiter site http://orbit.medphys.ucl.ac.uk/

* The latest Orbiter beta diffs, available under
  download.orbit.m6.net/betaNG/orbiter_beta.html

* A Windows C++ compiler (Visual Studio 2008 Express is ok, later should be
  fine, other compilers may or may not work).

* For the various graphics clients, you also need the respective 3-D
  graphics SDKs. The D3D9 client was built with the MS DirectX February 2010
  SDK.
  You need the DirectX End-User Runtimes (February 2010 or newer) to run
  D3D9Client. It can be downloaded at Microsoft Download Center at

  http://www.microsoft.com/download/en/details.aspx?id=9033

  (I don't know whether later DX SDK's still support the DX9 interface, but it
  may be worth a try.)

* To recompile the D3D9 source documentation you need Doxygen from

  http://www.stack.nl/~dimitri/doxygen/

  There is a doxygen configuration file in D3D9Client/doc/Doxyfile which
  can be used to generate the compressed html help file
  orbitersdk/D3D9Client/doc/D3D9Client.chm included in the repository.
  Additionally to doxygen itself some other packets might be needed (depending
  on the output format you would like to generate) to create the 'chm' file
  you need:
  - Microsoft HTML Help Workshop (compiler for .CHM files)
    http://go.microsoft.com/fwlink/?LinkId=14188
  - Graphviz (for the 'dot' tool to generate graphs)
    http://www.graphviz.org/

This information basically tells it all, but might be a bit outdated by now :blush:
- I for example use the "Visual Studio 2010 C++ Express" for building the client.
- And the 'Beta' of Orbiter is not needed (a Orbiter100830 + SDK also works and is by the way the default build environment of Jarmo)
- A SVN-Client to get the sources of D3D9Client might be usefull although a download of the sources should be enough.

If you don't like to install the NVIDIA API (needed since stereoscopic option was introduced in the Client), you might need to add an empty header "nvapi.h" into the main source directoy (Orbitersdk\D3D9Client\)

/Kuddel
 
Last edited:

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,450
Reaction score
705
Points
203
From Orbitersdk\D3D9Client\README.txt :

Code:
1. Required components
----------------------

To compile the sources of the D3D9 graphics client, you need:

* The latest Orbiter release (base + SDK packages), available from the
  download page at the Orbiter site http://orbit.medphys.ucl.ac.uk/

* The latest Orbiter beta diffs, available under
  download.orbit.m6.net/betaNG/orbiter_beta.html

* A Windows C++ compiler (Visual Studio 2008 Express is ok, later should be
  fine, other compilers may or may not work).

* For the various graphics clients, you also need the respective 3-D
  graphics SDKs. The D3D9 client was built with the MS DirectX February 2010
  SDK.
  You need the DirectX End-User Runtimes (February 2010 or newer) to run
  D3D9Client. It can be downloaded at Microsoft Download Center at

  http://www.microsoft.com/download/en/details.aspx?id=9033

  (I don't know whether later DX SDK's still support the DX9 interface, but it
  may be worth a try.)

* To recompile the D3D9 source documentation you need Doxygen from

  http://www.stack.nl/~dimitri/doxygen/

  There is a doxygen configuration file in D3D9Client/doc/Doxyfile which
  can be used to generate the compressed html help file
  orbitersdk/D3D9Client/doc/D3D9Client.chm included in the repository.
  Additionally to doxygen itself some other packets might be needed (depending
  on the output format you would like to generate) to create the 'chm' file
  you need:
  - Microsoft HTML Help Workshop (compiler for .CHM files)
    http://go.microsoft.com/fwlink/?LinkId=14188
  - Graphviz (for the 'dot' tool to generate graphs)
    http://www.graphviz.org/
This information basically tells it all, but might be a bit outdated by now :blush:
- I for example use the "Visual Studio 2010 C++ Express" for building the client.
- And the 'Beta' of Orbiter is not needed (a Orbiter100830 + SDK also works and is by the way the default build environment of Jarmo)
- A SVN-Client to get the sources of D3D9Client might be usefull although a download of the sources should be enough.

If you don't like to install the NVIDIA API (needed since stereoscopic option was introduced in the Client), you might need to add an empty header "nvapi.h" into the main source directoy (Orbitersdk\D3D9Client\)

/Kuddel
Thanks. By "empty header" do you just mean an empty text file with the file name "nvapi.h"? Also, you don't happen know where the code for the sunrise/sunset effect is?
 
Last edited:

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
508
Points
113
Thanks. By "empty header" do you just mean an empty text file with the file name "nvapi.h"? Also, you don't happen know where the code for the sunrise/sunset effect is?
Yes[1]! ...and No, sorry[2] ;)

[1] My "empty" header looks like this, so I know what it's for
Code:
// ==============================================================
// nvapi.h
// Dummy header to be able to build the D3D9Client without
// the NVIDIA NvAPI interface installed.
// ==============================================================
but as you see, an empty file would work too.

[2]..but I would guess it's in HazeManager::RenderBasic(...)
 
Last edited:

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,450
Reaction score
705
Points
203
I was looking through some old SSU posts and one thing came up: The resolution of the MFDs. Any way this could be upped? According to Urwumpe in this post, the native resolution of the shuttle MEDS MFDs are 1024x1024. This increase in native MFD resolution would enable us in SSU to implement the actual MEDS PFD.

---------- Post added at 07:54 PM ---------- Previous post was at 06:59 PM ----------

[2]..but I would guess it's in HazeManager::RenderBasic(...)
I tried altering the variables in the sunset section and all it did was change the effect the sunset/sunrise had on the atmosphere. I guess I should have clarified that I wanted to alter the color sunset/sunrise has on the meshes, not the atmosphere.
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
I guess I should have clarified that I wanted to alter the color sunset/sunrise has on the meshes, not the atmosphere.
I guess it's in D3D9Util.cpp: SurfaceLighting (for base objects) and OrbitalLighting (for vessel objects) functions.
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,450
Reaction score
705
Points
203
I guess it's in D3D9Util.cpp: SurfaceLighting (for base objects) and OrbitalLighting (for vessel objects) functions.
Thanks. Unfortunately I can't make heads or tails of the code. Could someone try to break it down? What I want do is to tweak the color as well as the intensity.
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Could someone try to break it down? What I want do is to tweak the color as well as the intensity.
You can change the color as also its intensity during sunrise and sunset with changing this constant:
Code:
                        // Amount of color component that will be removed:
                        //          red    green  blue
D3DXVECTOR3 r0 = _one - [u][b]D3DXVECTOR3([color=red]0.65[/color]f, [color=green]0.75[/color]f, [color=blue]1.0[/color]f)[/b][/u] * disp;
The more you remove (greater value of the constant) the less intensive the light will be (you can also use color component values greater than 1.0 there, too).
 

Marg

Active member
Joined
Mar 20, 2008
Messages
485
Reaction score
68
Points
28
Hello, I began some experiments with foils on spacecraft to look realistic (shiny, bumpy and reflective), but there are problems. At first, I just copied .dds texture, renaming to ***_bump.dds,
and after that I get some good effects only when I turn on "REFLECT" setting to non zero value (0.35-0.70 range) in. But ... as it is environment mapping that makes this effect, part of "foils" is black as blackness of space is reflected. Maybe could be an option to set some different "environment map" on foil material (because no real object can be seen)?
Also, for reflection in astronaut helmet (or "Apollo" crew module, etc.) - yes, that's OK, because real things - "full scene" must be observed. This is OK.
Or there is something else, what should be done about foils?

Foils - I mean upper part of Hubble space telescope, foils on ORUC, etc.
 

Felix24

Active member
Joined
May 13, 2010
Messages
245
Reaction score
95
Points
43
In real life, reflective surfaces such as mirrors reflect everything, including the blackness of space. This is because there is no light coming in from space for the surface to reflect, and the surface does not otherwise scatter any incident light.

In most cases with foil, there is still a small amount of light being reflected, even if it is reflecting black space. This is because the surface of the foil scatters some of the incident light coming from other directions. To approximate this effect in Orbiter, reduce the reflection to below 1.0, and/or add some specular light with low specular power (between 5 and 10).

To get a brushed-aluminum foil look, try adding a brushed-aluminum texture to the _spec.dds rgb channel, and make the alpha channel very dark, between 5 and 10.

Also, it might improve it even more if you also copy the brushed-aluminum texture to the diffuse texture, but I haven't tried that yet.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
508
Points
113
TortoiseSVN 1.8.2 works again with codeplex

Hi there,

I just wanted to inform you that the current version of TortoiseSVN
does again work with the codeplex-repository!

TortoiseSVN 1.8.2 is linked against Subversion 1.8.3 which seems to fix the authentication problems that were present in 1.8.0 & 1.8.1 versions of TortoiseSVN.

On my side I could not find any problems with the release (1.8.2), so it's save to upgrade your installation and working-copies.

Just for your information,
Kuddel
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,889
Reaction score
2,141
Points
203
Location
between the planets
Say guys, I encountered a little problem here...

Situation is this: I'm dynamically adding animations and meshes. When working in D3D9 client, there seems to be a problem with AddAnimationComponent. Namely, later when calling something else, like AddMesh for example, the code can take a left turn and finds itself somewhere it shouldn't be. I expierienced this problem so far only when I wrote out of bounds somewhere, or when I accessed an uninitialised pointer.

AddAnimationComponent works flawlessly otherwise. The problem appears only when calling AddMesh after calling AddAnimationComponent() after vessel initialisation (I'm also calling it in PostCreation, which seems to pose no trouble). The problem also doesn't seem to appear in Vanilla Orbiter or if I don't call AddAnimationComponent.

So the question is, is it somewhere in the range of the possible that AddAnimationComponent writes out of bounds somewhere?
 

Felix24

Active member
Joined
May 13, 2010
Messages
245
Reaction score
95
Points
43
I've been having a couple of problems with normal maps and bump maps.

The first issue is the y-axis direction of the normal/bump maps. It seems to be reversed, as shown in the attached screenshot. The top shot is using a bump map with a slightly noisy dark background and lighter braille-like bumps. The middle shot is using a normal map generated from the bump map, and the bottom shot is using a normal map generated from the bump map, with the y-axis reversed. The top two shots show the bumps with incorrect specular highlights, and the bottom shot shows them with correct specular highlights.

The second issue is a specular difference between the bump map and the normal map. The bump map does not influence the specular map at all, but the normal map does. It seems that all pixels in the normal map which are not 127,127,255 darken the resulting specular reflection.

Has anyone else noticed these before? I have also attached the bump and norm files in question.
 

Attachments

  • bump norm.jpg
    bump norm.jpg
    192.6 KB · Views: 74
  • bump norm files.zip
    472.2 KB · Views: 3

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
..I'm dynamically adding animations and meshes. When working in D3D9 client, there seems to be a problem with AddAnimationComponent. ...

I think I experienced the same with the Buran VC with working dials using LUA.
Those animations are added after everything is loaded and they crash the Client. Vanilla Orbiter works fine.
 

BruceJohnJennerLawso

Dread Lord of the Idiots
Addon Developer
Joined
Apr 14, 2012
Messages
2,585
Reaction score
0
Points
36
Does anybody know why orbiter 2010 with the latest D3D9 client hangs up when activating the B3OP.dll modul which comes with the most excellent Vostok addon by igel? Does anybody else have this problem and are there any workarounds or solutions know to it?

Thanks a lot!
C

Does it use a 2d panel?
 

Interceptor

Well-known member
Joined
Mar 28, 2008
Messages
2,718
Reaction score
76
Points
63
Location
Michigan,Florida
Hey is there a way, or a parameter in the D3d9 client one can adjust to be able to see the runway lights from farther away,and higher,it seems using the inline client you can see runway lights at a greater altitude,and distance.
 
Last edited:

BruceJohnJennerLawso

Dread Lord of the Idiots
Addon Developer
Joined
Apr 14, 2012
Messages
2,585
Reaction score
0
Points
36
Getting an odd error with D3D9 in Upsilon Andromedae System:

Code:
**** Orbiter.log
Build Aug 30 2010 [v.100830]
Timer precision: 4.05195e-007 sec
Found 0 joystick(s)
Module AtlantisConfig.dll .... [Build 100830, API 100830]
Module AtmConfig.dll ......... [Build 100830, API 100830]
Module DGConfigurator.dll .... [Build 100830, API 100830]
Module D3D9Client.dll ........ [Build 130923, API 100830]
Module AeroBrakeMFD.dll ...... [Build ******, API 100830]
---------------------------------------------------------------
>>> WARNING: Obsolete API function used: oapiRegisterMFDMode
At least one active module is accessing an obsolete interface function.
Addons which rely on obsolete functions may not be compatible with
future versions of Orbiter.
---------------------------------------------------------------
Module AtmDataMFD.dll ........ [Build ******, API 060425]
Module CameraMFD.dll [API v.060425]
CameraMFD.dll - Developer hint 3
Error loading module Modules\Plugin\CameraMFD.dll (code 1114)
Module DVToolsMFD.dll ........ [Build 120331, API 100830]
Module Lagrange.dll .......... [Build ******, API 060425]
Module LagrangeMFD.dll ....... [Build ******, API 060425]
Module Load.dll .............. [Build 110920, API 100830]
Module Map3DMFD.dll .......... [Build 101102, API 100830]
Module Telescope.dll ......... [Build 110413, API 100830]
Module OrbiterSound.dll ...... [Build 121120, API 100830]
Module ExtMFD.dll ............ [Build 100830, API 100830]
Module ScnEditor.dll ......... [Build 100830, API 100830]
Module transx.dll ............ [Build 100824, API 100823]

**** Creating simulation session
D3D9Client: [DirectX 9 Initialized]
D3D9Client: Sytem has XNA math support
D3D9Client:WARNING: [Hardware has only a limited non-power of 2 texture support]
D3D9Client: [3DDevice Initialized]
D3D9Client: [Compiling Effects for Shader Model 3.0]
D3D9Client: [Loading Stars]
D3D9Client: [Loading Constellations]
D3D9Client: [D3D9Client Initialized]
Module Sun.dll ............... [Build 100830, API 100830]
VSOP87(E) Sun: Precision 1e-006, Terms 554/6634
Finished initialising world
Module XR2Ravenstar.dll ...... [Build 130504, API 100830]
Module IMS.dll ............... [Build 130413, API 100830]
Module UCGOCars.dll .......... [Build 121103, API 100830]
Module UCGODynamicCargo.dll .. [Build 120623, API 100830]
Module XR_Facility.dll ....... [Build 130320, API 100830]
Module UMmu.dll .............. [Build 130809, API 100830]
Module DeltaGliderXR1.dll .... [Build 110702, API 100830]
Module XR5Vanguard.dll ....... [Build 110702, API 100830]
Finished initialising status
Finished initialising camera
Finished initialising panels
Finished setting up render state
Base Object 0x23E4790 = 'obj1' not cataloged
D3D9Client: [Scene Initialized]

I believe it's referring to a base object. Maybe some of the stock Orbiter ones dont work with D3D9? (ie landing beacons)
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,889
Reaction score
2,141
Points
203
Location
between the planets
Well, have you tried running it without CameraMFD? Since that's obviously what's causing the error... ?
 

BruceJohnJennerLawso

Dread Lord of the Idiots
Addon Developer
Joined
Apr 14, 2012
Messages
2,585
Reaction score
0
Points
36
Well, have you tried running it without CameraMFD? Since that's obviously what's causing the error... ?

Hmmm, no still crashing with a similar error

Code:
**** Orbiter.log
Build Aug 30 2010 [v.100830]
Timer precision: 4.05195e-007 sec
Found 0 joystick(s)
Module AtlantisConfig.dll .... [Build 100830, API 100830]
Module AtmConfig.dll ......... [Build 100830, API 100830]
Module DGConfigurator.dll .... [Build 100830, API 100830]
Module D3D9Client.dll ........ [Build 130923, API 100830]
Module AeroBrakeMFD.dll ...... [Build ******, API 100830]
---------------------------------------------------------------
>>> WARNING: Obsolete API function used: oapiRegisterMFDMode
At least one active module is accessing an obsolete interface function.
Addons which rely on obsolete functions may not be compatible with
future versions of Orbiter.
---------------------------------------------------------------
Module AtmDataMFD.dll ........ [Build ******, API 060425]
Module CameraMFD.dll [API v.060425]
CameraMFD.dll - Developer hint 3
Error loading module Modules\Plugin\CameraMFD.dll (code 1114)
Module DVToolsMFD.dll ........ [Build 120331, API 100830]
Module Lagrange.dll .......... [Build ******, API 060425]
Module LagrangeMFD.dll ....... [Build ******, API 060425]
Module Load.dll .............. [Build 110920, API 100830]
Module Map3DMFD.dll .......... [Build 101102, API 100830]
Module Telescope.dll ......... [Build 110413, API 100830]
Module OrbiterSound.dll ...... [Build 121120, API 100830]
Module ExtMFD.dll ............ [Build 100830, API 100830]
Module ScnEditor.dll ......... [Build 100830, API 100830]
Module transx.dll ............ [Build 100824, API 100823]

**** Creating simulation session
D3D9Client: [DirectX 9 Initialized]
D3D9Client: Sytem has XNA math support
D3D9Client:WARNING: [Hardware has only a limited non-power of 2 texture support]
D3D9Client: [3DDevice Initialized]
D3D9Client: [Compiling Effects for Shader Model 3.0]
D3D9Client: [Loading Stars]
D3D9Client: [Loading Constellations]
D3D9Client: [D3D9Client Initialized]
Module Sun.dll ............... [Build 100830, API 100830]
VSOP87(E) Sun: Precision 1e-006, Terms 554/6634
Finished initialising world
Module XR2Ravenstar.dll ...... [Build 130504, API 100830]
Module IMS.dll ............... [Build 130413, API 100830]
Module UCGOCars.dll .......... [Build 121103, API 100830]
Module UCGODynamicCargo.dll .. [Build 120623, API 100830]
Module XR_Facility.dll ....... [Build 130320, API 100830]
Module UMmu.dll .............. [Build 130809, API 100830]
Module DeltaGliderXR1.dll .... [Build 110702, API 100830]
Module XR5Vanguard.dll ....... [Build 110702, API 100830]
Finished initialising status
Finished initialising camera
Finished initialising panels
Finished setting up render state
Base Object 0x22F6868 = 'obj1' not cataloged
D3D9Client: [Scene Initialized]

It appears that IMS isn't working with it for some reason, even with the patch installed. I'll do some more checking to see if I can resolve whats causing the problem.
 
Top