Orbiter-Forum  

Go Back   Orbiter-Forum > Projects > ORBITER: 2010-P1 and newer > Bug
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Spotlights aren't visible from cockpit Issue Tools
issueid=1406 03-17-2019 04:15 PM
GLS GLS is offline
Addon Developer
Spotlights aren't visible from cockpit

Spotlights do not illuminate the ground surface, vessels or base objects when in cockpit camera view (all 3 types), but still work fine in the external view.
Only occurs in MOGE, and reproducible with DG.
Using Orbiter BETA r87.
Issue Details
Project ORBITER: 2010-P1 and newer
Status Unconfirmed
Priority 4
Affected Version Revision denoted in description
Fixed Version (none)
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)

04-01-2019 07:48 PM
Orbiter Founder
 
Actually, this appears to be down to a setting in the vessel module (at least for the DeltaGlider). The landing/docking light was created with the "external" visibility flag only. Switching the visibility flag to "always" seems to fix the problem.

I have attached a replacement Deltaglider.dll for the latest beta. Before committing a new beta, could you test if this fixes the problem for you? Also, was the DG the only vessel with this problem, or do I have to fix any others?

Interesting that the D3D9 client doesn't show that problem. I have to check if the visibility setting is actually visible to external clients.
Reply
04-02-2019 08:07 AM
GLS GLS is offline
Addon Developer
 
The same happens in SSU: the lights in the payload bay are on, but they only illuminate in the external view, and from the vc everything is dark. It wasn't like this before.

I can't check the new DeltaGlider now (will do tonight), but looking at the LightEmitter class, there is a member to set the visibility.... which SSU is not calling. So it seems you corrected the implementation or something, and actually there is no bug. I'll set the visibility flag tonight and get back with more info.
Reply
04-02-2019 11:40 AM
Donator
 
I took the liberty and tested a modified[*] DeltaGlider.
With that change, docking- and landing-lights are rendered both in external- and cockpit-view.

[*] LightSubsys.cpp (line 391)
Reply
04-02-2019 07:29 PM
GLS GLS is offline
Addon Developer
 
The new DG also works here.
Changed SSU to set the visibility flag, and it now works as expected.
That closes it on my end, thanks!
Reply
04-05-2019 06:55 PM
Beta Tester
 
It looks like we have miss-understood the visibility flags in the D3D9 for some reason. In our case:

VIS_COCKPIT: Light is only effecting interior (i.e. cockpit) part of a vessel. Therefore, it also prevents a light leaking from interior to exterior parts.

VIS_EXTERNAL: Light is only effecting to external parts of the vessel and doesn't leak into the virtual cockpit.

However, in the DX7 inline engine the visibility mode seems to be tied to camera mode where as in our case it's tied to a rendering pass exterior/interior.

We can unify the behaviour with the DX7 inline engine but in that case we will lose the leak prevention. So, any recommendations on how we should address the issue ?
Reply
04-05-2019 07:07 PM
Beta Tester
 
While making a vessel for Fred19's VB builder, I'm now working on the cockpit. the lighting that is set in the cockpit, works well, and also the exterior lighting. But, when using the generic camera, you cannot see the exterior light shone on the vessel from outside. If you set the light to "always", you can then see it in the generic camera view, but you also have leakage, like you were saying. Would there be a flag that could block light from passing through the cockpit walls ?
Reply
04-05-2019 07:38 PM
Beta Tester
 
Quote:
Originally Posted by Donamy
 While making a vessel for Fred19's VB builder, I'm now working on the cockpit. the lighting that is set in the cockpit, works well, and also the exterior lighting. But, when using the generic camera, you cannot see the exterior light shone on the vessel from outside. If you set the light to "always", you can then see it in the generic camera view, but you also have leakage, like you were saying. Would there be a flag that could block light from passing through the cockpit walls ?
This is slightly unrelated topic but:
The view that you are seeing in a generic camera MFD is simplified and it doesn't have all the features available. Altough, lights should illuminate the target. Right now, the interior set of lights are active even for the exterior parts, which is incorrect. Looks like I have forgotten to initialize exterior lights for custom views.

Realistic shadows for local lights like the sunlight has is problematic but not totally impossible.

As for the additional flags. I suppose it would be possible to add a flag to a mesh to control if a local lights are supposed to effect it or not. Like there are flags to control shadow casting.
Reply
04-08-2019 06:11 PM
Orbiter Founder
 
Quote:
Originally Posted by jarmonik
 It looks like we have miss-understood the visibility flags in the D3D9 for some reason. In our case:

VIS_COCKPIT: Light is only effecting interior (i.e. cockpit) part of a vessel. Therefore, it also prevents a light leaking from interior to exterior parts.

VIS_EXTERNAL: Light is only effecting to external parts of the vessel and doesn't leak into the virtual cockpit.

However, in the DX7 inline engine the visibility mode seems to be tied to camera mode where as in our case it's tied to a rendering pass exterior/interior.
To be honest, the leaking problem never even occurred to me. How much of a problem is this in practice, given that you can define the range of the local light sources? Is there an example with the stock vessels where the leaking effect is visible?

I'll have a think about if I can simply switch to your definition without any side effects. It sounds like a reasonable convention anyway.

Otherwise I suppose I could add additional light visibility flags to distinguish between when the source is active (as currently implemented in the inline client) and what surfaces are illuminated (as implemented by D3D9).
Reply
04-10-2019 12:15 AM
Beta Tester
 
Here's one report where Shuttle payload-bay lights are effecting the VC. The over saturation is, of course, D3D9 issue but point is that the light is leaking.
https://www.orbiter-forum.com/showth...postcount=4901

I am not aware of the issue occuring with any stock vessels. We have had this kind of configuration of local lights at-least 5 years already, and it took this long to pinpoint a problem, so it's not a major or critical issue. Of course, an add-on(s) suffering about the problem could have a separate configurations for DX7 and DX9.


Edit: I am not sure if adding more flags into the light sources is a good idea since it would add more complexity.


Also, if we look at the screen shot showing cupola at night time. If we imagine that the interior (i.e. cockpit) of the cupola would be lit by a cockpit lights. Then the scenario would fail under DX7 as well as under D3D9, neither one can handle it right now. It would sound more practical approach that a cockpit lights would be effecting to any cockpit or interior mesh regardless of camera mode or a rendering pass. And the same would apply to exterior meshes. Of course, we could test run the consept under D3D9 before making any decisions.

One problem is that there is nothing that would indicate the mesh inside the cupola being an interior or a virtual cockpit mesh. So, is there a need to expand the consept of interior/VC mesh ? Which could be done by specifying an advisory MESHVIS_INTERIOR flag. It would not effect to a visibility of a mesh, only advises that it's an interior structure.

I have been thinking about improving the virtual cockpit lighting environment with an ambient-occlusion and light bounch models. It's pretty hi-tech and I am not sure if it's ever gonna happen. It's hard to see all the implications and problems beforehand.


Reply
07-27-2019 05:46 PM
Addon Developer
 
Any consensus reached on this? Having unreadable panels in the SSU orbiter is a pain.
Reply
Reply

Issue Tools
Subscribe to this issue

All times are GMT. The time now is 09:40 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.