Board index FlightGear Development Effects and shaders

Using own MP properties in Effects

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

Using own MP properties in Effects

Postby Necolatis » Tue Jan 03, 2017 1:56 am

Hello,

It seems we cannot use relative paths in effects the same way we can in animations, submodels and particles.

For example from a ALS thruster effect:

Code: Select all
<thrust_density type="float"><use>sim/multiplay/generic/float[9]</use></thrust_density>


Since there is no "/" in front of the property we would normally expect it to be relative from the MP property path for example to become:

ai/models/multiplayer[3]/sim/multiplay/generic/float[9]

Is there a workaround for this, or any chance this can be changed? (or is it just me that cannot get it to work?)

That would be very useful for ALS thrusters, ALS procedural lights and more, when viewing the aircraft over MP.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2238
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: Using own MP properties in Effects

Postby Thorsten » Tue Jan 03, 2017 8:15 am

I'm not sure about anything MP in general, but my first suspicion if something works in animations but not in effects is that it ends up being a tied property and hence isn't picked up by the effect system (which relies on listeners firing).

In that case, it can be un-tied by passing it through a property rule with a gain of 1 and using the output of that - so if the strategy works otherwise for gear animation etc, I'd try that next.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Using own MP properties in Effects

Postby Necolatis » Tue Jan 03, 2017 10:19 pm

Thank you for the reply. I have no clue what a tied property is though.

Okay, the problem is then that only a certain amount of properties is sent over MP. If they all is tied, whatever that mean, then I would not know how to solve it.

Any way to detect is a property is tied?
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2238
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: Using own MP properties in Effects

Postby AndersG » Tue Jan 03, 2017 10:49 pm

IIRC the property browser can show tiedness (but not by default - the toggle is shift+click on the '.' entry or something similar?).

Another give away is to observe the property as it changes in the property browser - for untied properties the property browser uses a listener so the value updates immediately/smoothly while a tied property is refreshed X times a second (where X is rather small).

I think all MP properties are tied (by the MP data replay interpolators).
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2527
Joined: Wed Nov 29, 2006 10:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Using own MP properties in Effects

Postby Thorsten » Wed Jan 04, 2017 8:00 am

Any way to detect is a property is tied?


You can use it to update animations and see its value change, but it never ever has an effect on the effect system (pun intended) - that's my criterion.

Don't waste much time trying to find out whether it's really tied, pass it through something like

Code: Select all
 <filter>
   <type>gain</type>
   <gain>1.0</gain>
   <input>/fdm/jsbsim/systems/various/tied-property</input>
   <output>/fdm/jsbsim/systems/various/untied-property</output>
 </filter>


and pass the output to the effect, see what happens.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Using own MP properties in Effects

Postby Necolatis » Thu Jan 05, 2017 2:10 am

Thank you, will try something like that.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2238
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 3 guests