Board index FlightGear Development Effects and shaders

Change particle parameters on runtime?

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

Change particle parameters on runtime?

Postby diabolus » Sun Jun 07, 2009 4:09 pm

Hi!

Is it possible to change the speed_ms parameters of the particle-system on runtime? I try it on many ways without success.

Code: Select all
  <particlesystem>
    <name>smoke</name>

    <offsets>
      <x-m> 15.5 </x-m>
      <y-m> -6.125 </y-m>
      <z-m> -0.90 </z-m>
      <roll-deg>    0.0 </roll-deg>
      <pitch-deg>   90.0 </pitch-deg>
      <heading-deg> 0.0 </heading-deg>
    </offsets>

    <texture>Textures/smoke.png</texture>

    <emissive type="bool">false</emissive>
    <lighting type="bool">false</lighting>

    <condition>
   <property>/engines/engine/running</property>
    </condition>

    <attach>world</attach>

    <placer>
      <type>point</type>
    </placer>

    <shooter>
      <theta-min-deg>-0.5</theta-min-deg>
      <theta-max-deg>0.5</theta-max-deg>
      <phi-min-deg>-1.0</phi-min-deg>
      <phi-max-deg>1.0</phi-max-deg>
      <speed-mps>
        <value>      <property>/engines/engine/airrelease</property>   </value>
        <spread>   <property>/engines/engine/airrelease</property>   </spread>
      </speed-mps>
      <rotation-speed>
        <x-min-deg-sec>0</x-min-deg-sec>
        <y-min-deg-sec>0</y-min-deg-sec>
        <z-min-deg-sec>0</z-min-deg-sec>
        <x-max-deg-sec>0</x-max-deg-sec>
        <y-max-deg-sec>0</y-max-deg-sec>
        <z-max-deg-sec>0</z-max-deg-sec>
      </rotation-speed>
    </shooter>

    <counter>
      <particles-per-sec>
        <value>25</value>
        <spread>2.5</spread>
      </particles-per-sec>
    </counter>

    <align>billboard</align>

    <particle>
      <start>
        <color>
          <red><value>   0.2 </value></red>
          <green><value> 0.2 </value></green>
          <blue><value>  0.2 </value></blue>
          <alpha><value> 0.2 </value></alpha>
        </color>
        <size>
          <value>0.3</value>
        </size>
      </start>
       
      <end>
        <color>
          <red><value>   0.0 </value></red>
          <green><value> 0.0 </value></green>
          <blue><value>  0.0 </value></blue>
          <alpha><value> 0.0 </value></alpha>
        </color>
        <size>
          <value>5.0</value>
        </size>
      </end>
       
      <life-sec>
        <value>50</value>
      </life-sec>
       
      <mass-kg>10.1</mass-kg>
      <radius-m>5</radius-m>
    </particle>
     
    <program>
      <fluid>               air  </fluid>
      <gravity type="bool"> true </gravity>
      <wind typ="bool">     true </wind>
    </program>
     
  </particlesystem>


Thats my code. I hope someone know the way it goes...
Callsign: SB-DIA
Airports: EDDR, KXTA
Aircraft: Concorde, Draken, XB-70, Diaboline F1, Diaboline F2
Hangar: http://diaboline.th-home.com

http://www.kipperei.de
diabolus
 
Posts: 119
Joined: Wed Oct 01, 2008 4:03 pm
Location: Saarbrücken
Callsign: SB-DIA
Version: GIT
OS: Gentoo Linux x86

Re: Change particle parameters on runtime?

Postby Torsten » Sun Jun 07, 2009 6:54 pm

This should work...
Code: Select all
   
<speed-mps>
        <property>/engines/engine/airrelease</property>
        <factor>1.0</factor>
        <offset-m>1</offset-m>
        <spread>0</spread>
        <min-m>1</min-m>
        <max-m>20</max-m>
/speed-mps>
flightgear.org - where development happens.
User avatar
Torsten
 
Posts: 637
Joined: Fri Feb 01, 2008 9:22 pm
Location: near Hamburg, Germany
Callsign: offline
Version: next
OS: Linux

Re: Change particle parameters on runtime?

Postby Gijs » Sun Jun 07, 2009 8:26 pm

Don't forget the last < ;)

Code: Select all
</speed-mps>
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9365
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Change particle parameters on runtime?

Postby diabolus » Sun Jun 07, 2009 9:47 pm

^^ I dont forgot it ^^

It works fine. It looks realy nice ^^. I will build an Concorce NX and upload it. Its a nice feeling to flight an Concorde with NK-321 engines with 55000 lbf thrust and it looks good with particles behind the engines ^^
Callsign: SB-DIA
Airports: EDDR, KXTA
Aircraft: Concorde, Draken, XB-70, Diaboline F1, Diaboline F2
Hangar: http://diaboline.th-home.com

http://www.kipperei.de
diabolus
 
Posts: 119
Joined: Wed Oct 01, 2008 4:03 pm
Location: Saarbrücken
Callsign: SB-DIA
Version: GIT
OS: Gentoo Linux x86

Re: Change particle parameters on runtime?

Postby diabolus » Thu Jun 11, 2009 9:26 pm

If anyone want to have a look of the particles here is the link...

http://www.youtube.com/watch?v=mxHZRbHUEU8
Callsign: SB-DIA
Airports: EDDR, KXTA
Aircraft: Concorde, Draken, XB-70, Diaboline F1, Diaboline F2
Hangar: http://diaboline.th-home.com

http://www.kipperei.de
diabolus
 
Posts: 119
Joined: Wed Oct 01, 2008 4:03 pm
Location: Saarbrücken
Callsign: SB-DIA
Version: GIT
OS: Gentoo Linux x86


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest