Board index FlightGear Development Effects and shaders

Day/Night Texture Animation and Multiple Instances of Object

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

Day/Night Texture Animation and Multiple Instances of Object

Postby flc972 » Sat Jun 12, 2021 8:39 am

Hi all,

I am working on MDPP Airport (https://bitbucket.org/fableb/flcs-mdpp_ ... rc/master/) and have an issue with changing the texture according to day/night parameter.

I'm using the technique described in https://wiki.flightgear.org/Howto:Illuminate_faces 'Changing texture if illuminated'

When there is one instance of an object everything is fine but for more than one instance of the same object, only one changes the texture correctly.

Concerned objects: 'mdpp_canopy.xml', 'gen_building_10x10.xml'

Tested on
- FG 2020.3.6/2020.3.8
- Opensuse Leap 15.2 and MS Windows 10.

Any insights?

Thanks in advance
flc972
 
Posts: 51
Joined: Sun Dec 20, 2020 11:04 pm
Version: 2020.3.8
OS: Opensuse Leap

Re: Day/Night Texture Animation and Multiple Instances of Ob

Postby flc972 » Mon Jun 14, 2021 8:24 am

I made a test with FG2020.4.0 and there is no issue anymore... Hereafter pictures from FG2020.3.8 and FG2020.4.0
Objects surrounded with the same color are same objects.

FG2020.3.8
Image

FG2020.4.0
Image

Is something broken concerning texture animation in FG2020.3.x?
flc972
 
Posts: 51
Joined: Sun Dec 20, 2020 11:04 pm
Version: 2020.3.8
OS: Opensuse Leap

Re: Day/Night Texture Animation and Multiple Instances of Ob

Postby flc972 » Thu Jun 17, 2021 10:09 am

No answers so far.
If it is not the message thread to ask questions about 'material/texture animation' issues, can someone tell me which is the right one?
Thanks in advance
flc972
 
Posts: 51
Joined: Sun Dec 20, 2020 11:04 pm
Version: 2020.3.8
OS: Opensuse Leap

Re: Day/Night Texture Animation and Multiple Instances of Ob

Postby Fahim Dalvi » Thu Jun 17, 2021 11:27 am

If no one with the required knowledge answers here, you can try to post a message on the flightgear-devel mailing list and that may shed some light.
User avatar
Fahim Dalvi
 
Posts: 1352
Joined: Sun Oct 14, 2007 2:08 pm
Location: Qatar
Callsign: Fahim
Version: 2020.3.11
OS: macOS

Re: Day/Night Texture Animation and Multiple Instances of Ob

Postby flc972 » Thu Jun 17, 2021 11:26 pm

@Fahim Dalvi thanks a lot for your help! I will try this
flc972
 
Posts: 51
Joined: Sun Dec 20, 2020 11:04 pm
Version: 2020.3.8
OS: Opensuse Leap

Re: Day/Night Texture Animation and Multiple Instances of Ob

Postby vnts » Fri Jun 18, 2021 1:28 pm

Can you test with 2020.3.9? Which has been released on the Sourceforge/FG website (link - on Windows, try the web-installer for a smaller download and faster install).

I think there was a fix related to lightmaps, which may (?) be responsible for 2020.4.0 working properly. The fix was back-ported to 2020.3.9 IIRC.
vnts
 
Posts: 409
Joined: Thu Apr 02, 2015 1:29 am

Re: Day/Night Texture Animation and Multiple Instances of Ob

Postby flc972 » Sat Jun 19, 2021 6:18 pm

@vnts thanks a lot, unfortunately it's not fixed on version 2020.3.9
flc972
 
Posts: 51
Joined: Sun Dec 20, 2020 11:04 pm
Version: 2020.3.8
OS: Opensuse Leap

Re: Day/Night Texture Animation and Multiple Instances of Ob

Postby flc972 » Fri Dec 10, 2021 3:40 am

I think I found the discrepancy between FG 2020.3.x and FG 2020.4.0 for day/night textures
when using the same object multiple times in a custom scenery.

In FG 2020.3.x
- with OBJECT_STATIC only one object is correctly textured whether using 2 separate textures for day/night or 1 texture with 'textranslate' to perfor the switch
- with OBJECT_SHARED
* if you use 2 textures, 1 for day and 1 for night => only one object is correctly textured
* if you use 1 texture for day/night with 'textranslate' to perform the switch => all objects are correctly textured.

In FG 2020.4.0 in all cases, all objects are correctly textured.

So, in order to use several times the same object in a scenery for FG 2020.3.x you must:
1. use the tag OBJECT_SHARED (and create a 'Models' folder in your scenery folder to put your shared object)
2. use 1 texture for day/night with 'textranslate'.

Strange and not documented behavior...
flc972
 
Posts: 51
Joined: Sun Dec 20, 2020 11:04 pm
Version: 2020.3.8
OS: Opensuse Leap

Re: Day/Night Texture Animation and Multiple Instances of Ob

Postby wkitty42 » Fri Dec 10, 2021 12:40 pm

perhaps you might create an issue about this on the bug tracker so the devs can see and keep up with it??
"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: 9123
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Day/Night Texture Animation and Multiple Instances of Ob

Postby flc972 » Fri Dec 10, 2021 1:49 pm

A defect is already opened since oct. 25 (https://sourceforge.net/p/flightgear/codetickets/2669/)
and already asked the question on the dev mailing list since sept. 10 (https://sourceforge.net/p/flightgear/ma ... /37348835/)
with no results so far.

I will complete the ticket with the content of my last post...
flc972
 
Posts: 51
Joined: Sun Dec 20, 2020 11:04 pm
Version: 2020.3.8
OS: Opensuse Leap

Re: Day/Night Texture Animation and Multiple Instances of Ob

Postby wkitty42 » Fri Dec 10, 2021 3:51 pm

you might also want to bump the dev mailing list with a link to the issue, too... sometimes things are missed or lost in the deluge of everything else...
"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: 9123
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest