Dynamic lighting problem

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#2
Sounds like the common problems that effect files do not always show up when you arrive at an airport. Not sure if a fix for that has been found.
 

Christian Bahr

Resource contributor
#3
... But after I returned to the airport, Dynamic lighting does not light up ...
Generally, at least 2 FX-files are used. The first FX-file contains the parameters for the dynamic light. The second FX-file controls the first FX-file. This controller FX-file with its parameters ensures that the dynamic lights are loaded before entering the scene.

Are you using a controller FX-file?
 
#4
Generally, at least 2 FX-files are used. The first FX-file contains the parameters for the dynamic light. The second FX-file controls the first FX-file. This controller FX-file with its parameters ensures that the dynamic lights are loaded before entering the scene.

Are you using a controller FX-file?
Hi
I only made a dynamic light parameter FX-files, How to make a controller FX-file?
 

Christian Bahr

Resource contributor
#5
How to make a controller FX-file?
In something like this:

"fx_apron_lamps_cntrl.fx"
[Library Effect]
Lifetime=5
Version=1.00
Radius=200
Priority=0

[controller.0]
lifetime=0.00, 0.00
type=3
distance=10000.00, 10000.00
delay=1000000.00, 1000000.00
x offset=0.00, 0.00
y offset=0.00, 0.00
z offset=0.00, 0.00
effect.0=fx_apron_lamps, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
But you have to change the name of your dynamic light (red marked text).
 

Attachments

Christian Bahr

Resource contributor
#7
It could also be due to the parameters in your FX file. If you have set the particle rate wrong, then the light loses its intensity and it finally goes out completely. It would be an advantage if we could see the contents of the FX file to see if the parameters are in good range..
 
#8
It could also be due to the parameters in your FX file. If you have set the particle rate wrong, then the light loses its intensity and it finally goes out completely. It would be an advantage if we could see the contents of the FX file to see if the parameters are in good range..
Hi
Attach the FX file I made, thank you.

[Library Effect]
Lifetime=5
Version=2.00
Radius=-1
Priority=0

[Properties]
Spot=1
Tower=1
Map=1

[Emitter.0]
Lifetime=0.50, 0.50
Delay=0.00, 0.00
Bounce=0.00
Rate=1.00, 1.00
X Emitter Velocity=0.00, 0.00
Y Emitter Velocity=0.00, 0.00
Z Emitter Velocity=0.00, 0.00
Drag=0.00, 0.00
X Particle Velocity=0.00, 0.00
Y Particle Velocity=0.00, 0.00
Z Particle Velocity=0.00, 0.00
X Rotation=0.00, 0.00
Y Rotation=0.00, 0.00
Z Rotation=0.00, 0.00
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Pitch=0.00, 0.00
Bank=0.00, 0.00
Heading=0.00, 0.00

[Particle.0]
Lifetime=0.000000, 0.000000
Type=28
X Scale=250.00, 250.00
Y Scale=0.00, 0.00
Z Scale=0.00, 0.00
X Scale Rate=0.00, 0.00
Y Scale Rate=0.00, 0.00
Z Scale Rate=0.00, 0.00
Drag=0.00, 0.00
Color Rate=0.00, 0.00
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Fade In=0.00, 0.00
Fade Out=0.00, 0.00
Static=1
Face=0, 0, 0

[ParticleAttributes.0]
Color Start=255, 224, 192, 0
Color End=255, 224, 192, 110
Bounce=0.00
X Scale Goal=0.00
Y Scale Goal=0.00
Z Scale Goal=0.00
Falloff Exponent=2.00
Inner Cone Angle=1.00
Outer Cone Angle=51.00
 

Attachments

Christian Bahr

Resource contributor
#9
Looks okay so far. Only the parameter "Color Start = 255, 224, 192, 0" is different. This parameter determines the color of the light during the day. Usually the values are zero. Is this intended that the light should also be displayed during the day?

Did you have to deal with the idea of setting the Type=28 to Type=27? Then you have no spotlight, but maybe it helps narrow down the error. Type 27 is an omnidirectional light.

Maybe you try it as a trial with the FX file from the attachment, it may helps a little bit further.

PS: In the dynamic lights I created, the Radius parameter is 20 (Radius=20). With you the radius is on -1 (Radius=-1).
 

Attachments

Last edited:
#10
Hi
According to your method, it still does not solve the problem.
Attached images, red circles and yellow circles are dynamic lights that are generated simultaneously. Red circle lights don't need to add anything or modify anything, they will always open, and the yellow circle won't work. It is not clear what the problem is.
 

Attachments

Christian Bahr

Resource contributor
#11
That's really puzzling. If it is not due to the dynamic light and the associated controller file, there are not many options left. You have not accidentally changed your effects.cfg?
 
#12
Hi
My Effects.cfg,No change

; These particle spite limits are applied based
; on the "Special Effect Detail" settings slider.

[Sprite Limit]
Medium=32000
High=128000
Low=16000

; These particle emit rate modifiers are applied based
; on the "Special Effect Detail" settings slider.

[Emit Rate]
Medium=0.700000
High=1.000000
Low=0.300000

; These particle Emit limits are applied based
; on the "Special Effect Detail" settings slider.
; If the emit limit is hit per frame as specified
; in the Emit Limit table then the rate it emits particles
; at is scaled by the factor specified in the modifier table.

[Emit Limit ]
Medium=2500
High=5000
Low=750

[Emit Limit Modifier]
Medium=0.300000
High=0.200000
Low=0.500000

; If an emitter has its LOD flag set and the viewpoint is
; further away than this at the time the effect is started
; then the emitter will be disabled.

[Detail]
Forced Distance=250

; The [Emitter Detail Distance] and [Emitter Detail Modifier]
; tables work together. If an emitter is further away than a
; distance specified in the distance table then the rate it
; emits particles at is scaled by the factor specified in the
; modifier table. Distances are in meters.

[Emitter Detail Distance]
Medium=5000
Far=10000
Very Far=15000

[Emitter Detail Modifier]
Medium=0.700000
Far=0.500000
Very Far=0.000000

; The [Light Detail Modifier] is used to LOD out lights that do
; not cover a specified number of pixels.
[Light Detail Modifier]
Minimum Pixel Size=15.5
 

Christian Bahr

Resource contributor
#14
Hi!

If the problem should arise again. In general, most developers attach their lights or controller files directly to the corresponding lamp as AttachPoint. However, the problem described by you can be a solution in that you do not attach the FX controller file, but place it using an XML-Placement File. In the SDK, this is described in the ForestFire Effect as an example.

Even I have had very good experiences with it, as there was no sudden "popping away" anymore. (in terms of the "Viewpoint-dependent suppression of objects).

The principle is very simple: you only need the LAT & LON coordinates where the lamps are located. And of course the height where the light should be. I've attached a sample file (if interested) to make it clear what I mean by XML placement. This XML file must be compiled to a BGL-File with the using of the BGL compiler "bglComp.exe"from the SDK.


Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd">

<SceneryObject lat="50.976834" lon="10.960771" alt="14" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL"><NoAutogenSuppression/><NoCrash/>
<Effect effectName="fx_dynamic_lights_cntrl" /></SceneryObject>

<SceneryObject lat="50.976714" lon="10.961858" alt="14" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL"><NoAutogenSuppression/><NoCrash/>
<Effect effectName="fx_dynamic_lights_cntrl" /></SceneryObject>

<SceneryObject lat="50.976851" lon="10.963427" alt="14" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL"><NoAutogenSuppression/><NoCrash/>
<Effect effectName="fx_dynamic_lights_cntrl" /></SceneryObject>

<SceneryObject lat="50.976703" lon="10.965252" alt="14" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL"><NoAutogenSuppression/><NoCrash/>
<Effect effectName="fx_dynamic_lights_cntrl" /></SceneryObject>

<SceneryObject lat="50.976550" lon="10.967084" alt="14" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL"><NoAutogenSuppression/><NoCrash/>
<Effect effectName="fx_dynamic_lights_cntrl" /></SceneryObject>

<SceneryObject lat="50.976054" lon="10.963278" alt="14" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL"><NoAutogenSuppression/><NoCrash/>
<Effect effectName="fx_dynamic_lights_cntrl" /></SceneryObject>

<SceneryObject lat="50.975770" lon="10.966915" alt="24" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL"><NoAutogenSuppression/><NoCrash/>
<Effect effectName="fx_dynamic_lights_cntrl" /></SceneryObject>

<SceneryObject lat="50.975570" lon="10.959611" alt="15.2" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL"><NoAutogenSuppression/><NoCrash/>
<Effect effectName="fx_dynamic_lights_cntrl" /></SceneryObject>

<SceneryObject lat="50.975128" lon="10.964932" alt="24" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL"><NoAutogenSuppression/><NoCrash/>
<Effect effectName="fx_dynamic_lights_cntrl" /></SceneryObject>

<SceneryObject lat="50.974978" lon="10.966760" alt="24" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL"><NoAutogenSuppression/><NoCrash/>
<Effect effectName="fx_dynamic_lights_cntrl" /></SceneryObject>

</FSData>
 

Attachments

Last edited:
Top