# Raytraced VC textures with panel lights

#### jarmonik

##### Well-known member
Orbiter Contributor
Beta Tester
I have been working on the implementation. Texture loader is done as well as the pre-shader. Currently working on sunlight shadows. However, something else came in to my mind and I would like your opinion about it. Let's say that there is a gauge in a VC panel with a rotating pointer on it. How would the pointer be lit to match the baked background. So, the client would need to form a texture coordinates form a vertex positions so that it can fetch lighting information from a background light texture. To do that each panel would require mapping between 3D space and texture space. Each "dynamic" meshgroup that requires background lighting being taken in account would need to be binded to a 3Dto2D mapping group. Or is this getting too complicated or un-nessecary ?

C++:
struct 3Dto2DMapping {
VECTOR3 PanelCornerPointsIn3D[4];
RECT TextureSpaceRect;
}

#### Felix24

##### Active member
That seems a bit too complicated. The way I'm thinking, if a gauge has backlighting, the needle/pointer is black and doesn't itself need illumination. If the addon developer wants to illuminate the needle, all they would have to do is use an image texture material for the needle, and then define an illuminated texture map for when illumination is needed.

But that's just what I'm thinking. Can you think of examples where this method wouldn't work well?

#### n72.75

Tutorial Publisher
Donator
Agree with @Felix24 here, that seems like it's getting a bit too complicated.

#### jarmonik

##### Well-known member
Orbiter Contributor
Beta Tester
But that's just what I'm thinking. Can you think of examples where this method wouldn't work well?
I didn't fully understood what you were meaning but if you think it will work then it's fine by me. So, I'll leave the 3D-2D mapping thing out of the implementation but of course we can get back to it later if needed.

#### abr35

##### Member
Are there any updates on the panel lights? The early screenshots looked so amazing, curious what happened to this project or if any help is needed.

#### n72.75

Tutorial Publisher
Donator
Hey, this project seems way to cool not to continue with. I think if we did a version with non-baked shadows (just the dark cockpit with a separate backlighting texture) and let the client support internal lights and shadows, it would really add to the atmosphere.
To the best of my knowledge we were heading in this direction. @jarmonik has been hard at work on graphics client stuff a for OpenOrbiter so he can probably best speak to this.

Replies
34
Views
3K
Replies
11
Views
1K
Replies
24
Views
696
Replies
7
Views
510
Replies
2
Views
371