• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS How to prevent light light coming through walls

Messages
1,710
Country
australia
Is it possible to add a 'light' in blender which does not shine through other objects such as a building wall or a sign board?
I have tried all sorts of parameters within Blender (such as the BIAS setting for the light) which work within Blender (the light doesn't come through) but doesn't work in MSFS2020.
 
This has been a problem forever. I feel for you. Have you had any luck? I've experimented a lot with lights with respect to the new exporter, and this seems to be a major problem only when the light is where it can hit a surface that has another surface behind it that you don't want illuminated. The way I handled this when I was putting a red beacon on top of a bridge is as follows:
1. Create the beacon body, and make the lens part look pretty, transparent and the color you want it to be. It needs to look beautiful in sunlight. (There are some more LOD-related things I do, but that's not what this is about.)
2. Instead of putting a point light inside the beacon, put a white opaque cylinder. This will act as a surface on which you shine a light.
3. Now the trick: Surround the lens with four spotlights. Make each spotlight point at the cylinder, BUT, angle them up at an angle from the horizontal so the "spill" light that gets through can't hit anything. You may want to narrow the light cone to help with this. The reason the trick works is that the spotlights are pointing at only one thing with nothing behind it.
4. Now you can set them to a flash rate if necessary and set Day/Night Cycle.
I did this when I had some great beacons with point lights inside but which illuminated optically unreachable parts of the tower.
Let me know if you have other tricks that work. I'm frustrated that I can't put a ceiling light in the control cab of a Bascule bridge to illuminate the inside only.
 
Thanks. I sort of gave up on trying to solve this after applying some thing (I have now forgotten) which reduced the problem.

I will use your suggestions and see how I go. The method you explain seems to be very sound in theory. Now I have to try to remember what object I was editing. Now I remember. It was a street light (multiple) which I added to my bridge and found that the light from the lamp at the top of the pole illuminated the area BELOW the deck of the bridge which does not look authentic at night (unless the bridge has spot lights mounted below the deck which it doesn't).
Here is a screen shot to illustrate what I mean. I have also included a Blender file of the street light (lamp) head.



under_bridge.jpg
 

Attachments

  • LAMP_HEAD.zip
    147.6 KB · Views: 69
Last edited:
I have resurrected my street lamp to try and add a cylinder inside the housing to emit light instead of the 'glass' cover. I apply MSFS glass material and add an albedo color to the cover but Blender then does not display the cover (it becomes invisible and I can only see it - ie when I slect (click on it) do I see the outline of the cover). Is that normal?

[added later]
The image below demonstrates what I mean. I have duplicated the lamp housing and applied MSFS Glass and RED as the albedo color. Note when the cover is selected the outline is seen but when not it is not seen. Should I be seeing a RED cover? [added later] Oh I now see that in Blender the 'glass' cover will only ever show as completely transparent but once in MSFS it will be seen. That makes it a bit difficult.

I will now add a cylinder, place it 'inside' the lamp housing and make it opaque than add some spot lights 'aimed' at the cylinder. I guess that is what you suggest?


lamp_cover_glass.jpg
 
Last edited:
Yeah, I'm seeing that too. I misunderstood your problem at first, but I use point lights to make pools of light on bridge roadways, and I see the same: the point lights reflect from the water as if they were shining through the roadway. I see no solution here. I simply ignore it and keep the light intensity low so it doesn't also illuminate the support posts much. That's not a solution, though. This is a problem for Asobo. I wonder whether the 3DSMax exporter does any better. Anybody know?
As for the transparency of the glass cover, go down to the Settings portion of the panel (below the Principled BSDF part) and set the Blend Mode to Alpha Blend. Now go back up to the Principled settings and set the Alpha (near the bottom) to something like 0.01. Now you'll see through the glass cover and still see that it's there. You can tint the cover using the Base Color color picker, and you can play with the roughness.
Anyway, what I said earlier about keeping light from bleeding through would not help here. I did, however, take your lamp head and put a spotlight under it pointing up. I left the glass cover alone and used it as the diffuse reflector instead of putting a cylinder inside. At least this way you can get the lamp cover to appear to be emitting light, but I'd have to put this in the simulator to check whether enough bounces back to properly illuminate the roadway. I've got a feeling it won't. I will try later, but I'll have to use the current exporter so I don't have to go back to the old one. There shouldn't be much difference, though.
More later.
(Viewed in Eevee, the spot will make a circle of light spread on the glass cover. In Cycles, it's more realistic. I'll try it in the simulator later and let you know.)
LampHead in Blender.jpg
 
The old trick is to bake the light splash onto the bridge model and the light pole and the glass cover as a night texture. This gives the illusion of casting a light.
 
Now that brings up the possibility of generating an alpha masked texture applied to the roadway or whatever as an emissive texture. The alpha mask could be generated from the baked texture or from a "photograph" of the area if it's complex. This would be much like a night time emissive texture to make windows look like they're lighted. I believe the Day/Night Cycle switch on the Emissive Texture has been fixed. Gotta try that. Thanks.
 
You might try turning on Backface Culling in Blender. That should show you what your model will look like in sim.
If its transparent/see through, maybe flip the normal and/or add a face on bottom of bridge to stop light penetration.
Not sure if this will work in msfs2020 since I have not moved there yet.
 
Thanks to all. Wow you are getting "out of my league" now (I try and keep it simple as my aging brain is becoming a bit of a problem 😢).

Actually I reduced the light 'leakage' through the bridge deck (onto the water directly under the deck) by removing 'lights' on the street light (in Blender), giving the lamp cover an EMISSIVE color and using 'light warm' materials in SDK to add light spots on the bridge deck under the street lights. The reflections in the water are still a problem which I raised a long time ago but didn't receive any assistance (if I remember correctly) and so thought that perhaps it was normal and could not be prevented. Let's face it in the real world there would be reflections on the water but probably not so 'strong' as shown in MSFS.
 
The old trick is to bake the light splash onto the bridge model and the light pole and the glass cover as a night texture. This gives the illusion of casting a light.
Thanks Dick. That sounds like a sound method. Not sure though if I want to go to that much trouble. Maybe I will try it anyway just for the learning experience.
 
Thanks. Tried that and it didn't seem to make any difference (I am using a single mesh - the glass light cover).
Actually, that's really interesting. When I opened your Blender file and tried to make the glass cover transparent, I couldn't. I looked at a lot of things, but, no matter what I did (backface culling, alpha changes or other things) I could not make it transparent. When I re-created it exactly from pieces of UV Sphere, I had no problem. I'm still puzzled.
Anyway, I went ahead and explored the idea of making an emissive texture with splashes of light where the point lights would have placed them. I have it working with Day/Night Cycle, but there are a few strange things going on still. I'll report more when I understand what I'm doing better. It involves creating a transparency mask with an airbrush in Krita and a few other things. If all you need to do it illuminate a surface so it looks pretty at night from the air, this may be the way; sure beats huge arrays of vertex-instanced points that have to be made real in the end.
Thanks for getting me started again on this problem that's bugged many for a long time.
For what it's worth I re-tried something several have tried before - putting an Asobo "Light-Cold" in the scene; it went right through everything, and I couldn't control the brightness either.
 
Thanks for your interest.
It is strange that you can't make the cover transparent.
I did it by changing the material from MSFS Standard to MSFS GLASS.
 
Back
Top