Board index FlightGear Development Effects and shaders

Move a procedural light ...

An exciting "new" option in FlightGear, that includes reflections, lightmaps, the particle system etc.. A lot is yet to be discovered/implemented!

Move a procedural light ...

Postby abassign » Wed Aug 09, 2017 10:01 am

I'm trying to use procedural lights in ALS mode, but I do not find a way to move them. For example, the landing gear has two lights, which are integral to the front leg of the landing gear. When the landing gear is closed, I do not have a method to move the procedural lights and thus avoid the effect that you can see in the photo.

Image

Does anyone know how to solve this problem ?

In the part of the code that activates the procedural lights I placed the light position through its relative coordinates (offsets):

Code: Select all
    <model>
        <name>procedural-light-gear-white-left</name>
        <path>Effects/lights/procedural_light_gear_white.xml</path>
        <offsets>
            <x-m> -3.08</x-m>
            <y-m> -0.21 </y-m>
            <z-m> -1.18 </z-m>
        </offsets>
    </model>


The problem solves simply by using the "model" as an object, or by inserting it into the XML code that moves the leg of the landing gear:

Code: Select all
    <!-- Rotate gear frontal door -->
    <animation>
        <type>rotate</type>
        <object-name>GearFrontalDoor</object-name>

        <object-name>procedural-light-gear-white-right</object-name>
        <object-name>procedural-light-gear-white-left</object-name>

        <property>gear/gear/position-norm</property>
        <axis>
            <x1-m>  -3.00240</x1-m>
            <y1-m>  1.0</y1-m>
            <z1-m>  -1.02906</z1-m>
            <x2-m>  -3.00240</x2-m>
            <y2-m>  -1.0</y2-m>
            <z2-m>  -1.0290</z2-m>
        </axis>
        <interpolation>
            <entry><ind>0.0</ind><dep>90</dep></entry>
            <entry><ind>0.25</ind><dep>90</dep></entry>
            <entry><ind>0.50</ind><dep>60</dep></entry>
            <entry><ind>0.75</ind><dep>30</dep></entry>
            <entry><ind>1.0</ind><dep>0</dep></entry>
        </interpolation>
    </animation>


This is the example:

Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 947
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Move a procedural light ...

Postby Thorsten » Wed Aug 09, 2017 11:48 am

The lights are just child models - you use a translate / rotate animation just like for any other child model, there's nothing special about them (except that they're bill-boarded by nature).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Move a procedural light ...

Postby D-ECHO » Thu Aug 10, 2017 10:12 am

abassign, actually I'm pretty sure those lights are going to be off once the nose gear starts moving - what would be the sense to have lights on in the nose gear well?
D-ECHO
 
Posts: 2460
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Move a procedural light ...

Postby abassign » Thu Aug 10, 2017 6:01 pm

D-ECHO wrote in Thu Aug 10, 2017 10:12 am:abassign, actually I'm pretty sure those lights are going to be off once the nose gear starts moving - what would be the sense to have lights on in the nose gear well?


Normally, a microswitch turns off the headlights when the landing gear is returned, but there are cases, for example, in the headlights of search / rescue helicopters, which are manually pointed in different directions than in the flight direction.
What I was interested in was to see if it was possible to change the position of a procedural light for any other uses.

I want to see if other effects are possible, i tray with the expansion effect, but does not work as it only move the procedural light approaching or moving away from the observation point.
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 947
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Move a procedural light ...

Postby Thorsten » Thu Aug 10, 2017 6:10 pm

As I said, the quad is a pretty normal model, and thus pretty much all animations work on it (I have no idea what an expansion effect is though...).

Some don't make sense (like texture animation), and others interfere with the shader (like billboard animation), but they all work.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Move a procedural light ...

Postby wlbragg » Thu Aug 10, 2017 6:12 pm

That particular effect would look great on a spotlight such as you would find on a helicopter for SAR or law enforcement.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 0 guests