• 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.

Spot light shines through geometry

Christian Bahr

Resource contributor
Messages
951
Country
germany
It works! I did think about this yesterday and thank you for reminding me about it :) But! If you just flip normals of the whole object, then the light will not affect only the face which is turned towards the light, but all other faces will be lit. This is the configuration in which the light does not get to the third object:

View attachment 69497View attachment 69498
Great, I am very happy that you have come a step further :)
 
Messages
110
Country
russia
Great, I am very happy that you have come a step further :)
Too early to get happy 😄. The method works ok with uniform faces, but not with structures like this:
1613911963708.png
1613912238708.png

1613912350947.png
1613912417594.png


There are multiple area lights beneath the structure and no matter what faces I flip, it looks like it keeps refracting inside of the wood and come to its narrow sides. The sides directly facing the light (flipped) are fine, but the side faces still get lit. Nuts getting I am :)
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,948
Country
us-wisconsin
I am a novice with Blender. But would it be possible to create an invisible object with flipped normals to act as a 'light container'?
 

Pyscen

Resource contributor
Messages
2,994
Country
us-texas
That is a possibility. Not sure, but was Solidifying the walls help at all?
 
Messages
57
Country
china
I have the same issue, see how the light is leaking out in this picture.
1613949452719.png

Besides, I have another issue, where my textures appear to be dark in the night.
1613949557797.png

1613949538331.png
 
Messages
110
Country
russia
I am a novice with Blender. But would it be possible to create an invisible object with flipped normals to act as a 'light container'?
Nope, not going to work. Flipped normals just prevent displaying light effect on the face turned directly to the light. They don't block it. If you put another object on the way of the light with "normal normals" after the object with a flipped face it will still be lit.

That is a possibility. Not sure, but was Solidifying the walls help at all?
Nope, all the way. Shines right through.
 
Messages
7,450
Country
us-illinois
One might wonder if this is a function of the Blender- and Rendering engine- ...numeric versions being used ex: Cycles versus Eevee ? :idea:


I have not yet begun to study Blender, but I was curious as to whether this issue had already been dealt with by non-MSFS users ? :scratchch

https://www.google.com/search?clien...hUKEwiFja7byfzuAhWWVc0KHToVAhYQ4dUDCAw&uact=5


NOTE: AFAIK, links to currently available documentation for Blender Cycles versus Eevee Light settings ...may be found here:



Links to currently available documentation for Light settings common to BOTH Blender Cycles and Eevee ...may be found here:




IIUC, since the OP cites use of a "Spot" light, one must distinguish its attributes and behavior from a "Lamp" light.

https://download.blender.org/documentation/htmlI/ch12s02.html


Reportedly, if one uses a "Halo" with a Spot light, it may shine through solids like an improperly configured 'Lamp' light: :alert:

https://forums.cgsociety.org/t/spot-light-goes-through-object/829523/5


Also, I notice in some examples attached above in this thread, that the light scatters through the object and illuminates ex: the grass; perhaps this might be attenuated by use of a thin Contact Shadow, as in most FS 3D models we use single thin (sur-)Face manifold solids ?

https://blender.stackexchange.com/q...light-goes-through-the-egdes-of-a-simple-cube


Apparently, Spot light "Clip Start" value should be below the distance to the shadow casters or they won't cast a shadow; however, because of how shadow mapping works, Spot light "Clip Start" values must not be zero.


And, IIUC, Spot light "Exponent" value may also need to be increased as an inherent restriction of 'ESM' to configure 'Contact Shadows':

https://www.google.com/search?client=firefox-b-1-d&ei=50EzYNbtEI2QtAa4wpgI&q=Blender+ESM+"Exponent"+value&oq=Blender+ESM+"Exponent"+value&gs_lcp=Cgdnd3Mtd2l6EAM6CwguELADEJECEJMCOggILhCwAxCRAjoLCAAQsQMQgwEQsAM6DgguELEDEMcBEKMCELADOgsILhDHARCjAhCwAzoLCC4QsQMQgwEQsAM6BwgAELADEEM6CAgAELEDEIMBOgsILhCxAxDHARCjAjoECAAQQzoCCC46CAguELEDEIMBOgUIIRCgAToGCAAQBxAeOggIABAIEAcQHjoFCAAQhgNQuRRY4WRg231oAXAAeACAAcQBiAGSC5IBBDExLjOYAQCgAQGgAQKqAQdnd3Mtd2l6yAEKwAEB&sclient=gws-wiz&ved=0ahUKEwiW_eyC4vzuAhUNCM0KHTghBgEQ4dUDCA0&uact=5


GaryGB
 
Last edited:
Messages
110
Country
russia
Well, I can tell you that msfs tools exported gltf couldn't care less about the shadows or other light properties. Here is everything that it contains re. the light:


JSON:
        {
            "extensions" : {
                "ASOBO_macro_light" : {
                    "color" : [
                        1.0,
                        0.8808786,
                        0.312363118
                    ],
                    "intensity" : 0.0,
                    "cone_angle" : 360.0,
                    "has_simmetry" : false,
                    "flash_frequency" : 0.0,
                    "flash_duration" : 0.0,
                    "flash_phase" : 0.0,
                    "rotation_speed" : 0.0,
                    "day_night_cycle" : true
                }
            },
            "name" : "Point",
            "rotation" : [
                0.7071067690849304,
                0,
                0,
                0.7071068286895752
            ],
            "translation" : [
                -4.604541778564453,
                1.8773503303527832,
                2.7651937007904053
            ]
        },

