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 Hooray » Mon May 16, 2016 3:35 pm

unless I am missing something, it may probably work like any other customizable aircraft-specific dialog that provides a UI for aircraft related setting (think fuel, weight & balance, custom autopilot dialogs).

There is a handful of PUI examples - for a procedurally created dialog, I would personally use a tiny Nasal file and show a bunch of Canvas checkboxes for each boolean setting - for other settings however, some widgets may be missing, so that PUI may be a better choice currently.

Equally, any aircraft specific heuristics could be implemented using an aircraft specific callback, that is then invoked - which would probably need to affect a bunch of properties for your effect/shader (?) to pick up the result
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 Thorsten » Mon May 16, 2016 3:46 pm

What do you trigger on, aka how do you know you collided with a bird quad rather than a wall or the ground?

Equally, any aircraft specific heuristics could be implemented using an aircraft specific callback, that is then invoked - which would probably need to affect a bunch of properties for your effect/shader (?) to pick up the result


I know how to make an aircraft talk to a shader - that's easy. But it's a one-way route, there's no talking back. What is on the GPU stays on the GPU. So I could make the birds flee the aircraft, but I can't hand the info back that the aircraft hit a bird.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Birds

Postby Thorsten » Tue May 17, 2016 6:43 am

I've followed Stuart's argument for the time being and set enable-hot to false for all the bird quads - if someone figures out how to specifically detect collision with a bird object and model plane-specific birdstrike, we can always change it back.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Birds

Postby LesterBoffo » Thu May 26, 2016 3:17 am

Back in 2010 I made this video about RCDeskPilot's Scarecrow game. Where your objective is to chase off a flock of Starlings that are eating your grain crops.

Dave the programmer for RCDP, mentioned something about overall coding for the flock's AI behavior was 20 lines of coding. Because this is a DirectX-3D sim I'm not sure what he used for the bird model effects. But the end result is pretty realistic.

User avatar
LesterBoffo
 
Posts: 2171
Joined: Sun Oct 02, 2011 5:02 pm
Location: Oregon, USA
Callsign: LesBof
Version: 2018.3.2
OS: Win10 Pro

Re: Birds

Postby dtlan201 » Thu May 26, 2016 3:42 am

The sky in RCDP looks so realistic
dtlan201
 
Posts: 191
Joined: Sun Sep 29, 2013 4:49 am
Callsign: MIA0774
Version: nightly
OS: Windows 10

Re: Birds

Postby Thorsten » Thu May 26, 2016 6:04 am

The sky in RCDP looks so realistic


I'd venture the guess that it's a photograph on the skydome and you can't actually reach the clouds...

But the end result is pretty realistic.


It boils down to the question again whether FG is supposed to be a bird simulator or not. Imagine some lake region in Africa, tens of thousands of birds in the scene, all running 20 lines of AI code.

It's not that I can't code swarm behavior (it's actually pretty interesting mathematically) - but at the end of the day, it's a small gimmick which the average pilot is unlikely to see for more than an eyeblink - so how much computation cycles do you really want to spend on it? And how many other potentially nice gimmicks are there?

The point of the Scarecrow game seems to chase birds - the point of FG is really not.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Birds

Postby Johan G » Fri May 27, 2016 12:19 am

Thorsten wrote in Mon May 16, 2016 3:46 pm:I know how to make an aircraft talk to a shader - that's easy. But it's a one-way route, there's no talking back. What is on the GPU stays on the GPU. So I could make the birds flee the aircraft, but I can't hand the info back that the aircraft hit a bird.

Thorsten wrote in Tue May 17, 2016 6:43 am:I've followed Stuart's argument for the time being and set enable-hot to false for all the bird quads [...]

I think a good way is to keep them that way and instead use aircraft specific functions to trigger what will become a failure. Those functions in turn could be used to trigger a single bird animation and an accompanying failure for example using the failure manager when it hits. I can not see any other way to make a bird predictably(!) hit specific parts of the aircraft and cause damages and/or failures where it hits.
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

Re: Birds

Postby someguy » Fri May 27, 2016 5:07 am

Are any Mac users seeing birds? Aren't they supposed to work in 2016.2.1?
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 » Fri May 27, 2016 6:13 am

I'm fairly sure you'd realize quickly if you don't see them because the shader doesn't run for you - the geometry carrying them (a stack of 200 m sized white quads) is kind of hard to miss.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Previous

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 6 guests