New Release D3D9Client Development

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 :LOL:
 
Last edited:
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.
 
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
    D3D9Client_strange_yellow_color2.jpg
    984.9 KB · Views: 28
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.
 
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?
 
Thanks, Ripley. Got it. I think that the "beta" indication on the selection is what threw me off.
 
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.
 
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
    D3D9Client_reflections_enabled.jpg
    1.1 MB · Views: 28
  • D3D9Client_reflections_disabled.jpg
    D3D9Client_reflections_disabled.jpg
    1 MB · Views: 27
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.
 
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.
 
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.

Thanks in advance!
 
Have you linked with Orbitersdk\lib\gcAPI.lib ?
Apart from that, there are mainly 3 reasons why SetupCustomCamera would return NULL:
  1. hSurf is NULL (I don't think this is the case here)
  2. Config->CustomCamMode==0 (I don't think this is the case here, as you've checked that)
  3. hSurf is not a 3DRenderTarget (Also, I don't think this is the case here)
 
I'll write a better reply when I got more time available pretty soon. But have you called gcInitialize() ? Also, the gcSetupCustomCamera() is a part of an old API but of course it's still supported.

To use a new API you can write: (does not require any link libraries)
Code:
gcCore *pCore = gcGetCoreInterface();  // Defined in gcConst.h
if (pCore) {
    pCore->SetupCustomCamera(....);
}
else {
     // Running DX7
}
 
This something I'm might be interested in using eventually for NASSP optics, but I have no idea how to do the implementation.
 
But have you called gcInitialize() ?
No, I did not (know I have to call it) :-) Will try later today, or, more likely, tomorrow. All other suggested things - checked them out, all look OK (lib is linked, CustomCamMode=1, etc.)

Second version of API - did not even see it before, also have to check it out...
 
I'll write a better reply when I got more time available pretty soon. But have you called gcInitialize() ? Also, the gcSetupCustomCamera() is a part of an old API but of course it's still supported.

To use a new API you can write: (does not require any link libraries)
Code:
gcCore *pCore = gcGetCoreInterface();  // Defined in gcConst.h
if (pCore) {
    pCore->SetupCustomCamera(....);
}
else {
     // Running DX7
}
Two big thanks!
a) it was missing gcInitialize() indeed;
b) second interface is indeed cleaner.

Now, I hope for the answer to the second question, about the expected lifecycle of the internal mirrors in 2016 client.
 
Back
Top