New Release D3D9Client Development

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,769
Reaction score
31
Points
123
Could support for more than one environment camera per vessel be added? I'd like to be able to tie them to specific animations, in SSU's case the payload bay radiator panels and the Ku band antenna.

Currently there's only one camera and it's fixed to the bottom of the payload bay leading to inaccurate reflections once the payload bay doors have been opened (they reflect the payload bay which they shouldn't be able to do). Same deal with the Ku band antenna. Here's two comparison screenshots:

https://www.dropbox.com/s/we0h0grfdjdjk7f/STS107_Kuband_PLBcam_A.jpg?dl=0
https://www.dropbox.com/s/xwmwg7xkuo5osod/SSU_Kuband_PLBcam_A.jpg?dl=0
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,217
Reaction score
7
Points
38
Location
Code 347
Comets?

Hi all,
I was wondering if D3D9 Graphics Client would be any better at rendering some kind of representation of comets than the default Orbiter2016, so I tried a couple of experiments with my old "comet-coma" mesh/texture.

First thing I noticed was that in D3D9, a planetary mesh (called by MaxPatchResolution = 0 in the .cfg) is not scaled by the planet radius. Not a problem, but I wonder if that will impact some add-ons (Saturn/Jupiter moons, etc.).
[NOTE Does Orbiter2016 default graphics still scale the mesh? I haven't checked]
[EDIT Checked it - yes, Orbiter2016 still scales planetary mesh by planet radius]

A good thing is that you can have transparent/semi-transparent planetary meshes in D3D9.

However, it seems there is still a maximum distance for rendering mesh polys of about 100,000km from camera.

This mesh is about 32000km wide and twice as long, it belongs to a planet of 40000km diameter. You can see clipping starts to occur at about 100,000km distance. Move further away and the mesh disappears.
o2016_d3d9_comet.jpg

Just for fun, I put it in 80000km Earth orbit.
o2016_d3d9_comet2.jpg

Looks a bit different from outside the atmosphere.
o2016_d3d9_comet3.jpg

Anyway, just messing around having fun :)
Cheers,
Brian
 
Last edited:

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
9,366
Reaction score
83
Points
138
Location
between the planets
So, I have a question about that color blitting. I think a while back it was mentioned that D3D9client does in fact support it. Today I wanted to take a crack at it ad bring my developing GUI-toolkit up to speed, but then found this in the orbiter documentation for oapiBlt:

Colour keys are only supported with Orbiter's inline graphics client. External clients ignore the ck parameter. The use of colour keys is therefore discouraged.
So... is this just outdated documentation, or do I need to use another call to blit with D3D9client? Because this very much sounds like orbiter simply not passing the color key on to graphics clients.

---------- Post added at 08:35 PM ---------- Previous post was at 08:01 PM ----------

Oh, for that matter, could you point me to the D3D9client build for r65? I had to replace my laptop two months ago, this is the first time that I'm getting my stuff to run under D3D9client again...
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
9,366
Reaction score
83
Points
138
Location
between the planets
Thanks, that works much better.

Color-key blitting however does not, so that piece of API documentation isn't outdated. I do however remember that Jarmonik said it worked. So... how does it work?
 

jarmonik

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,104
Reaction score
61
Points
48
Website
users.kymp.net
Thanks, that works much better.

Color-key blitting however does not, so that piece of API documentation isn't outdated. I do however remember that Jarmonik said it worked. So... how does it work?
oapiSetSurfaceColourKey should work. However, the ck parameter in oapiBlt does not work.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
9,366
Reaction score
83
Points
138
Location
between the planets
Ah... that way! Ok, I'll try that.

---------- Post added at 06:23 PM ---------- Previous post was at 02:04 PM ----------

I got it working, thanks.
 

Xyon

Puts the Fun in Dysfunctional
Administrator
Moderator
Addon Developer
Webmaster
GFX Staff
Donator
Beta Tester
Joined
Aug 9, 2009
Messages
6,622
Reaction score
70
Points
123
Location
10.0.0.1
Website
www.orbiter-radio.co.uk
Thanks. I'll put something in Announcements, but I think probably sometime soon, once I have a clear plan in mind.
It was less soon than I originally had in mind, because of work commitments, but the move will happen over this coming weekend. You might want to hold off committing over Saturday and Sunday. I'll post another message in here when I've moved the repo itself, after which time it should be safe to commit again.
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,769
Reaction score
31
Points
123
Last edited:

Xyon

Puts the Fun in Dysfunctional
Administrator
Moderator
Addon Developer
Webmaster
GFX Staff
Donator
Beta Tester
Joined
Aug 9, 2009
Messages
6,622
Reaction score
70
Points
123
Location
10.0.0.1
Website
www.orbiter-radio.co.uk
SVN migration is complete; you should be able to commit freely once more.
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,769
Reaction score
31
Points
123
Quick Q on PBR textures: How do you enable specular reflections with PBR textures? I have converted some of the SSU textures to the PBR format(s) but specular reflections are very much absent. I checked with the D3D9Client debug dialog and PBR is enabled and all of the textures have been loaded (frensel, normal, roughness). Have I perhaps missed a texture?
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
2,958
Reaction score
76
Points
48
Location
Lisbon
Website
orbiterspaceport.blogspot.com
On the debugger window there are options to change materials in real time. For values coming from textures, check material property » tune.

Those options should give an idea of what changes to make to your .dds files (lighter, darker, whatever)


Of course, you need to have reflections active. Check the D3D9 options on Orbiter Launchpad.
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,769
Reaction score
31
Points
123
On the debugger window there are options to change materials in real time. For values coming from textures, check material property » tune.

Those options should give an idea of what changes to make to your .dds files (lighter, darker, whatever)


Of course, you need to have reflections active. Check the D3D9 options on Orbiter Launchpad.
I'm actually talking about sunlight reflections, not actual environment reflections (those work great). I have already tried playing around with the Tuning with no success whatsoever. This is what everything looks like right now: https://www.dropbox.com/s/342as8a4oq0wvmq/D3D9Client_no_sunlight_reflections.jpg?dl=0
From that angle and with the sun directly above, there should be sunlight reflections on the payload bay radiator panels.
 

fort

Active member
Joined
Mar 19, 2008
Messages
1,006
Reaction score
0
Points
36
Hello,

some words for you kuddel to thank you for the D3D9 XPready version you made some months ago, that i tried for the first time last week, giving to me the possibility to see how D3D9 actually works with nightlights.

I'll try to complete my work on that subject including now - and it was necessary - the informations taken from the client to.

Thank you again

:tiphat:.
 

Topper

Addon Developer
Addon Developer
Donator
Joined
Mar 28, 2008
Messages
644
Reaction score
1
Points
18
Hello,
I had copied the installation folder to another PC but now the Video tab does not apper in the launchpad when I start orbiter_ng.exe . What I have to do?
 

dbeachy1

O-F Administrator
Administrator
Moderator
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
8,584
Reaction score
68
Points
123
Location
VA
Website
alteaaerospace.com
Did you remember to activate the D3D9 module in the 'Modules' tab -> Graphics engines -> check D3D9Client checkbox?
 
Top