Board index FlightGear Development Effects and shaders

Application of effects

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

Application of effects

Postby amue » Thu Apr 30, 2020 7:17 am

From the effect framework wiki (http://wiki.flightgear.org/Effect_Framework) in the Application section I read:
Note that effects cannot be applied to groups, the objects must be specified explicit.

Is this correct? In $FGDATA/Docs/README.effects that limitation is missing.
I assume "groups" means groups in the object hierarchy, i.e. a group is an object that has children ("sub" objects). For testing I applied an effect to a group (an object that has child objects) and it seems to work. The sub objects were also displayed by the effect applied to the parent. So, as far as I can see, effects can be applied to groups. Or do I miss something?
amue
 
Posts: 51
Joined: Tue Apr 03, 2018 9:13 am

Re: Application of effects

Postby Necolatis » Thu Apr 30, 2020 9:52 am

I have never gotten an effect to work on a group. Unlike animations I always had to explicit mention each object.

and it seems to work


Can you show me where and what you did? So I can replicate it.
And what version and OS of Flightgear?
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2108
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Application of effects

Postby WoodSTokk » Thu Apr 30, 2020 9:59 am

Maybe there is a difference between object group inside the ac file and animation group inside the xml file.
WoodSTokk
 
Posts: 548
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2020.3.0
OS: Debian Buster

Re: Application of effects

Postby Necolatis » Thu Apr 30, 2020 10:00 am

Good point, when I wrote that page I meant groups inside AC file. Not sure about groups made in xml.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2108
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Application of effects

Postby wlbragg » Thu Apr 30, 2020 5:42 pm

These are all the assigned effects in the c172p
Code: Select all
    <!-- exterior effects -->
    <!-- Normal shader effect. Separate effects required for each normal map and dirt texture -->
    <effect>
        <inherits-from>Effects/exterior/dirt-leading-edge</inherits-from>
        <object-name>wing_leading_edge_left</object-name>
        <object-name>wing_leading_edge_right</object-name>
        <object-name>wing_leading_edge_center</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/exterior/dirt-wing</inherits-from>
        <object-name>flaps</object-name>
        <object-name>leftaileron</object-name>
        <object-name>rightaileron</object-name>
        <object-name>wing_left</object-name>
        <object-name>wing_center</object-name>
        <object-name>wing_right</object-name>
        <object-name>PitotTube</object-name>
        <object-name>courtesyoff</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/exterior/dirt-fuselage</inherits-from>
        <object-name>NoseWheelStrut</object-name>
        <object-name>LeftWheelStrut</object-name>
        <object-name>RightWheelStrut</object-name>
        <object-name>baggagedoorexterior</object-name>
        <object-name>baggagedoorhandle</object-name>
        <object-name>charniere1</object-name>
        <object-name>charniere2</object-name>
        <object-name>charniere3</object-name>
        <object-name>charniere4</object-name>
        <object-name>fairing1</object-name>
        <object-name>fairing2</object-name>
        <object-name>fairing3</object-name>
        <object-name>fuselage</object-name>
        <object-name>fuselage_cowling</object-name>
        <object-name>fuselage_cowling_top</object-name>
        <object-name>leftdoor</object-name>
        <object-name>leftdoorhandle</object-name>
        <object-name>rightdoor</object-name>
        <object-name>rightdoorhandle</object-name>
        <object-name>Spinner</object-name>
        <object-name>Propeller</object-name>
        <object-name>PropellerCowlPlugs</object-name>
        <object-name>NoseWheel</object-name>
        <object-name>LeftWheel</object-name>
        <object-name>RightWheel</object-name>
        <object-name>LeftWheelBrake</object-name>
        <object-name>RightWheelBrake</object-name>
        <object-name>radi_box</object-name>
        <object-name>TieDownTail</object-name>
        <object-name>TieDownRight</object-name>
        <object-name>TieDownLeft</object-name>
        <object-name>TransponderAntenna</object-name>
        <object-name>MarkerAntenna</object-name>
        <object-name>Antenna_ADF</object-name>
        <object-name>Antenna_VOR</object-name>
        <object-name>VHFAntenna</object-name>
        <object-name>ELTAntenna</object-name>
        <object-name>BeaconMount</object-name>
        <object-name>Beacon</object-name>
        <object-name>Exhaust</object-name>
        <object-name>Axle</object-name>
        <object-name>ruddercableleft</object-name>
        <object-name>ruddercableright</object-name>
        <object-name>ruddercableports</object-name>
        <object-name>ruddercablelefthinge</object-name>
        <object-name>ruddercablerighthinge</object-name>
        <object-name>windowframeleftext</object-name>
        <object-name>windowframerightext</object-name>
        <object-name>oildoor</object-name>
        <object-name>vent</object-name>
        <object-name>handle</object-name>
        <object-name>airvent</object-name>
        <object-name>LeftNavLight</object-name>
        <object-name>RightNavLight</object-name>
        <object-name>fuelvent</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/exterior/bumpspec</inherits-from>
        <object-name>oilcompartment</object-name>
        <object-name>OilCap</object-name>
        <object-name>wing_0</object-name>
        <object-name>wing_1Ledge</object-name>
        <object-name>wing_1Redge</object-name>
        <object-name>FuelCapPort</object-name>
        <object-name>FuelCapStarboard</object-name>
        <object-name>fuelportstarport</object-name>
        <object-name>fuelportstarboard</object-name>
        <object-name>fuelcompartment</object-name>
        <object-name>lighttaxi</object-name>
        <object-name>lightlanding</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/exterior/dirt-tail</inherits-from>
        <object-name>elevatorleft</object-name>
        <object-name>elevatorright</object-name>
        <object-name>elevatortrim</object-name>
        <object-name>hstab</object-name>
        <object-name>rudder_1</object-name>
        <object-name>vstab</object-name>
        <object-name>RearNavLight</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/model-transparent</inherits-from>
        <object-name>strobe1</object-name>
        <object-name>strobe2</object-name>
        <object-name>BeaconOffX</object-name>
        <object-name>BeaconOff</object-name>
        <object-name>Propeller.Fast</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/exterior/exterior-glass-reflection</inherits-from>
        <object-name>glas</object-name>
        <object-name>leftwindow</object-name>
        <object-name>rightwindow</object-name>
        <object-name>landinglightcover</object-name>
    </effect>

    <!-- interior effects -->
    <effect>
        <inherits-from>Aircraft/c172p/Models/Effects/interior/lm-interior-panel-parts-radiance</inherits-from>
        <object-name>TrimWheel</object-name>
        <object-name>AvionicsSwitch</object-name>
        <object-name>radio-light-knob</object-name>
        <object-name>panel-light-knob</object-name>
        <object-name>gloveboxlock</object-name>
    </effect>
    <effect>
        <inherits-from>Aircraft/c172p/Models/Effects/interior/lm-interior-panel-parts</inherits-from>
        <object-name>Panel_0</object-name>
        <object-name>ElevatorTrimPos</object-name>
        <object-name>mike_mount</object-name>
        <object-name>CabinAirMounts</object-name>
        <object-name>CabinAir</object-name>
        <object-name>CabinHeat</object-name>
        <object-name>BeaconSwitch</object-name>
        <object-name>CarbHeat</object-name>
        <object-name>CarbHeatMount</object-name>
        <object-name>GenSwitch</object-name>
        <object-name>LandingLightSwitch</object-name>
        <object-name>MasterSwitch</object-name>
        <object-name>Mixture</object-name>
        <object-name>MixtureMount</object-name>
        <object-name>NavLightSwitch</object-name>
        <object-name>PitotHeatSwitch</object-name>
        <object-name>PrimerLeverMount</object-name>
        <object-name>StrobeSwitch</object-name>
        <object-name>TaxiLightSwitch</object-name>
        <object-name>Throttle</object-name>
        <object-name>ThrottleMount</object-name>
        <object-name>mike</object-name>
        <object-name>mike_chord</object-name>
        <object-name>ParkingBrake</object-name>
        <object-name>PrimerLever</object-name>
        <object-name>LeftBag</object-name>
        <object-name>bolts</object-name>
        <object-name>accport</object-name>
        <object-name>autopilot_breaker</object-name>
        <object-name>radio5_breaker</object-name>
        <object-name>radio4_breaker</object-name>
        <object-name>radio3_breaker</object-name>
        <object-name>radio2_breaker</object-name>
        <object-name>radio1_breaker</object-name>
        <object-name>turn-coordinator_breaker</object-name>
        <object-name>strobe_breaker</object-name>
        <object-name>bcnlt_breaker</object-name>
        <object-name>landing_breaker</object-name>
        <object-name>navlt_breaker</object-name>
        <object-name>intlt_breaker</object-name>
        <object-name>instr_breaker</object-name>
        <object-name>pitot-heat_breaker</object-name>
        <object-name>master_breaker</object-name>
        <object-name>flaps_breaker</object-name>
        <object-name>BreakersBase</object-name>
        <object-name>AvionicsSwitchBase</object-name>
        <object-name>windlocket_right</object-name>
        <object-name>windlocket_left</object-name>
        <object-name>windlocketbak_right</object-name>
        <object-name>windlocketbak_left</object-name>
        <object-name>doorhandleint_right</object-name>
        <object-name>doorhandleint_left</object-name>
        <object-name>CeilingSpeaker</object-name>
        <object-name>DomeSliderWhite</object-name>
        <object-name>DomeSwitchWhite</object-name>
        <object-name>DomeSwitchRed</object-name>
        <object-name>light-knob-base</object-name>
        <object-name>AltStaticAir</object-name>
        <object-name>LowVoltageLed</object-name>
        <object-name>LowVoltageLedBase</object-name>
    </effect>
    <effect>
        <inherits-from>Aircraft/c172p/Models/Effects/interior/lm-interior-panel</inherits-from>
        <object-name>panel_1_gauges</object-name>
        <object-name>Pedestal</object-name>
        <object-name>InstrumentCover</object-name>
        <object-name>panel_1_1.inf</object-name>
        <object-name>panel_1_1_right</object-name>
        <object-name>gloveboxdoor</object-name>
        <object-name>glovebox</object-name>
        <object-name>gloveboxfull</object-name>
        <object-name>RudderTrimBase</object-name>
        <object-name>RudderTrimKnob</object-name>
    </effect>
    <effect>
        <inherits-from>Aircraft/c172p/Models/Effects/interior/lm-interior-fuel-selector</inherits-from>
        <object-name>FuelSelectorFace</object-name>
        <object-name>FuelSelectorLeft</object-name>
        <object-name>FuelSelectorRight</object-name>
        <object-name>FuelSelectorBoth</object-name>
        <object-name>FuelSelectorOff</object-name>
    </effect>
    <effect>
        <inherits-from>Aircraft/c172p/Models/Effects/interior/lm-interior</inherits-from>
        <object-name>carpet</object-name>
        <object-name>chassis</object-name>
        <object-name>backseat_left</object-name>
        <object-name>pilotseat_left</object-name>
        <object-name>pilotseat_right</object-name>
        <object-name>doorint_right</object-name>
        <object-name>doorint_left</object-name>
        <object-name>windowframeleftint</object-name>
        <object-name>windowframerightint</object-name>
        <object-name>Firewall</object-name>
        <object-name>baggagedoorinterior</object-name>
        <object-name>AirVent_left</object-name>
        <object-name>AirVent_right</object-name>
        <object-name>wing_1L</object-name>
        <object-name>wing_1R</object-name>
        <object-name>visorleft</object-name>
        <object-name>visorright</object-name>
        <object-name>visorrodleft</object-name>
        <object-name>visorrodright</object-name>
        <object-name>visorbaseleft</object-name>
        <object-name>visorbaseright</object-name>
        <object-name>doorintstrapleft</object-name>
        <object-name>doorintstrapright</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/interior/c172p-interior</inherits-from>
        <object-name>wing_1C</object-name>
        <object-name>SeatMounts.0</object-name>
        <object-name>SeatMounts.1</object-name>
        <object-name>SeatMounts.2</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/interior/interior-glass-reflection-panel-front</inherits-from>
        <object-name>glass_panel</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/interior/c172p-interior-glass-reflection-front</inherits-from>
        <object-name>glas_interior</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/interior/c172p-interior-glass-front-sides</inherits-from>
        <object-name>glas_front_interior_sides</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/interior/c172p-interior-glass-window-left</inherits-from>
        <object-name>leftwindow_interior</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/interior/c172p-interior-glass-window-right</inherits-from>
        <object-name>rightwindow_interior</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/interior/c172p-interior-glass-back-sides</inherits-from>
        <object-name>glas_interior_sides</object-name>
    </effect>
    <effect>
        <inherits-from>Effects/interior/c172p-interior-glass-back</inherits-from>
        <object-name>glas_interior_back</object-name>
    </effect>


I think a group in this context would be something like this...
Code: Select all
    <!-- Interior -->
    <animation>
        <name>interior-group</name>
        <object-name>carpet</object-name>
        <object-name>chassis</object-name>
        <object-name>backseat_left</object-name>
        <object-name>pilotseat_left</object-name>
        <object-name>pilotseat_right</object-name>
        <object-name>doorint_right</object-name>
        <object-name>doorint_left</object-name>
        <object-name>windowframeleftint</object-name>
        <object-name>windowframerightint</object-name>
        <object-name>Firewall</object-name>
        <object-name>baggagedoorinterior</object-name>
        <object-name>AirVent_left</object-name>
        <object-name>AirVent_right</object-name>
        <object-name>wing_1L</object-name>
        <object-name>wing_1R</object-name>
        <object-name>visorleft</object-name>
        <object-name>visorright</object-name>
        <object-name>visorrodleft</object-name>
        <object-name>visorrodright</object-name>
        <object-name>visorbaseleft</object-name>
        <object-name>visorbaseright</object-name>
        <object-name>doorintstrapleft</object-name>
        <object-name>doorintstrapright</object-name>
    </animation>
    <effect>
        <inherits-from>Aircraft/c172p/Models/Effects/interior/lm-interior</inherits-from>
        <name>interior-group</name>
    </effect>

I've never tried it but logically it has no value as you can only assign one effect to any given object so there is no need to group them as you actually use 4 extra lines of code to assign the effect to the group VS to the list in the first place.
So you end up with the above VS below
Code: Select all
    <effect>
        <inherits-from>Aircraft/c172p/Models/Effects/interior/lm-interior</inherits-from>
        <object-name>carpet</object-name>
        <object-name>chassis</object-name>
        <object-name>backseat_left</object-name>
        <object-name>pilotseat_left</object-name>
        <object-name>pilotseat_right</object-name>
        <object-name>doorint_right</object-name>
        <object-name>doorint_left</object-name>
        <object-name>windowframeleftint</object-name>
        <object-name>windowframerightint</object-name>
        <object-name>Firewall</object-name>
        <object-name>baggagedoorinterior</object-name>
        <object-name>AirVent_left</object-name>
        <object-name>AirVent_right</object-name>
        <object-name>wing_1L</object-name>
        <object-name>wing_1R</object-name>
        <object-name>visorleft</object-name>
        <object-name>visorright</object-name>
        <object-name>visorrodleft</object-name>
        <object-name>visorrodright</object-name>
        <object-name>visorbaseleft</object-name>
        <object-name>visorbaseright</object-name>
        <object-name>doorintstrapleft</object-name>
        <object-name>doorintstrapright</object-name>
    </effect>
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5607
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Application of effects

Postby WoodSTokk » Thu Apr 30, 2020 10:33 pm

wlbragg wrote in Thu Apr 30, 2020 5:42 pm:I think a group in this context would be something like this...

Exactly that i mean with xml group.

But you can also build up groups in Blender.
Add a 'Empty' object in Blender (its called 'Empty' because it has no vertieces and no mesh).
Drop some mesh objects into the 'Empty'.
As example you can create a empty object and name it 'wing_leading_edge'.
Now drop wing_leading_edge_left, wing_leading_edge_center and wing_leading_edge_right into wing_leading_edge.
As result you have a group inside the ac file.
You can apply your effect on wing_leading_edge and all 3 objects will show the effect.

Thats a good practice for animations. Think about a gear where the rotation animation is a list of damper, strut, wheel, rod, door, light, etc...
With ac groups, you need only 'gear.left' or 'gear.right'.
WoodSTokk
 
Posts: 548
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2020.3.0
OS: Debian Buster

Re: Application of effects

Postby Necolatis » Thu Apr 30, 2020 11:19 pm

I just did experiment with .ac groups, and I was clearly wrong or it has changed over the years. Effects can be applied on .ac groups.

I will update the wiki page, if it hasn't been already.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2108
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Application of effects

Postby WoodSTokk » Thu Apr 30, 2020 11:45 pm

Necolatis wrote in Thu Apr 30, 2020 11:19 pm:I just did experiment with .ac groups, and I was clearly wrong or it has changed over the years. Effects can be applied on .ac groups.

I will update the wiki page, if it hasn't been already.


Hmm, i have also checked now and it looks if i can only apply <animation> on ac-groups, but not <effect>.
(tested with the landing light an the Citation II)

Will test with xml groups ...

EDIT:
Also xml groups doesn't work with <effect>.
I have FG 2019.2.0 (compiled for some weeks)
Last edited by WoodSTokk on Fri May 01, 2020 12:02 am, edited 1 time in total.
WoodSTokk
 
Posts: 548
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2020.3.0
OS: Debian Buster

Re: Application of effects

Postby Necolatis » Fri May 01, 2020 12:00 am

When you test make sure there is no other effect already on any of the objects inside the ac group.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2108
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Application of effects

Postby WoodSTokk » Fri May 01, 2020 12:07 am

Ah, okay. The landing light has 4 objects. The 'inside' has normaly a chrome effect (for the reflector) and the glass has a glass effect.
So, normally i have two objects in the group with different effects applied.
Will test only one effect applied on the parent object.

EDIT:
You are right. If there is no other effects on a child object, an effect can be applied on a ac group.
This doesn't work with xml group, only ac group.
Be careful: also a material animation break the group effect.
The bulb and reflector of the landing light has normally a material effect to shine if the light is turned on.
This avoid the group effect to apply on the reflector.
So the developer must be absolutely sure, that there is nothing applied on a child object.
WoodSTokk
 
Posts: 548
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2020.3.0
OS: Debian Buster

Re: Application of effects

Postby amue » Fri May 01, 2020 8:08 pm

Thanks for testing and clarifying this issue!
amue
 
Posts: 51
Joined: Tue Apr 03, 2018 9:13 am


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest