The website and forum will be intermittently unavailable while we're making some security updates.
File uploads to the download hangar are also disabled until further notice.

Visibility bug in FSX / P3D

Share hints and tricks or your own modifications for MAIW Packages in Flight Simulator X and Prepar3D.
Post Reply
User avatar
gavinc
MAIW Conversion Team
MAIW Conversion Team
Posts: 556
Joined: 25 Aug 2013, 09:26
Version: FSX

Visibility bug in FSX / P3D

Post by gavinc »

Hi,
I have found what I think is a bug in FSX / P3D. Hopefully someone could either confirm or let me know what I am doing wrong.

It appears that light based visibility conditions (ie things triggered by beacon, nav or cabin lights) don't work in FSX or P3D if the engine type in the aircraft.cfg is set to 0 (piston engine).

The other visibility conditions (props etc) work fine but when I set the engine type to piston all the light based conditions (for chocks, cabin lights etc) don't work and they get triggered at pushback.

Set the engine type to 5 (turboprop) and they work fine but of course now the engine isn't right so the aircraft can't fly.

Can anyone think why this might be.

Gavin
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12111
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: Visibility bug in FSX / P3D

Post by Firebird »

That is not a FSX/P3D bug. That has always been there, it is in FS9 too.

It seems that back in the early days MS wrongly assumed that piston-engined aircraft were old time aircraft and didn't use lights.

What can i say?

Now it could be that I am completely wrong here but this is what I believe to be correct and have done so for years. If I am incorrect then please correct me.
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: Visibility bug in FSX / P3D

Post by John Young »

That's my understanding too.

Something similar that caused me to tear my hair out this week that I didn't know until Steve told me, is that Nav lights (and hence any viz/animation triggers) to work in FS9 single engine turboprop or jet aircraft, the aircraft.cfg and .air files must specify two engines, with half the power on each. I've since confirmed that's true for FSX and P3Dv4 too.

Hats off to the person who found the solution.

John
User avatar
ggeccles
MAIW Conversion Team
MAIW Conversion Team
Posts: 27
Joined: 22 Jul 2008, 04:44

Re: Visibility bug in FSX / P3D

Post by ggeccles »

This post grabbed my attention as I have numerous piston engine aircraft in my AI Traffic package using visibility conditions triggered by various light conditions.

I just did a quick check and am pleased and relieved to say that all appear to be working perfectly on my system. This is in P3D V4. I do not have FSX or earlier versions of P3D so I am unable to comment on those platforms.

Just to confirm, these aircraft have their engine type set to 0 (piston engine) and have visibility condions based on beacon lights.

Graham
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12111
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: Visibility bug in FSX / P3D

Post by Firebird »

Could you give us an example so we can check it out. This is something that has bugged people for years.
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
User avatar
gavinc
MAIW Conversion Team
MAIW Conversion Team
Posts: 556
Joined: 25 Aug 2013, 09:26
Version: FSX

Re: Visibility bug in FSX / P3D

Post by gavinc »

ggeccles wrote: 02 Feb 2019, 08:40 This post grabbed my attention as I have numerous piston engine aircraft in my AI Traffic package using visibility conditions triggered by various light conditions.

I just did a quick check and am pleased and relieved to say that all appear to be working perfectly on my system. This is in P3D V4. I do not have FSX or earlier versions of P3D so I am unable to comment on those platforms.

Just to confirm, these aircraft have their engine type set to 0 (piston engine) and have visibility condions based on beacon lights.

Graham
Graham, Piston engine beacon visibility does appear to work, however change the condition to NAV or CABIN light and the behavior won't change. My personal guess is that the only visibility condition that works with piston engines is "lights on" / "lights off"

Gavin
User avatar
ggeccles
MAIW Conversion Team
MAIW Conversion Team
Posts: 27
Joined: 22 Jul 2008, 04:44

Re: Visibility bug in FSX / P3D

Post by ggeccles »

Just did a check on 6 AI aircraft and all are working fine. The aircraft I checked were three HTAI single engine Cessnas and three ANAI Pipers. these aircraft are all in my FTX AU AI Traffic pack and I am not aware of any issues.

The visibility conditions were for tie down ropes and wheel chocks directly to the model and cabin lights by a lua script.

The Modeldef code is quite standard as follows:-

<PartInfo>
<Name>custom_part_vis_blocks</Name>
<Visibility>
<Parameter>
<Code>
(A:GROUND VELOCITY,knots) 0 !=
(A:LIGHT BEACON,bool) or
if{ 0 } els{ 1 }
</Code>
</Parameter>
</Visibility>
</PartInfo>

The lua script for the cabin lights is as follows:-

local CabinLight = varget("A:LIGHT NAV", "Bool")

if CabinLight > 0 then
TextureName = "Cabin_Lights.DDS"
end

if CabinLight == 0 then
TextureName = "Cabin_Lights_OFF.DDS"
end

varset("T:EmissiveTexture","String",TextureName)

All is working as it should for me.

I have also used NAV lights for visibility conditions on wheel chocks and warning tags but I think these were for larger aircraft with engines other than piston type.

Graham
User avatar
gavinc
MAIW Conversion Team
MAIW Conversion Team
Posts: 556
Joined: 25 Aug 2013, 09:26
Version: FSX

Re: Visibility bug in FSX / P3D

Post by gavinc »

Graham, when you are using the lua script with piston engines do the lights come on a notice-able time before pushback?

Gavin
User avatar
ggeccles
MAIW Conversion Team
MAIW Conversion Team
Posts: 27
Joined: 22 Jul 2008, 04:44

Re: Visibility bug in FSX / P3D

Post by ggeccles »

They come on as soon as the NAV lights come on which is only a couple of seconds before push back for most of my smaller aircraft. Not really noticeable unless you are looking out for it.


Graham
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4206
Joined: 12 Jul 2008, 15:15

Re: Visibility bug in FSX / P3D

Post by John Young »

Nav lights in FSX and P3Dv4 generally trigger the viz condition on non-piston engines 15 minutes before departure, but users must launch the scene 15minutes before to see the trigger active. If launched after that time, the trigger occurs at departure. With FS9 the trigger will be active if launched at any time within the 15 minutes.

John
Post Reply