P3D v4 Ramp Light Effect (Dynamic Lighting)

#1
Hi there,

I am trying to develop some dynamic ramp light for my scenery. Since i have no idea what actually differ between the P3D v3.x and P3D v4 dynamic lighting. If anyone have done any dynamic lighting effect for P3D v4, hope you guys can share your thoughts and the code with relevant texture here.

My light model is 25m in height.




I want the light effect to reach the ground. I have one code which i got from Max-Liea (http://www.fsdeveloper.com/forum/threads/p3dv4-dynamic-lighting.440193/page-2#post-774197) but it seems the light is not vibrant to reach the ground. It probably suitable for door lighting or which is maybe 3-7m height building.

I am attaching the code here. Maybe someone who really pro in manipulating the effect can help to get my desired result.

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

[Properties]

[Emitter.0]
Lifetime=1.00, 1.00
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=90.00, 90.00
Bank=0.00, 0.00
Heading=0.00, 0.00

[Particle.0]
Lifetime=0.00, 0.00
Type=28
X Scale=10.00, 10.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=0, 0, 0, 0
Color End=255, 255, 200, 110
Bounce=0.00
X Scale Goal=50.00
Y Scale Goal=50.00
Z Scale Goal=0.00
Falloff Exponent=2.00
Inner Cone Angle=15.00
Outer Cone Angle=120.00
Thank you,
Manochvarma Raman
 
#7
Hi,

Can anyone suggest which section in the above codes need to be changed to get following type of effect:

Light.jpg


The above codes cover almost front and back of the poles. I wanted the light covers (80%) in front of the poles (as above image) and (20%) back of the poles.

Thanks,
Manochvarma Raman
 
#8
There are two variables in the spotlight effect called Inner Cone Angle and Outer Cone Angle.

If your effect is properly aimed, then playing with the inner cone (hotspot) and outer cone (falloff) values will give you what you need.
Playing with Falloff Exponent helps fine-tune the brightness as well.

Also, when creating a new spotlight effect and attaching it to an object, I recommend that you set the pitch, bank and heading in the FX file to 0. Then, attach it to an object in 3DSMAX and rotate it so that the object's Y axis points where you want the light to be aimed at.
 

=rk=

Resource contributor
#9
You can simply create your effect to project straight downward and then use 15° or so, of either pitch or yaw, when you position your attach point on the model.
 
#10
There are two variables in the spotlight effect called Inner Cone Angle and Outer Cone Angle.

If your effect is properly aimed, then playing with the inner cone (hotspot) and outer cone (falloff) values will give you what you need.
Playing with Falloff Exponent helps fine-tune the brightness as well.
Hi Alexis,
Thanks for the suggestions.

Also, when creating a new spotlight effect and attaching it to an object, I recommend that you set the pitch, bank and heading in the FX file to 0. Then, attach it to an object in 3DSMAX and rotate it so that the object's Y axis points where you want the light to be aimed at.
This works nicely. Next, I should try with some tweaks on inner cone (hotspot) and outer cone (falloff) values.
 

=rk=

Resource contributor
#12
I am telling you that you are going to effort to orient the direction of the actual effect, such that it displays differentially from one side of the lamp post to the other and this is not a duplication of reality and it requires more effort than a procedure that is a closer duplication of reality. In reality, floodlights shine in a symmetric cone, the shape of which is defined by the lens and reflector. The beam is not shaped, as in an automobile headlight, using focusing prisms on the face of the lens, this is essentially what you are doing by "shaping" the effect. In reality, floodlights project symmetrically and they are directionally pointed to direct the light wash to the desired location.
To display your effect in the simulator, you must attach it to a model. Besides establishing the x,y,z coordinates of this attach point, you can also assign heading, pitch and yaw and to do this to the effect attach point would more closely mimic pointing a symmetrically projected beam.
 
#13
I am telling you that you are going to effort to orient the direction of the actual effect, such that it displays differentially from one side of the lamp post to the other and this is not a duplication of reality and it requires more effort than a procedure that is a closer duplication of reality. In reality, floodlights shine in a symmetric cone, the shape of which is defined by the lens and reflector. The beam is not shaped, as in an automobile headlight, using focusing prisms on the face of the lens, this is essentially what you are doing by "shaping" the effect. In reality, floodlights project symmetrically and they are directionally pointed to direct the light wash to the desired location.
To display your effect in the simulator, you must attach it to a model. Besides establishing the x,y,z coordinates of this attach point, you can also assign heading, pitch and yaw and to do this to the effect attach point would more closely mimic pointing a symmetrically projected beam.
Hi RK,
Thanks for the long elaboration. I got a clear picture.

Thanks,
Manochvarma Raman
 
#14
I am telling you that you are going to effort to orient the direction of the actual effect, such that it displays differentially from one side of the lamp post to the other and this is not a duplication of reality and it requires more effort than a procedure that is a closer duplication of reality. In reality, floodlights shine in a symmetric cone, the shape of which is defined by the lens and reflector. The beam is not shaped, as in an automobile headlight, using focusing prisms on the face of the lens, this is essentially what you are doing by "shaping" the effect. In reality, floodlights project symmetrically and they are directionally pointed to direct the light wash to the desired location.
To display your effect in the simulator, you must attach it to a model. Besides establishing the x,y,z coordinates of this attach point, you can also assign heading, pitch and yaw and to do this to the effect attach point would more closely mimic pointing a symmetrically projected beam.
Rick is right on his approach. The only drawback I have found to this approach is that if you set the light's pitch, bank and heading from the .fx file, it will always point in that pitch, bank and true heading even if the light source moves.

When you set pbh=0,0,0, the light will follow the attach polygon's movement and rotation properly. An example of such an effect is the flashlight that was shown on a video somewhere on FSDeveloper, or the animated floodlights in the A2A T-6 Texan.

In my tests, when the light was set to a pbh of 0,0,90 for example, the light will always be pointing to the east, even if the source rotates.

The above may be out of the scope of this but I hope to add another little building block to the conversation and this very useful feature!
 
#15
This is what I did. I hope this helps.

First load the Special Effect Toolbox in P3Dv4. Believe me, this makes it much easier. You can use the settings below in your DLL.XML file. The path is the path to where the SDK is installed on my system and should be changed to match yours.

<Launch.Addon>
<Name>Special Effects Tool</Name>
<Disabled>False</Disabled>
<Path>d:\FLTSIM\P3D4\SDK\Modeling\Special Effects\Visual FX Tool\visualfxtool.dll</Path>
</Launch.Addon>

Run P3Dv4 and check if the Special Effects Toolbox shows under Tools. If it does, then you have done everything right. If not, check the path to visualfxtool.dll.

Ok, LM has made it very easy this time, but they did not had over the keys to the kingdom on a silver plate! You will still need to edit! With the Special Effect Toolbox, search for the Avalon_fx_Apron_light.fx file in the P3Dv4 Effects Folder. Don't try to edit this file manually; it will not work. Once you have the file open, look towards the bottom of the Effects Toolbox options. There are three options that you will need to be aware of.
Align to ground: OFF
Emits Light: ON
Static: ON
Cast Shadow: ON

Do the effect from the Effects Toolbox and you will see it working.

You don't need to worry about the X,Y,Z thing as you did in FSX. The higher the altitude of the effect above the ground, the bigger the spot effect will be. There is a height limitation. Above a 1000ft (I think), the effect does not work anymore. (obvious!)

You can angle the light, but I just used the lazy approach by placing the effect 5-10m in front of my lights. That give the impression that the light is at an angle.

Save your effect under a different name and enjoy your new HDR lights!

:-D
 

Attachments

#16
This is what I did. I hope this helps.

First load the Special Effect Toolbox in P3Dv4. Believe me, this makes it much easier. You can use the settings below in your DLL.XML file. The path is the path to where the SDK is installed on my system and should be changed to match yours.

<Launch.Addon>
<Name>Special Effects Tool</Name>
<Disabled>False</Disabled>
<Path>d:\FLTSIM\P3D4\SDK\Modeling\Special Effects\Visual FX Tool\visualfxtool.dll</Path>
</Launch.Addon>

Run P3Dv4 and check if the Special Effects Toolbox shows under Tools. If it does, then you have done everything right. If not, check the path to visualfxtool.dll.

Ok, LM has made it very easy this time, but they did not had over the keys to the kingdom on a silver plate! You will still need to edit! With the Special Effect Toolbox, search for the Avalon_fx_Apron_light.fx file in the P3Dv4 Effects Folder. Don't try to edit this file manually; it will not work. Once you have the file open, look towards the bottom of the Effects Toolbox options. There are three options that you will need to be aware of.
Align to ground: OFF
Emits Light: ON
Static: ON
Cast Shadow: ON

Do the effect from the Effects Toolbox and you will see it working.

You don't need to worry about the X,Y,Z thing as you did in FSX. The higher the altitude of the effect above the ground, the bigger the spot effect will be. There is a height limitation. Above a 1000ft (I think), the effect does not work anymore. (obvious!)

You can angle the light, but I just used the lazy approach by placing the effect 5-10m in front of my lights. That give the impression that the light is at an angle.

Save your effect under a different name and enjoy your new HDR lights!

:-D
Hi NMG,

Thanks for the suggestion. My question is, does the Avalon_fx_Apron_light.fx file in the P3Dv4 Effects Folder available in all P3D v4? I search it, but couldn't find it in my P3D V4 effect folder.

Thanks,
Manochvarma Raman
 
#17
This is what I did. I hope this helps.

First load the Special Effect Toolbox in P3Dv4. Believe me, this makes it much easier. You can use the settings below in your DLL.XML file. The path is the path to where the SDK is installed on my system and should be changed to match yours.

<Launch.Addon>
<Name>Special Effects Tool</Name>
<Disabled>False</Disabled>
<Path>d:\FLTSIM\P3D4\SDK\Modeling\Special Effects\Visual FX Tool\visualfxtool.dll</Path>
</Launch.Addon>

Run P3Dv4 and check if the Special Effects Toolbox shows under Tools. If it does, then you have done everything right. If not, check the path to visualfxtool.dll.

Ok, LM has made it very easy this time, but they did not had over the keys to the kingdom on a silver plate! You will still need to edit! With the Special Effect Toolbox, search for the Avalon_fx_Apron_light.fx file in the P3Dv4 Effects Folder. Don't try to edit this file manually; it will not work. Once you have the file open, look towards the bottom of the Effects Toolbox options. There are three options that you will need to be aware of.
Align to ground: OFF
Emits Light: ON
Static: ON
Cast Shadow: ON

Do the effect from the Effects Toolbox and you will see it working.

You don't need to worry about the X,Y,Z thing as you did in FSX. The higher the altitude of the effect above the ground, the bigger the spot effect will be. There is a height limitation. Above a 1000ft (I think), the effect does not work anymore. (obvious!)

You can angle the light, but I just used the lazy approach by placing the effect 5-10m in front of my lights. That give the impression that the light is at an angle.

Save your effect under a different name and enjoy your new HDR lights!

:-D
Curious about the purpose of cast shadow parameter. Have you been able to get dynamic lights to cast shadows by any chance?
 
#18
[QUOTE
First load the Special Effect Toolbox in P3Dv4. Believe me, this makes it much easier. You can use the settings below in your DLL.XML file. The path is the path to where the SDK is installed on my system and should be changed to match yours.

<Launch.Addon>
<Name>Special Effects Tool</Name>
<Disabled>False</Disabled>
<Path>d:\FLTSIM\P3D4\SDK\Modeling\Special Effects\Visual FX Tool\visualfxtool.dll</Path>
</Launch.Addon>

Run P3Dv4 and check if the Special Effects Toolbox shows under Tools. If it does, then you have done everything right. If not, check the path to visualfxtool.dll.

Ok, LM has made it very easy this time, but they did not had over the keys to the kingdom on a silver plate! You will still need to edit! With the Special Effect Toolbox, search for the Avalon_fx_Apron_light.fx file in the P3Dv4 Effects Folder. Don't try to edit this file manually; it will not work. Once you have the file open, look towards the bottom of the Effects Toolbox options. There are three options that you will need to be aware of.
Align to ground: OFF
Emits Light: ON
Static: ON
Cast Shadow: ON

Do the effect from the Effects Toolbox and you will see it working.

You don't need to worry about the X,Y,Z thing as you did in FSX. The higher the altitude of the effect above the ground, the bigger the spot effect will be. There is a height limitation. Above a 1000ft (I think), the effect does not work anymore. (obvious!)

You can angle the light, but I just used the lazy approach by placing the effect 5-10m in front of my lights. That give the impression that the light is at an angle.

Save your effect under a different name and enjoy your new HDR lights!
][/QUOTE]
Once you have created your effect how did you insert it in the sim and secondly can you place these effects in scenery created before p3dv4
 
#19
hi guys! does anybody know of any nice light pole libraries that are freeware? i had a set and i lost all my data on one drive, and i cant find the link that i once found in google.. can you guys help me? thanks a lot!!
 
Top