# New ReleaseD3D9Client Development

Donator
Beta Tester

#### yitianetie

##### Member
Thanks. Sorry for that post and excuse me. I have a bit misty spirit today...

#### jarmonik

Beta Tester
That explains why the vessel don't collide with the surface on Mercury (even approximately). Let us wait your next update...
Accurate surface collision is only supported in "linear interpolation" not with the "cubic interpolation". We don't know how the Orbiter physics performs the cubic interpolation. Based on my understanding there are different solutions those might give different results. I am not exactly familiar with it, so I don't feel like starting to guess it, too many unknown variables. Martin could easily fix it.

Could you check that the collisions do work with "linear interpolation". If not then could you post a scenario using a stock DG.

#### jarmonik

Beta Tester
Could you check that the collisions do work with "linear interpolation". If not then could you post a scenario using a stock DG.
Hold on a second. It's broken Again.

#### jarmonik

Beta Tester
D3D9Client 4.18 is Out

- Mercury elevation should be fix.

Since it the April 1st, let's consider the previous fix announchment was just Aprils day fool.

DG Landed on Mercury.

#### Attachments

• dg.jpg
107.8 KB · Views: 22

#### yitianetie

##### Member
Thank you very much and nice work !

A question : which is the closest rendering of the sun glare to the reality : light glow or lensflare ? The lensflare is particularly astonishing on Mercury but maybe it is quite real as Mercury is closer to the sun.

According to you, which is the most appropriate planet glow setting ? It appears, on another thread that a value of 1.5 is quite realistic and much more than the default Orbiter value. Amazing question I know, as no body here has seen the sun from another planet

Last edited:

#### N_Molson

Donator
4.17 is sooo a morning release already

#### 4throck

##### Enthusiast !
I confirm that the Mercury elevation issue is fixed

#### n72.75

Tutorial Publisher
Donator
This really is an amazing project, and I applaud the people that work on it. Sometimes theres a lot of bug reports and feature requests, so in just here to say thank you.

#### DaveS

##### Space Shuttle Ultra Project co-developer
Donator
Beta Tester
Another potential issue with the metalness shader is that all the vessels seem to have this yellow glow shown in the attached screenshot. The orbiter is using the metalness shader.

#### Attachments

• D3D9Client_strange_yellow_color2.jpg
984.9 KB · Views: 28

#### jarmonik

Beta Tester
Another potential issue with the metalness shader is that all the vessels seem to have this yellow glow shown in the attached screenshot. The orbiter is using the metalness shader.
The color of the sun light is shifted a bit towards yellow to compensate a blueish ambient light caused by blue sky. But, yeah, it's too yellow in the screen shot, I'll have to find a better way to combine ambient and sun lights.

#### llarian

##### Active member
Following this thread I am a bit confused as to which is the latest update. Thread mentions 4.17 and 4.18 but the project site seems to have only up to 4.11. What is the current release and where is it, please?

Donator
Here

#### llarian

##### Active member
Thanks, Ripley. Got it. I think that the "beta" indication on the selection is what threw me off.

#### Felix24

##### Active member
The color of the sun light is shifted a bit towards yellow to compensate a blueish ambient light caused by blue sky. But, yeah, it's too yellow in the screen shot, I'll have to find a better way to combine ambient and sun lights.
Maybe you could de-saturate the ambient light a little? It would still be blueish but not as strong. And then the yellow compensation of sunlight could be reduced.

#### DaveS

##### Space Shuttle Ultra Project co-developer
Donator
Beta Tester
I have this problem with reflections enabled, and that is the orbiter is glowing like it had emissivity enabled. I tried removing the GC\SpaceShuttleUltra.cfg file and that did nothing. Only disabling reflections returned things to normal. I have attached two screenshots showing the issue, with the first one having reflections enabled and the second having them disabled.

#### Attachments

• D3D9Client_reflections_enabled.jpg
1.1 MB · Views: 27
• D3D9Client_reflections_disabled.jpg
1 MB · Views: 26

#### jarmonik

Beta Tester
Maybe you could de-saturate the ambient light a little? It would still be blueish but not as strong. And then the yellow compensation of sunlight could be reduced.
Yes, something like that should work.

#### jarmonik

Beta Tester
I have this problem with reflections enabled, and that is the orbiter is glowing like it had emissivity enabled. I tried removing the GC\SpaceShuttleUltra.cfg file and that did nothing. Only disabling reflections returned things to normal. I have attached two screenshots showing the issue, with the first one having reflections enabled and the second having them disabled.
I think I know what is causing it, will look into it.

#### igel

I have two simultaneous questions - seemingly unrelated, but actually quite related in my addon.

1. gcSetupCustomCamera
I am experimenting with gcAPI (did not try it before) and I can't initialize Custom Camera. The code is quite simple:

void Vostok::clbkVisualCreated(VISHANDLE vis, int refcount) { VESSELM::clbkVisualCreated(vis, refcount); mirPos = zplus; mirDir = zminus; mirUp = yplus; hMirrorSurf = oapiCreateSurfaceEx(128, 128, OAPISURFACE_TEXTURE | OAPISURFACE_RENDERTARGET | OAPISURFACE_RENDER3D | OAPISURFACE_NOMIPMAPS); oapiClearSurface(hMirrorSurf); hMirror = gcSetupCustomCamera(NULL, GetHandle(), mirPos, mirDir, mirUp, 60 * RAD, hMirrorSurf, 255); DEVMESHHANDLE hMeshVis = GetDevMesh(hVisual, Meshes["mFood"]->iMesh); oapiSetTexture(hMeshVis, 2, hMirrorSurf); }

Everything works except for gcSetupCustomCamera - it returns NULL. In both 4.11 (last stable) and 4.18 (last Beta) client. Custom Camera option in client settings is ON. I hope it is just something very simple I am missing here, if anyone can spot it? The problem might be in how I try to use API, not in the client, after all...

2. Reflective materials in cockpit view.
I normally try to work with "latest stable" client - something that addon users will likely have. Here, while trying with latest 4.18 Beta, I saw that reflective materials in the internal cockpit view are working perfectly in this beta client.

Now, what I got from the recent discussion about this feature was (correct me if I am wrong):
- the feature is restored in latest specially rebuilt Client for Orbiter 2010 (R16);​
- the feature is not going to be restored in client for 2016 (for quite reasonable considerations on future development problems: what to select and what not to select for rendering, etc.).​

Now, here comes the connection. The only reason I am trying out the Custom Camera PI is to try replace the "reflective material" implementation with "custom view render" implementation. So, when I see reflections working again in latest beta:
- is it a one-off attempt, only for Beta?​
- will it stay in future Betas?​
- did you decide to restore it in the eventual official client, after all? Or you don't know yet?​
- if it stays - will it be subject to further development, regarding same consideration (of what to render)? I am asking because my current implementation likely relies on the feature to remain more or less the same )​

In other words, I am trying to figure out whether to proceed with conversion to Custom Camera (which may or may not succeed), how to document the existing clients support for the feature in my next addon update, etc. So, second question is probably more important than the first. But in any case - even if reflective Vzor can safely stay - I'd like to figure out the Custom Camera API, just to be sure I have this tool in my arsenal if/when I need it.