Dynamic lighting

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Thanks, I'll do some more testing.
 
Hoi Arno,

It is a nice Xmas present you gave us but, as always, there is a but o_O:).
The spotlight effect file was already known to me and it also worked already. You simplied it for me (us?).
So, if you apply it to a scenery object, it works OK and although the FPS hit is still substantial, it can be done.
If you apply it to a SimObject, that is where things get complicated.
Either you apply afterwards a "dusk;dawn; night;day" tweak to it or you do not,but the dynamics lights will stay on even if your SimObject is inactive! Something changed then?
As one said before, it would be nice to have this day/night switch on/switch off possibility but even if you do incorporate that in your MCX attached objects options, I do not think it will help.
I will investigate further to see if it can be in some way added to the lights section of the SimObject mdl or use a controller instead (though that one would not depend on the SimObject state)
Cheers and thanks for everything,

Roby
 
hi;

It is still me, not only the Oldguy but it look like the Dumbguy :(

I do not know what i do wrong but here i go again ; how i do it:

1= import my post into MCX (version 1.4.0.0 ef 359564) = screenshot001
2= attached 2 Spotlight to the post and it shows in MCX= screenshot002 and screenshot003
3= set new GUID to the post «Test-Spotlight-03» = screenshot009
4= Export as P3Dv4 .MDL in my Library «spotlight3» the new post «Test-Spotlight-03» = screenshot004
5= open Library Creator XML (version3.0.0.0) «spotlight3» = screenshot005
6= Add the post i just imported «Test-Spotlight-03» in the Library «spotlight3» = screenshot005
7= save the Library «spotlight3» = screenshot006
8= import the newly created «spotlight3» in MCX = screenshot007
9= NO Spotlight show in MCX = screenshot007 :banghead::banghead::banghead:

PS: in MCX the exporter settings = screenshot008

If you need more info just ask and i try to answer .
 

Attachments

hi;

It is still me, not only the Oldguy but it look like the Dumbguy :(

I do not know what i do wrong but here i go again ; how i do it:

1= import my post into MCX (version 1.4.0.0 ef 359564) = screenshot001
2= attached 2 Spotlight to the post and it shows in MCX= screenshot002 and screenshot003
3= set new GUID to the post «Test-Spotlight-03» = screenshot009
4= Export as P3Dv4 .MDL in my Library «spotlight3» the new post «Test-Spotlight-03» = screenshot004
5= open Library Creator XML (version3.0.0.0) «spotlight3» = screenshot005
6= Add the post i just imported «Test-Spotlight-03» in the Library «spotlight3» = screenshot005
7= save the Library «spotlight3» = screenshot006
8= import the newly created «spotlight3» in MCX = screenshot007
9= NO Spotlight show in MCX = screenshot007 :banghead::banghead::banghead:

PS: in MCX the exporter settings = screenshot008

If you need more info just ask and i try to answer .
Have you tried to enable this?
In the importer options you will find a new setting called “Replace effects by lights”. By default this is set to false, but if you set it to true ModelConverterX will try to replace the (spot) light effects in your model with (spot) light objects.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

Spot lights are replaced by effects on export and it seems your effects are there. So it should probably work. You can try to enable the display of a ground in MCX, then you can see the rendering of the spot light from the FX file onto the ground.

To import them back as spot lights you can edit again you need to enable the "Replace effects by lights" option as suggested above.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

I put the same object to test, only the effect is different. parameters = 0 for both
If you want to watch, everything is there:
http://occitania.gratisim.fr/zip/test_spotlights.rar

It's just to test, the effects are different, etc. ;)
I found out what is going on. The "Color Start" is used during the day and "Color End" during dusk, dawn and night. You have color start as transparent and therefore it only shows during the night. I'll update MCX to support this as well.
 
Hi Arno,

Forget about what I said for SimObjects. Instead of attaching the spotlight effect to the model, you just use the aircraft cfg and add it in the lights section. That way the effect will only show when the AI is active.
 
I got it finely working, and it was my setting in the importer and exporter setting in MCX

Thank you ; to all that help me, and specialy Arno.

:D:):wave:
 
I love this new method of creating dynamic lighting, it looks absolutely awesome, but I have one major question. When using AA the frame-rates drop to an unusable level, is there a tweek we can apply during the making of these lights to combat these disabling effects? ,or is it just something all users will just have to deal with by turning down the AA settings in the sim?
 
Hi,

Spot lights are replaced by effects on export and it seems your effects are there. So it should probably work. You can try to enable the display of a ground in MCX, then you can see the rendering of the spot light from the FX file onto the ground.

To import them back as spot lights you can edit again you need to enable the "Replace effects by lights" option as suggested above.
OHHHHHHH MY GODDDDDDDD - do you know how many times i have had to re-build scenery and re-map the lights all over again using a spreadsheet!!!! You sir........are a total legend - thank you
 
Hi,

Spot lights are replaced by effects on export and it seems your effects are there. So it should probably work. You can try to enable the display of a ground in MCX, then you can see the rendering of the spot light from the FX file onto the ground.

To import them back as spot lights you can edit again you need to enable the "Replace effects by lights" option as suggested above.
HELLO, And THANKS FOR YOUR AWESOME JOB!!
i did the "Replace effects by lights" as TRUE, and when i load a library that has some of the mdls inside with effects that are spotlights i only get the annoying 3 lines (green, red and blue ) that i am terrible in stting values so i can get the proper orientation.. i do see however the light on the ground when i create a new spotlight.
1. what am i doing wrong?
2. is there anyway to play with the orientation other than entering values in x, y and z?

REALLY, THANKS A LOT FOR THIS AWESOME TOOL.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

Can you maybe post a screenshot of how the attached object editor looks after the import?

The only way to change the orientation is to alter the x, y and z values in the attached object editor.
 
In other words Arno. This object that i created an effect before, and saved it with that effect inside, if i reopen it it does not show the light on the floor. BUT if i add again THE EXACT same dyn light effect, with same orientation, postion and color, etc.. then that new effect does show the light on the floor, but oddly if you now see at the saved effect then DOES show the light on the floor. I am going a little nuts for i have created other poles before and saved the object mdl as a bgl, and worked just fine. then i went to the simdirector of p3d and placed this object and it has no dyn light effect saved on it. If i place the one i did a week ago with its dynlight saved, sim director does find the object with its dyn light saved... is crazy. i wish there was a tutorial on how to do this.. if i make it work, i am going to do one my self on how to create light poles with dyn lights on it and then place them on a scenery. I want to create this section in my page.. is one that has over 38000 reads for GSX Level 2, and wanted to create a section on good dynamic lights for sceneries.. but this is driving me nuts. Did a whole area of the airport EIDW and looks amazing. Now i wanted to do it with a smaller light pole on the west parking, and i am completely uncapable. crazy.
Here i attach pics so you can see the odd behavior of the ligth not showing on its own, but does when adding a new spotlight with same specs.
 

Attachments

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

But can you show the attached object editor after reading the mdl file back in? Then I can hopefully see why the spotlight is not there.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
The function to convert FX files to spot lights on import only works if you use the default FX names that MCX generates. In your model you use a different name, so then it will not work.

Of course FS should still show the dynamic light correctly.
 
thanks for your help Arno. will try that way.!!
cheers. (deleted previous message by mistake, wanted just to remove the file, sorry!!)
 
The function to convert FX files to spot lights on import only works if you use the default FX names that MCX generates. In your model you use a different name, so then it will not work.

Of course FS should still show the dynamic light correctly.
hello Arno,
I managed more or less to accomplish most of the things i wanted, and to do so i created a bgl file that i placed in a scenery folder also its textures in a texture folder and same goes for the effect. all in a p3d addon scenery folder with its addon.xml... now the only thing i am missing is to know how to remove the position from those objects that are with in that "addon folder" that i have craeated. In other words, that is my library, but i cant remove the position of the bgl library objects. is there anyway to do this?
Thanks Arno!
 
Top