Board index FlightGear Development Effects and shaders

Birds

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

Re: Birds

Postby wkitty42 » Thu May 05, 2016 5:15 am

hahahahahaha! the ufo doesn't crash, though ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9161
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: Birds

Postby Thorsten » Thu May 05, 2016 5:47 am

i'm still looking for my first siting of the birds... are there any notable triggers?


Technically the bird swarms are quads put into the scenery by the random objects code, which are then textured using a shader effect.

So, to see birds, you technically need to:

* have a recent FG with a working random objects code (there was a bugfix just a few days ago, even a week-old binary will not work)
* have random objects on
* run ALS
* fly in a region where they are defined

(Just south-west of Barcelona airport at the river delta is a good place - but it's of course the whole landclass).

They're low - some 100-200 m above ground. They're difficult to spot against bright background, but in the morning hours usually appear bright against the dark ocean. And they're small - so you need to get close to resolve them as birds, from the distance they look like dancing sparks or so.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Birds

Postby someguy » Thu May 05, 2016 2:38 pm

Thorsten wrote in Thu May 05, 2016 5:47 am:So, to see birds, you technically need to:

* have a recent FG with a working random objects code (there was a bugfix just a few days ago, even a week-old binary will not work)


Ah. I guess I'll have to wait until the Mac nightly build issue is resolved.
User avatar
someguy
 
Posts: 1650
Joined: Tue Nov 25, 2008 6:54 am
Location: USA
Version: 2019.1.1
OS: Mac OS X 10.11.6

Re: Birds

Postby wkitty42 » Thu May 05, 2016 8:14 pm

they must be skittish of my UFO but i'll keep trying ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9161
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: Birds

Postby wlbragg » Wed May 11, 2016 7:11 pm

The dawn/dusk picture makes those birds look a lot like Geese. Any chance we might see a line or two of Geese show up in the future?

Image

canadiangeese1
canadiangeese2
canadiangeese4
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Birds

Postby someguy » Wed May 11, 2016 8:09 pm

"Canadian geese?" Are those the really polite ones that go "Honk, eh?" :)
User avatar
someguy
 
Posts: 1650
Joined: Tue Nov 25, 2008 6:54 am
Location: USA
Version: 2019.1.1
OS: Mac OS X 10.11.6

Re: Birds

Postby Thorsten » Thu May 12, 2016 7:45 am

Yes and no - in theory you need to change the noise function against something that prefers a v-shape, which won't play nice with the perpetual motion illusion automatically... (the v may become broken at times) so it's not trivial to do this. I can point you at the right bits of the code if you want to give it a try.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Birds

Postby wlbragg » Thu May 12, 2016 4:36 pm

Sure, I'll look at it!
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Birds

Postby Thorsten » Thu May 12, 2016 5:48 pm

If you look into birds-ALS.frag, there's this couple of lines

Code: Select all
float domain_size = 0.05;
float r = length(vertex);

float domain_noise = VoronoiNoise2D(lookup_coords, domain_size, 0.0, 0.0);
domain_noise = domain_noise * (1.0- smoothstep(0.5, 1.0, r));

if (domain_noise < 0.9) {discard;}


They determine whether a cell (that's why we call Voronoi-noise) is empty or bird-filled - if empty we discard the pixel, if bird-filled we use a bird texture vignette (chosen by a technique similar to the trees from a texture strip). Currently the random pattern gets modified by

Code: Select all
(1.0- smoothstep(0.5, 1.0, r))


which makes it fade out at the edges. The key is to rig this piece of code such that it fills cells in a v-shape. I have no good idea offhand what would work best for this - whether to simply tabulate it, or use closest distance of cell center to two lines, or something else. But that's the idea to get the V-shape.

As for geese colors, the effect takes two colors as input and uses the black-white on the bird texture to assign them, so there's limited control even without changing textures.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Birds

Postby J Maverick 16 » Thu May 12, 2016 6:09 pm

Someone will come up with a shotgun pretending to be a birdwatcher :lol:
Anyway, really nice addition Thorsten!
Cheers, Mav
Breakin' the sound barrier every day!

Scenery designer, basic livery maker, aircraft developer (KC-137R, F-16, A330, C-32J, MH-60)
Flying with Thrustmaster FCS Flight Pack + MFD Cougar
Aviation media on IG at: @j_maverick16.aviation
User avatar
J Maverick 16
 
Posts: 911
Joined: Sat Feb 01, 2014 7:26 pm
Location: Northern Italy
Callsign: J-Mav16
Version: 2020.3.19
OS: macOS

Re: Birds

Postby someguy » Fri May 13, 2016 5:42 am

J Maverick 16 wrote in Thu May 12, 2016 6:09 pm:Someone will come up with a shotgun pretending to be a birdwatcher


Bombable geese, just what we need. ;)
User avatar
someguy
 
Posts: 1650
Joined: Tue Nov 25, 2008 6:54 am
Location: USA
Version: 2019.1.1
OS: Mac OS X 10.11.6

Re: Birds

Postby Johan G » Sat May 14, 2016 9:20 pm

Hmm, those specific land classes could be of interest for aircraft developers. ;)
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: 6634
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

Re: Birds

Postby VicMar » Sun May 15, 2016 8:53 am

Nothing like the epic Thorsten is working on, but I've been having SeaGulls flying around seaside objects like Lighthouses for a long time.

As I said, my effort is a simple .xml job, but maybe someone could extrapolate from that without too much usage expense.

Example: https://scenery.flightgear.org/app.php? ... ew&id=4803

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: Birds

Postby Hooray » Sun May 15, 2016 2:37 pm

those are actual models, right ?
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Birds

Postby VicMar » Sun May 15, 2016 3:28 pm

Yes, it's like a cascade.
The sub-models point to the .xml for the place where they are put,
Those .exmls point to sets of SeaGull models which are held with them in the data/Models/Fauna folder (or TerraSync/Models/Fauna).

I set them up like that to facilitate the different frequencies of wing beats and heights and distances. The 'Origin' .xmls dictate the height of the placement.

If anyone wants all the files just ask and I'll make them a download on my Weebly web site.
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

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 2 guests