Board index FlightGear Development Scenery

Scenery webtools (adding, editing, deleting objects&models).

Questions and discussion about enhancing and populating the FlightGear world.

Re: Scenery webtools (adding, editing, deleting objects&mode

Postby VicMar » Sun Jan 27, 2013 11:10 am

Hi Radi,

Having discussed your suggestion with the members of the scenery models data base maintenance team, I can tell you there were a few methods considered for sharing textures between models.

I won't bore you with all the details, but the main stumbling block is that however/wherever the texture is located each model that uses it will call it up separately.

That means each model is a separate object. There is no way for this to be changed and as such, there is no process or time saving.

To make a major change to FG processing/coding, there has to be an advantage in making the change. Having the texture in the same folder/directory as its model (as they are now) is the shortest possible path.

However, please don't be put off making suggestions. Someone has to have each new idea, so why not one of yours?

Cheers,
Vic
Time flies like an arrow
Fruit flies like a banana
User avatar
VicMar
 
Posts: 2044
Joined: Sun Apr 06, 2008 6:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

Re: Scenery webtools (adding, editing, deleting objects&mode

Postby i4dnf » Sun Jan 27, 2013 11:47 am

It saves gpu memory, due to the texture being cached. (having 10 models use the same shared texture is way better than 10 models having the same texture(but with 10 different names, because someone arbitrarily decided so) which uses 10x as much memory).

Fg knows how to deal with shared/cached textures already, it's only a problem with the submission form, which IMHO tries to do too much for it's own good.

These little things tend to add up to huge numbers if we're not careful with them.
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 8:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: Scenery webtools (adding, editing, deleting objects&mode

Postby Gijs » Sun Jan 27, 2013 2:37 pm

The issue is not with the forms themselves, but with the way the database currently functions (and it is mostly for good reasons that it functions that way). Accepting shared textures is pretty trivial to implement form-wise, but the database and included logics need quite some work.

Currently each model is stored as a "package", including everything related to that model (xml, png, ac). The models don't know anything about their brothers and sisters. Every model is basically on its own. If we were to support shared textures, we'd need to treat every single file seperately in the database and come up with solution for potential issues (eg. what to do when a model+texture are updated? The updater should check all other models using that texture, to see if they still match. What to do when a model is re-positioned in such a way that it ends up on a different tile (and scenery directory)?). All that is certainly do-able in the long term, but at this moment we simply don't have the manpower to re-arrange the database and rewrite all related scripts.

Even when we add models manually, we cannot accept shared textures, because there are so many issues that we cannot deal with yet. The fact that shared textures were accepted in the past already led to some issues. The number of issues would only increase now that we've more people adding more models.

i4dnf wrote:having 10 models use the same shared texture is way better than 10 models having the same texture

Not according to what Martin concluded from some lengthy discussions with Mathias. I don't know who's right here.
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

Re: Scenery webtools (adding, editing, deleting objects&mode

Postby i4dnf » Sun Jan 27, 2013 7:37 pm

Well I can tell you that gdebugger never showed me the same shared texture twice.
Of course having shared textures doesn't fix performance problems, since the "new" object needs to be setup and sent as a different vertex-batch to the GPU .
This is one of the reasons why all objects sharing a texture should be merged into a single mesh, if possible; exceptions should be only those that need to be animated.
Having lots of "small" objects is very bad, and we currently draw less than 20% of the vertices with more than 60% of the vertex-batches, and worse still, 9% of vertices with 42% of vertex batches.
Image
But this is another discussion...
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 8:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: Scenery webtools (adding, editing, deleting objects&mode

Postby Hooray » Sun Jan 27, 2013 8:38 pm

i4dnf wrote in Sun Jan 27, 2013 7:37 pm:Having lots of "small" objects is very bad, and we currently draw less than 20% of the vertices with more than 60% of the vertex-batches, and worse still, 9% of vertices with 42% of vertex batches.
Image
But this is another discussion...


That seems like a good find, I'd suggest to file that as a feature request (or even bug report) using the issue tracker, so that some of our rendering experts like Fred, Tim or Mathias can have a look what the underlying C++ code FG/SG is doing exactly and if that can be further optimized.
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: Scenery webtools (adding, editing, deleting objects&mode

Postby ckruetze » Sun Jan 27, 2013 8:39 pm

Just an idea here, but how about including the shared texture with each model and just saving it to the same physical path on the local file system.

That way the database is happy, 10 models 10 textures. i4dnf is happy 10 models only 1 texture in the GPU memory.
The only downside would be the texture would actually be downloaded 10 times from the database, but that shouldn't be too big of a problem.
ckruetze
 
Posts: 33
Joined: Sat Jun 11, 2011 1:06 pm

Re: Scenery webtools (adding, editing, deleting objects&mode

Postby Gijs » Sun Jan 27, 2013 9:03 pm

@ckruetze: We've looked at that possibility, but it does not fix the issues. Having multiple files with the same name is bad anyway. We've already had some weird looking models because someone added a different version of an already existing texture ;-)
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

Re: Scenery webtools (adding, editing, deleting objects&mode

Postby i4dnf » Sun Jan 27, 2013 9:18 pm

@Hooray: This isn't unknown to people dealing with the rendering part, and there's only so much that can be done in code. (filing a bug/feature-request won't help with anything but cluttering the bug-tracker).
To solve this requires action from the modelers. e.g.: having individual 3d instruments is bad, best practice would be to merge them all into one object for each cockpit. Having individual parts for a building, just because it's easier to model it that way is again bad, and everything should be merged into one mesh, using one texture. (unless of course there are animated parts), and if that texture happens to be shared that's even better... Transparent windows for buildings it's useless in 99.99% of cases, and it's a huge slowdown, so they should be done opaque and textured instead etc.
But we're getting way off-topic here...
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 8:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: Scenery webtools (adding, editing, deleting objects&mode

Postby Hooray » Sun Jan 27, 2013 10:19 pm

Using separate 3D models is obviously good and more maintainable in the long run.
And regarding runtime optimization of 3D models, this is something that OSG does have support for - i.e. combining meshes and doing other sensible optimizations.

So, I'm not sure if we should really teach base package contributors all the intrinsics here, or if it shouldn't scale better to add an optimizer pass to the underlying C++ code before passing things onto the renderer.
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: Scenery webtools (adding, editing, deleting objects&mode

Postby radi » Mon Jan 28, 2013 12:52 pm

Are scenery DB and the final scenery path (which gets rsync'd to the user) distinct? I.e., does the DB store all object.ac and object.png internally, and then the scenery path is updated from the DB?

If so, one could stick to the "no shared textures" policy in the DB part, and still find and fix duplicate textures in the scenery path (on server side). Would involve (per-tile) computing and comparing hashes for all texture files, then fixing object.ac. Seems sufficiently straightforward to me using some bash or python, and I'd be happy to code it.
OSM buildings for LOWI, EDDC
Custom scenery for VHXX YMML
Edit .stg via the FG Object Placement Tool
radi
 
Posts: 659
Joined: Mon Aug 25, 2008 5:24 pm
Location: YMML, EDDC

Re: Scenery webtools (adding, editing, deleting objects&mode

Postby Kcid » Sun May 19, 2013 7:09 pm

Hi all,

Just started to build some 3d models for scenery today. I've build 2 hangars for KSFO so far. I've submitted them to the scenemodels database, but I'm not sure if I've set all the parameters right. Could somebody check this for me please? It would be a shame if I build and add lots of models and they aren't shown because I've submitted them wrong.

I'll add a link to a screenshot I've made with the command screen including the long/lat/elevation etc. from flightgear and also how I've typed everything in the scenemodels submission form. Could somebody tell me if I submitted the right way or that I have to set some parameters different? Many thanks.

Image
Kcid
 
Posts: 40
Joined: Wed Oct 10, 2007 9:16 am
Location: Netherlands

Re: Scenery webtools (adding, editing, deleting objects&mode

Postby f-ojac » Sun May 19, 2013 10:19 pm

Hi,
Yes, they were submitted, see here: http://scenemodels.flightgear.org/
If they are specific to KSFO, they should be static, if not you were right to send them as shared. However, I would recommend you to add a more specific name to your models, as hangar4 or 5 is not very descriptive.
Also, please send your first, last name and email via a PM so I can add you as an author.
Note that .xml files are not necessary if they are just there so set the LOD. Parsing .xml files seems to lower the performance.
f-ojac
 
Posts: 1304
Joined: Fri Mar 07, 2008 10:50 am
Version: GIT
OS: GNU/Linux

Re: Scenery webtools (adding, editing, deleting objects&mode

Postby Johan G » Tue Jul 09, 2013 3:54 pm

The scenery web site (http://scenemodels.flightgear.org/) have been inaccessible today. My web browser only returns an error message about being unable to connect to the web server. I have tried several times from about 12:00 UTC up to now (about 15:00 UTC).
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: Scenery webtools (adding, editing, deleting objects&mode

Postby Gijs » Tue Jul 09, 2013 3:58 pm

Martin wrote:our "mapserver" and "scenemodels" server is currently down becuase it didn't recover after a reboot. I'm waiting for someone having local console access to help and I suspect that'll take a day or two.

So don't worry, just need some patience ;-)
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

Re: Scenery webtools (adding, editing, deleting objects&mode

Postby VicMar » Tue Jul 09, 2013 4:01 pm

Hi Johan,

I know Martin is aware of this problem. I think he has to get a response from the server maintainers to get it fixed.

Hopefully it will be fixed soon.

Vic
Time flies like an arrow
Fruit flies like a banana
User avatar
VicMar
 
Posts: 2044
Joined: Sun Apr 06, 2008 6:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: No registered users and 7 guests