Board index FlightGear Development Aircraft Cockpit development

Hide cockpit at Helicopter view?

Discussion about creating 2d and 3d cockpits.

Hide cockpit at Helicopter view?

Postby Jiawen » Wed Jun 24, 2015 10:36 am

Dear Friends:

How to hide cockpit when in Helicopter view or any outside view of the aircraft? My graphic card is weak, so many aircrafts that don't hide the cockpit when I change to Helicopter view will kill the smoothness...

Thank you very much
Jiawen
 
Posts: 20
Joined: Sun Mar 29, 2015 3:46 pm

Re: Hide cockpit at Helicopter view?

Postby wkitty42 » Wed Jun 24, 2015 4:57 pm

helicopter view is outside and behind the craft... there should be no "cockpit" visible at all... can you post a screen shot of what you are seeing?
"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: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Hide cockpit at Helicopter view?

Postby firefly » Tue Dec 29, 2015 5:28 pm

I think he wants to only load the exterior model for better performance, as far as I know, there is no simple way to do that.
User avatar
firefly
 
Posts: 86
Joined: Thu Jul 24, 2014 3:15 am
Callsign: Firefly
Version: 3+
OS: Windows 10 (it's OK)

Re: Hide cockpit at Helicopter view?

Postby Necolatis » Tue Dec 29, 2015 5:55 pm

Since 3.4 there is a feature for this. Go into view menu and select LOD, there should be a distance for interior view, just set it real low, then it wont even get loaded. But notice the aircraft must be setup to use this.

Otherwise there is the http://wiki.flightgear.org/Howto:Animate_models#Range animation, but again this is something that must be setup inside the aircraft.
"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: Hide cockpit at Helicopter view?

Postby Hooray » Tue Dec 29, 2015 6:00 pm

The right approach to do this sort of thing is using so called "draw-masks" which are supported by OSG:

http://sourceforge.net/p/flightgear/mai ... /29564161/
James Turner wrote:Another goal is to add more node bits (and a GUI dialog to control them) so various categories of objects can be disabled during the update pass. This will mean the direct hit of, say, AI models vs particles vs random trees can be measured. Of course it won't account for resources (memory, textures) burned by such things, but would still help different people identify slowness on their setups.


http://wiki.flightgear.org/Draw_masks
Image

It would be possible to allow dynamic draw masks to be configured "on demand", so that certain XML/model files could be loaded into a corresponding branch of the scenegraph, so that a new draw-mask property shows up in /sim/rendering/draw-masks, e.g. /sim/rendering/draw-masks/cockpit

The model loader would need to be patched to parse such annotations (e.g. XML tags/attributes) so that the corresponding osg::Switch node can be added and a visitor registered to update it based on toggling a property.
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: Hide cockpit at Helicopter view?

Postby Martien van der P. » Tue Dec 29, 2015 6:01 pm

Or use this
Code: Select all
<animation>
 <type>select</type>
  <object-name>cockpit(or cabin depends on aircraft)</object-name>
  <condition>
   <property>sim/current-view/internal</property>
  </condition>
</animation>
User avatar
Martien van der P.
 
Posts: 334
Joined: Fri Dec 14, 2012 5:09 pm
Location: The Netherlands
Callsign: MV-DP
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Hide cockpit at Helicopter view?

Postby Necolatis » Tue Dec 29, 2015 6:21 pm

Every time a select animation hides something, there is a stutter, its not very good for this purpose. If you have many of them you can wait up to 5 second when switching from inside to outside view. I wish that would be fixed though.
"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: Hide cockpit at Helicopter view?

Postby Thorsten » Tue Dec 29, 2015 7:15 pm

Every time you're switching the scene, you need to shuffle stuff in and out of GPU memory (mesh, textures, normals, tangents, binormals, vertex attributes, you name it). If you're well endowed with GPU memory, that's not an issue as stuff can simply be buffered. If you're not, it may require to access normal memory - or even harddisk in extreme cases.

There's really nothing we can 'do' about this - if you don't have the memory to buffer stuff that has been unloaded, you'll have to fetch it from disk every time you see it.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Hide cockpit at Helicopter view?

Postby Gijs » Sun Jan 03, 2016 12:56 pm

To follow up on Necolitas. Aircraft developers should tag their interior models, as explained at http://wiki.flightgear.org/Modelling_guidelines
Search the page for <usage>interior</usage>.
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10


Return to Cockpit development

Who is online

Users browsing this forum: No registered users and 1 guest