Board index FlightGear Development Effects and shaders

Particle system: no texture used?  Topic is solved

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

Particle system: no texture used?

Postby benih » Sun Sep 09, 2018 9:08 pm

Hello,
i'm currently fiddling around with creating some smoke.
Where in the past i was able to achieve a smoke using the smoke.png texture, what i get now is only a (correctly colored, ie dark-greyish) box withoput texture.
The texture file is there, in fact i just did a copy of an already working example (same plane, same codestate) and tuned sizes and shooter etc.

What is wrong here?
Code: Select all
<particlesystem>
      <name>exhaust-smoke-right</name>
      <texture>smoke.png</texture>
      <emissive>false</emissive>
      <lighting>false</lighting>

      <offsets>
            <x-m>0.5</x-m>
            <y-m>0.3100</y-m>
            <z-m>-0.5300</z-m>
      </offsets>

      <condition>
         <and>
                <equals>
                    <property>/engines/engine[0]/running</property>
                    <value>1</value>
                </equals>
                <!-- Currently we just use the "after start virtual tank" to generate smoke
                     for a brief period after engine start. This should be changed to a real
                     Air-to-Fuel-Ratio setting: i think too-rich mixture will always generate
                     smoke because of incomplete combustion (as is the case shortly after startup) -->
               
                <greater-than-equals>
                    <property>/fdm/jsbsim/propulsion/tank[6]/pct-full</property>
                    <value>0.45</value>
                </greater-than-equals>
         </and>
      </condition>

      <attach>world</attach>

      <placer>
         <type>point</type>
        </placer>
       
        <shooter>
            <theta-min-deg>120</theta-min-deg>
            <theta-max-deg>140</theta-max-deg>
            <phi-min-deg>-0.5</phi-min-deg>
            <phi-max-deg>1.5</phi-max-deg>
            <speed-mps>
                <value>5</value>
                <spread>0.5</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>50</value>
                <spread>5</spread>
         </particles-per-sec>
      </counter>

      <align>billboard</align>

      <particle>
         <start>
            <color>
               <red>
                  <value>0.15</value>
               </red>
               <green>
                  <value>0.15</value>
               </green>
               <blue>
                  <value>0.15</value>
               </blue>
               <alpha>
                  <value>0.5</value>
               </alpha>
            </color>
            <size>
               <value>0.05</value>
            </size>
         </start>
         <end>
            <color>
               <red>
                  <value>0.15</value>
               </red>
               <green>
                  <value>0.15</value>
               </green>
               <blue>
                  <value>0.15</value>
               </blue>
               <alpha>
                  <value>0.020</value>
               </alpha>
            </color>
            <size>
               <value>0.15</value>
            </size>
         </end>
         <life-sec>
            <value>1</value>
         </life-sec>
         <mass-kg>0.00015</mass-kg>
         <radius-m>0.0125</radius-m>
      </particle>
       

      <program>
         <fluid>air</fluid>
         <gravity>false</gravity>
         <wind>true</wind>
      </program>

   </particlesystem>
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Particle system: no texture used?

Postby Thorsten » Mon Sep 10, 2018 6:20 am

Smoke texture placed in the right directory? That's about the only thing that can go wrong here...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Particle system: no texture used?

Postby benih » Mon Sep 10, 2018 7:22 am

Yes, another effect (in the same xml) did work.
Wlbragg told me at github, he tried to remove all but my codebit and call it explicitely and this seemed to work. I will try that soon and report back.
If you are curious, here is the commit in question: https://github.com/HHS81/c182s/commit/e ... b2aa147fa1
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Particle system: no texture used?  

Postby benih » Mon Sep 10, 2018 3:47 pm

Solved, wlbragg was right.
It seems only one effect is allowed per definition file.
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Particle system: no texture used?

Postby Necolatis » Mon Sep 10, 2018 4:21 pm

I use up till 4 particle effects in same file, its not a problem. Issue must be something else.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: Particle system: no texture used?

Postby benih » Mon Sep 10, 2018 6:13 pm

Well, splitting it into seperate files solved it for me.
Can you show a working example?
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Particle system: no texture used?

Postby wlbragg » Mon Sep 10, 2018 6:28 pm

I think you actually had two of the three working correctly. The new one, engine mixture I think it was, may have been spoiling the results. Even the two that were working correctly, left/right exhaust were using the same calling xml position. So unless the individual shooters inside the effect definition xml were shooting in two locations it still wouldn't be right.
Remember, the Model/XX.xml in your case is positioning the origination of the effect, what is inside the effect definition file, (3) effects in your case, all will start with that foundation.

I didn't mean to imply you can only have one particle effect defined in a file, you just need to beware that if one is broken or not adjusted correctly it can appear as they all are.
I was simply isolating one to see if it worked alone.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Particle system: no texture used?

Postby benih » Mon Sep 10, 2018 8:10 pm

Ah thanks!
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 2 guests