Board index FlightGear Development Effects and shaders

Width change to particles  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!

Width change to particles

Postby VicMar » Thu Oct 18, 2012 11:32 am

Hi,

Can anyone tell me how to widen the delivery of particles. I can only cover the delivery area (the width of a ship model) if I use multiple particle sub-models. This is destroying fps, so I want to have 1 sub-model delivering a wider set of particles.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

<PropertyList>

  <particlesystem>
    <name>lifeboat_wake</name>

    <texture>wake.png</texture>
    <emissive>false</emissive>
    <lighting>true</lighting>

    <attach>world</attach>
       
    <align>billboard</align>

    <placer>
      <type>sector</type>
    </placer>

    <counter>
      <particles-per-sec>
        <value>5000</value>
        <spread>500</spread>
      </particles-per-sec>
    </counter>
       
    <particle>
      <start>
        <color>
          <red>
            <value>1.0</value>
          </red>
          <green>
            <value>1.0</value>
          </green>
          <blue>
            <value>1.0</value>
          </blue>
          <alpha>
            <value>0.5</value>
          </alpha>
        </color>
        <size>
          <value>0.1</value>
        </size>
      </start>

      <end>
        <color>
          <red>
            <value>1.0</value>
          </red>
          <green>
            <value>1.0</value>
          </green>
          <blue>
            <value>1.0</value>
          </blue>
          <alpha>
            <value>1.0</value>
          </alpha>
        </color>
        <size>
          <value>0.4</value>
        </size>
      </end>

      <life-sec>
        <value>5.0</value>
      </life-sec>

      <mass-kg>6</mass-kg>
      <radius-m>6</radius-m>
    </particle>
       
    <program>
      <fluid>water</fluid>
      <gravity>false</gravity>
      <wind>false</wind>
    </program>
       
  </particlesystem>

</PropertyList>


I have tried altering the spread to a huge number (500) but that makes no difference.
Any suggestions welcomed.

Cheers,
Vic
Time flies like an arrow
Fruit flies like a banana
User avatar
VicMar
 
Posts: 2044
Joined: Sun Apr 06, 2008 6:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

Re: Width change to particles

Postby Thorsten » Thu Oct 18, 2012 11:46 am

According to the Wiki article, you'll probably want to throw some parameters to the <placer> section of the declaration (not that I'm really an expert for particles...).

Code: Select all
<placer> = where particles are born
   <type>string</type> = can be "sector" (inside a circle), "segments"(user-defined segments) and "point" (default)
   *<radius-min-m>float</radius-min-m> = only for sector, inner radius at which particles appear
   *<radius-max-m>float</radius-max-m> = only for sector, outer radius at which particles appear
   *<phi-min-deg>float</phi-min-deg> = only for sector, starting angle of the slide at which particles appear
   *<phi-max-deg>float</phi-max-deg> = only for sector, ending angle of the slide at which particles appear
   <segments> = only for segments, encloses sequential points that form segments
     <vertex> = specifies one point, put as many as you want
       <x-m>float</x-m>
       <y-m>float</y-m>
       <z-m>float</z-m>
     </vertex>
     ....
     <vertex>
     ...
     </vertex>
   </segments>
 </placer>
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Width change to particles

Postby VicMar » Thu Oct 18, 2012 11:55 am

Hi Thorsten,

Are you suggesting I include:
Code: Select all
*<radius-min-m>float</radius-min-m> = only for sector, inner radius at which particles appear
   *<radius-max-m>float</radius-max-m> = only for sector, outer radius at which particles appear

but with values where it says 'float'?

Vic
Time flies like an arrow
Fruit flies like a banana
User avatar
VicMar
 
Posts: 2044
Joined: Sun Apr 06, 2008 6:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

Re: Width change to particles

Postby Thorsten » Thu Oct 18, 2012 11:58 am

I don't know exactly what you need - probably something like

Code: Select all
<placer>
 <type>"sector"</type>
  <radius-min-m>8.0</radius-min-m>
   <radius-max-m>10.0</radius-max-m>
   <phi-min-deg>150.0</phi-min-deg> = only for sector, starting angle of the slide at which particles appear
   <phi-max-deg>210.0float</phi-max-deg>
