Board index FlightGear Development Aircraft Cockpit development

Emission animation: setting values .

Discussion about creating 2d and 3d cockpits.

Emission animation: setting values .

Postby yanes » Wed Sep 05, 2018 12:03 am

Hi guys ,
I'm trying to bind the su-27sk HUD brightness to it's correspondent cockpit knob ,
this animation works :
Code: Select all
  <animation>
  <type>material</type>
  <object-name>hudglass</object-name>
  <emission>
   <red>0.9</red>
   <green>0.9</green>
   <blue>0.9</blue>
  </emission>
 </animation>


but since the knob animation requires props to adjust I did this second one below which for some reason doesn't give the right color combination ,
doesn't report errors in the console but looks like it outputs "0" .
am I missing something or it just that this animation requires values and not props ?
Code: Select all
  <animation>
  <type>material</type>
  <object-name>hudglass</object-name>
  <emission>
   <red><property>su-27/instrumentation/HUD/brightness</property></red>
   <green><property>su-27/instrumentation/HUD/brightness</property></green>
   <blue><property>su-27/instrumentation/HUD/brightness</property></blue>
  </emission>
 </animation>


Have a nice day , and thanks in advance .
Yanes.
User avatar
yanes
 
Posts: 129
Joined: Tue Sep 02, 2014 1:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: Emission animation: setting values .

Postby Thorsten » Wed Sep 05, 2018 5:44 am

I suspect you're generally better off adjusting HUD brightness via the surface alpha channel - it's projected light after all (if you completely dim the HUD, you don't have black lines on the glass, you see through the glass. If you have a canvas HUD, you can conveniently do it from within canvas - and also run the HUD shader over it which makes it look like light.

But if you want to stay with your original scheme, according to the Wiki the syntax is

Code: Select all
  <emission>
   <red>1.0</red>
   <green>0.2</green>
   <blue>0.0</blue>
   <factor-prop>controls/lighting/panel-norm</factor-prop>
  </emission>


so it'seither values and a factor or you have to append -prop to the tag (not insert <property> as you have done.

(Syntax isn't overly consistent across effects, animations and particle systems...)
Thorsten
 
Posts: 11087
Joined: Mon Nov 02, 2009 8:33 am


Return to Cockpit development

Who is online

Users browsing this forum: No registered users and 1 guest