P3Dv4 Dynamic Lighting

#62
Does having the colour to transparent count as not having the light on at all or does it still do the light calculations even when we can't see it?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#63
I don't know how it's handled internally in the engine.
 

=rk=

Resource contributor
#64
I started a post about how it doesn't work and then read back that it is not yet implemented. FYI, right now the cane parameters are being translated into an effect name. When the model is re-imported into MCX, the cone parameters part of the add effects pane is not available for that effect.
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#65
I started a post about how it doesn't work and then read back that it is not yet implemented. FYI, right now the cane parameters are being translated into an effect name. When the model is re-imported into MCX, the cone parameters part of the add effects pane is not available for that effect.
It is if you enable the option in MCX to replace effects by lights.
 

=rk=

Resource contributor
#66
I just tried what I thought to be the procedure on an aircraft model. I read that Christian had to create you a custom effects file, must I do that before the effect will show?
Here it is in MCX, the parameters saved with export after changing the flag in the render settings, which seemed odd that it affected the compile, anyway, I set two spotlights as landing lights and also tried one, wide angle on the tail, as a flashing red strobe.



The visible effects, fx_navred, fx_navgre and fx_strobeh were attached with the aircraft.cfg and are as expected in sim.



I did have an odd experience adding the second landing type light using the duplicate button that may have bearing on the situation. The orientation/position parameters were not copied and also were not at zero:



Obviously it is simple enough to copy/paste the coordinates of attpt_spotlight00, adding the relevant "-" symbol, but it did seem unexpected enough to mention.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#67
Hi,

I have seen the duplicate bug as well, I need to check where it comes from.

On export MCX will create new effect files for you, you need to manually copy these to the effects folder of P3D v4 for the effects to work.

The option in the settings is for the import. When it is set to true the model will be read with the lights you can edit the parameters, instead of as an effect.
 

=rk=

Resource contributor
#68
It works, thanks. The effects are somewhat different than the original defaults, notably in that there is no source or wash illumination, really only the cast pool. This could be dealt with by editing the effects file and night texture, possibly.



This angle doesn't show it so well, but the default effects actually make a small halo around the source.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#69
If there are suggestions on how to improve the effects that MCX writes just let me know. It might be some parameters are not optimal.
 

=rk=

Resource contributor
#70
Now that I understand the system, I will experiment extensively and report if I discover anything useful. I'd already tried editing the color start/color end parameter directly in the effects file, which previously had resulted in a two colored strobe effect, but nothing was noticeable in this implementation. That could be the result of a detail setting I'd missed, or maybe P3Dv4's version of the render. Overall the option offers exciting possibilities.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#71
For the spot light the start and end colors are used for day and night. So they can't be used for two color lights. I guess that's how LM implemented the spot lights.
 
#72
(The halo around the source can be enlarged by making the outer cone bigger than the inner one and use the pitch option to change the orientation (either in MCX or directly afterwards in the .fx)).
 
Last edited:
#73
Sorry, but I have deleted the rest of the above thread and start all over again because you would never understand what it was I was going to explain :(.
 
#74
Hi there!

I luckily found out by myself how to create dynamic lights for aprons for example, so I made a video to make it a bit more simple. IDK if I can share my YouTube link in this forum.

 
#76
how do you guys attach the lights when its a BGL? i have a problem where the bgl contains many objects within, but MCX only reads one of them, or none at all, so I can't really attach to all the terminal
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#77
Hi,

If a BGL contains multiple objects, you can use the buttons with the green arrows to cycle through all of them.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#79
In that case no mdl files are found the the bgl. It could contain placement information for effects or models, but not the models itself.
 
#80
how do you guys attach the lights when its a BGL? i have a problem where the bgl contains many objects within, but MCX only reads one of them, or none at all, so I can't really attach to all the terminal
As Arno said in the post below yours, you may have a bgl library - that means every object/model in this library is separate.

You can only apply effects on a model separate, not on libraries.

So a solution for your problem would be to place all the objects in one mdl file. Then you apply your effects and place it by using the placement tool in MCX.
 
Top