Question Back Lighting Cull

Buck Rogers

Major Spacecadet
Joined
Feb 26, 2013
Messages
359
Reaction score
279
Points
63
An open question to all Add-on Developers:

Ever since I started modding Orbiter I've had issues with objects being lit up when they should be in the shadow of another object. AFAIK this is a d3d9 problem, and AFAIK there is no solution for this, but can't hurt to ask.

Perfect example is the cupola on the Dragon (beautiful addon), but if you turn your back to the sun you get a full spectral glare and can't see through the glass even though it should be in shadow.
I spent literally days tweaking the materials to find a compromise between visibilty, glare, spectral glow etc. Was finally relatively happy with the result but still a compromise, and not perfect (I don't know if this is still the case, it's been a while since I've flown it, and I think it's been updated since- if not I can upload the changes I made).
I've tried msh flags, double walls (normals), but never solved it.

So I can make a work around, but if anyone has any tips, or found a solution for this I would really like to know.
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,678
Reaction score
902
Points
128
Location
Code 347
Hi,
Ever since I started modding Orbiter I've had issues with objects being lit up when they should be in the shadow of another object. AFAIK this is a d3d9 problem, and AFAIK there is no solution for this, but can't hurt to ask.
I think the latest version of the D3D9 Graphics Client has vessel "self-shadowing" but I have no idea if this applies to glare, reflections, etc.
Perfect example is the cupola on the Dragon (beautiful addon), but if you turn your back to the sun you get a full spectral glare and can't see through the glass even though it should be in shadow.
In this case it can probably be remedied by adding a non-reflective material for the inner glass surface of the cupola.
I never considered "internal sun-glare" as a possible problem.
I'll take a look and have a word with Donamy and Felix24.
Cheers,
Brian
 

Buck Rogers

Major Spacecadet
Joined
Feb 26, 2013
Messages
359
Reaction score
279
Points
63
Hi BrianJ

New features!, I didn't know, I'll take a look.

To be precise, avoid confusion, reflection is not a problem, inside or out, and actually the last I saw, Donamy's pic, looks amazing (also less milky- so I think it might have been updated). It seems to be Diffuse Colour when fully lit ( only bad when it shouldn't be receiving light) that causes the glare. You can see some pics here.
If it helps here are the settings I used for the cupola:

MATERIAL 24
DIFFUSE 0.230000 0.250000 0.300000 0.109804
SPECULAR 0.179377 0.179200 0.179200 15.169553
EMISSIVE 0.043137 0.043137 0.043137

P.S. Big thanks to you, Donamy and Felix24 for your great add-ons!
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,907
Reaction score
205
Points
138
Location
Cape
Maybe you could just eliminate the inner glass, reverse the normals or change the hierarchy.
 

francisdrake

Addon Developer
Addon Developer
Joined
Mar 23, 2008
Messages
1,078
Reaction score
896
Points
128
Website
francisdrakex.deviantart.com
Don't know if this fits here:
When I make a window to look out, I make a single sided mesh, only visible from outside.
This gets a glass material, like 60% transparent, and a high reflection.

But when looking from inside, there is nothing obstructing the view, as the mesh normals are only pointing outside.
There is no window pane visible from inside, so no unwanted reflection or milky appearance.
 

Buck Rogers

Major Spacecadet
Joined
Feb 26, 2013
Messages
359
Reaction score
279
Points
63
Thanks for the feedback.
Having some of the "big wigs" chime in is reassuring that I haven't missed something major.
The problem is I'm trying to emulate the gold visor on a helmet from the inside, as a VC, deleting, or making it totally transparent "solves" the issue, but then also no visor effect!
The "best" solution would be that d3d9 would block light from passing through meshes, guess I can get my hopes up for Orbiter2024!
Oh! I think DaveS just adressed the problem (again)!
 
Top