The same goes for Asobo's example in the SDK's SimpleScenery sample. They just did this on purpose for performance reasons, as I am scared even thinking what would happen if every light source in the sim produced shadows. After some testing the flipped face/double sided material thing, I can confirm it is really less than ideal. The reason being that now the sunlight shines through the whole object because of the double-sidedness of the material. It's just what it is for now.

Btw Evee correctly handles the light:
 

Attachments

  • 1614005304575.png
    1614005304575.png
    356.2 KB · Views: 145

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,948
Country
us-wisconsin
Yep. It means emissive textures are the only recourse to imitate nighttime light reflection from surfaces.
 
Messages
372
Country
austria
Blender an the rendering engine has nothing to do with how the models get exported.
You can imagin it like this, there are 2 "workflows"
You build your scenes and models and then.
1. some specific setting are used to generate a gltf file ready for msfs
2. the blender2msfs plugin is generating a node setup just that you see in blender what maybe will be in msfs.
there are settings witch effect both 1. and 2. but if you use other methods blender specific and not exporter relevant this will only effect the viewport but not the generated gltf file.

the difference between a blender spot light and the point light is for example just the cone radius. the point light gets 360 by default.
the lights allways use the asobo_macro_light (at the moment the only one available, as far as i know)

so the light is working as it is designed. sad that the lighting section in the sdk doc is still a todo :)

If you place a light just for the reason to light up your model there is also the solution to bake the light in blender to a texture and use that as the emissive texture. then the model is looks realisic lit without lights in the scene :)
 
Last edited:
Messages
57
Country
china
If you place a light just for the reason to light up your model there is also the solution to bake the light in blender to a texture and use that as the emissive texture. then the model is looks realisic lit without lights in the scene :)
Can you maybe explain this in detail? If I'm trying to light up the whole interior of a terminal, is this method possible? Thanks in advance.
 
Messages
1
Country
thailand
Thanks for this thread. I have the same issue so I've been following it with interest. It's not the Blender lights that are the problem as you can add one of the Asobo lights into your building and it suffers the same issue.

My current work around is to have multiple interior lights at the lowest power possible angled in such a way that the bleed externally is contained directly below my building (which is raised) on concrete stilts. I then add airport miscellania (such as baggage etc) and other external lights to illuminate the same area in such a way that the bleed through from the internal lights is drowned out by the external lights.

I've been told that the issue is down to the fact that only the sun casts shadows in the sim for performance reason. How much truth there is in that I know not, but sounds reasonable.
 
Messages
7,450
Country
us-illinois
Hi I
I am making a lighthouse. In blender I have added an animated spot light. On the land side I have opaque glass as in the screenshot but the spotlight
shines though it and lights up the cliff face behind it in MSFS. Is there a way of stopping the light shining through the opaque glass. (red in pic)
Thanks
Stinger

View attachment 69166

Hi Stinger:

A separate thread regarding prior efforts and 3D modeling methods to make a lighthouse (as an analogue of a airport beacon) in FSX ...is here:



As I was looking into this topic further today, I also found a thread which shows a 'worked example' created via Blender for use in MSFS:



You may be especially interested in viewing this YouTube video by "Flying Theston": ;)

[020] Creating Animated Scenery​





PS: Some additional info which might be considered when a light source passes through objects versus being subject to "occultation": :idea:








NOTE: The latter linked web page immediately above uses animated *.GIF images of light types and not code usable for MSFS.


I hope this info helps 'shed some light' on the original subject as you posted it in the OP, and is not 'opaque' to comprehension by others here. :)

GaryGB
 
Last edited:
Messages
300
Country
unitedkingdom
Hi Stinger:

A separate thread regarding prior efforts and 3D modeling methods to make a lighthouse (as an analogue of a airport beacon) in FSX ...is here:



As I was looking into this topic further today, I also found a thread which shows a 'worked example' created via Blender for use in MSFS:



You may be especially interested in viewing this YouTube video by "Flying Theston": ;)

[020] Creating Animated Scenery​





PS: Some additional info which might be considered when a light source passes through objects versus being subject to "occultataion": :idea:





NOTE: The latter linked web page immediately above uses animated *.GIF images of light types and not code usable for MSFS.


I hope this info helps 'shed some light' on the original subject as you posted it in the OP, and is not 'opaque' to comprehension by others here. :)

GaryGB
Thanks Gary. I had used FT's video as a basis for my lighthouse and everything was fine except the problem that I posted.
FT's lighthouse shone for the whole 360 degrees so for him it didn't matter. I gave up in the end but i will check out the links you gave.

Cheers
Keith

Sent from my SM-G935F using Tapatalk
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,948
Country
us-wisconsin
For a lighthouse without a 360 degree sweep, you might need to make a keyframe animation that sweeps only as far as you need and attach a spotlight to it.
 
Top