</placer>


which should in theory make particle appear in the rear sector (from 150 - 210 deg) of a circular band between 8 and 10 m radius.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Width change to particles

Postby VicMar » Thu Oct 18, 2012 12:02 pm

Thanks Thorsten,

I will give that a try and report back with the result.

Cheers,
Vic
Time flies like an arrow
Fruit flies like a banana
User avatar
VicMar
 
Posts: 2044
Joined: Sun Apr 06, 2008 6:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

Re: Width change to particles

Postby VicMar » Thu Oct 18, 2012 12:45 pm

Hi Thorsten,

Your advice was spot on.

Thanks.

Cheers,
Vic
Time flies like an arrow
Fruit flies like a banana
User avatar
VicMar
 
Posts: 2044
Joined: Sun Apr 06, 2008 6:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

Re: Width change to particles

Postby VicMar » Thu Oct 18, 2012 2:54 pm

Image
This is about the best I can do using just 2 sub-models. It still produces a below-usable fps when your view is over water, so I will not be submitting this model.

I have submitted the lifeboat as a shared item, but it will not be available in the models directories until the next release of objects.

Cheers,
Vic
Time flies like an arrow
Fruit flies like a banana
User avatar
VicMar
 
Posts: 2044
Joined: Sun Apr 06, 2008 6:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

Re: Width change to particles

Postby Neilson » Thu Oct 18, 2012 6:10 pm

I like the lifeboat :)

and big like to Rochester Castile model, good to see a new land mark in my home town in FG :)
User avatar
Neilson
 
Posts: 440
Joined: Fri Sep 02, 2011 9:17 pm
Location: Rochester UK EGTO
Callsign: Neilson
Version: 2017.3.1
OS: Mac

Re: Width change to particles  

Postby Thorsten » Fri Oct 19, 2012 7:34 am

It still produces a below-usable fps when your view is over water, so I will not be submitting this model.


This looks like spraying out a lot of really small particles - it says 5000 per second (!) in your first code snippet. I guess you could get a similar effect by using less but larger particles where the texture of a single particles isn't a filled blob but includes the fine-scale structure. Basically - replace 10 particles by a single texture on which 10 particles are painted, and you'll get similar visuals from high up and 10 times less computational needs.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Width change to particles

Postby VicMar » Fri Oct 19, 2012 7:44 am

replace 10 particles by a single texture on which 10 particles are painted
Thanks Thorsten,

I guess that's what they call 'Thinking outside of the box'.

I'll have a go with a new texture.

Cheers,
Vic
Time flies like an arrow
Fruit flies like a banana
User avatar
VicMar
 
Posts: 2044
Joined: Sun Apr 06, 2008 6:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

Re: Width change to particles

Postby VicMar » Fri Oct 19, 2012 8:05 am

ImageThis is only the first attempt, and I still have a fps of 58.

I made a thicker texture and reduced the particle values from 10,000 to 500. I'm sure I can do even better.

I should have more time to improve later today.

Cheers,
Vic
Time flies like an arrow
Fruit flies like a banana
User avatar
VicMar
 
Posts: 2044
Joined: Sun Apr 06, 2008 6:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

Re: Width change to particles

Postby Thorsten » Fri Oct 19, 2012 8:06 am

I guess that's what they call 'Thinking outside of the box'.


Nah - just an old cloud trick...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Width change to particles

Postby VicMar » Fri Oct 19, 2012 9:46 am

Image
Thanks for sharing your old cloud trick.

This looks good to me. Now I have to work out how to submit all the files.

To achieve the above, I currently have:
4 .xml files
2 .ac files
2 .png files

If I can't think of a way to combine them, I think a chat with Martin is needed.

Thanks again for your help.

@ Neilson,
It was a matter of finding things to model apart from all my lighthouses. If I can find enough photos and obtain the Long/Lat, no structure is out of the question.

Cheers,
Vic
Time flies like an arrow
Fruit flies like a banana
User avatar
VicMar
 
Posts: 2044
Joined: Sun Apr 06, 2008 6:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

Re: Width change to particles

Postby Johan G » Sat Oct 20, 2012 11:05 am

That looks great! :D
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 10 guests