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 9: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:

abassign
 
Posts: 767
Joined: Mon Feb 27, 2012 5:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2018.3
OS: Linux Mint 19. x

Re: Move a procedural light ...

Postby Thorsten » Wed Aug 09, 2017 10: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: 10587
Joined: Mon Nov 02, 2009 8:33 am

Re: Move a procedural light ...

Postby D-ECHO » Thu Aug 10, 2017 9: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?
User avatar
D-ECHO
 
Posts: 1453
Joined: Sat May 09, 2015 12:31 pm

Re: Move a procedural light ...

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

D-ECHO wrote in Thu Aug 10, 2017 9: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.
abassign
 
Posts: 767
Joined: Mon Feb 27, 2012 5:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2018.3
OS: Linux Mint 19. x

Re: Move a procedural light ...

Postby Thorsten » Thu Aug 10, 2017 5: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: 10587
Joined: Mon Nov 02, 2009 8:33 am

Re: Move a procedural light ...

Postby wlbragg » Thu Aug 10, 2017 5: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(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4622
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest

cron