Board index FlightGear Development Canvas

Some paths disappear with weather?

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Some paths disappear with weather?

Postby nepcia » Sat Mar 16, 2019 4:43 pm

Hi,
I've come across a very strange behavior of some canvas paths recently. Basically it looks like "dynamic" paths (the ones that use .reset() and change shapes from frame to frame) may disappear when the weather is changed. My test code is very simple, it creates 2 paths. One is dynamic and will use .reset() to change its shape, the other is static (moveTo and lineTo are called only once) and the rotation will be done by rotating a group that this path is on. https://pastebin.com/69awQWnX. The code can be pasted directly into nasal console in the debug menu.

Image

Initially both paths are fine. Then I change the weather to for example CAT IIIb and poof - the first path is gone.

Image

Then I change the weather back to CAT I and poof - path is back again. From what I have checked: the placement doesn't matter (window vs texture on an instrument), the plane also does not (787-8 vs ufo), same for renderer (ALS vs no ALS) and shader quality options as well. I've discovered this quite some time ago (at least first release of 2018) but didn't have much time to do research until now. In the mean time the FG upgraded a few times as well as my OS and I have changed GPU (nvidia->amd) so this probably isn't driver/gpu related. The path exists in the property tree all the time, it correctly updates draw commands and its visibility does not change.

I think this might be a bug in canvas but wanted to ask if I'm not missing something.
Cheers,
nepcia
nepcia
 
Posts: 10
Joined: Sat May 13, 2017 5:27 pm

Re: Some paths disappear with weather?

Postby Thorsten » Sat Mar 16, 2019 7:35 pm

Well, visibility is pretty low in CAT-III, so naturally things disappear.

(Sorry, could not resist... but seriously - does it matter whether you select CAT-III or any other weather? )
Thorsten
 
Posts: 11086
Joined: Mon Nov 02, 2009 8:33 am

Re: Some paths disappear with weather?

Postby nepcia » Sat Mar 16, 2019 8:07 pm

haha ;) I played with weather a little after your comment and it looks like the problem occurs when the visibility (set through METAR in weather menu) drops below 0130 m. At 130 is fine, at 129 the path is gone. It's worth noting that during transition (ex. from 150 to 100) the path is visible up until it visually hits that 130.
nepcia
 
Posts: 10
Joined: Sat May 13, 2017 5:27 pm

Re: Some paths disappear with weather?

Postby Thorsten » Sat Mar 16, 2019 9:18 pm

Seems like the path gets a z-depth, and FG culls the scene fairly agressively for low z-depth, so it happens to be out of the view frustrum then.

Can you try assigning a z-depth in canvas (there ought to be an option) and see whether this does anything?
Thorsten
 
Posts: 11086
Joined: Mon Nov 02, 2009 8:33 am

Re: Some paths disappear with weather?

Postby nepcia » Sun Mar 17, 2019 8:25 pm

Unfortunately I couldn't find any way to change path z-depth. The only similar option is a z-index used to order canvas elements between each other (despite that I've tested it and it doesn't have any influence on the matter). Also if it was in fact z-depth, my guess would be that the second path would disappear as well (and possibly other canvas elements on the plane's instruments too).
nepcia
 
Posts: 10
Joined: Sat May 13, 2017 5:27 pm

Re: Some paths disappear with weather?

Postby Octal450 » Mon Mar 18, 2019 2:23 pm

I have the same issue on my Canvas. It's only paths that do this.

Kind Regards,
Josh
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm


Return to Canvas

Who is online

Users browsing this forum: No registered users and 0 guests

cron