Improving (MP) model load times

24 Nov 2018 14:52 #41024 by Richard
I've just posted onto the dev-list about the new DDS texture cache (DTC) that I've been working on for 2018.4.

The short version is that (when enabled) the DTC will cache textures during background loading in a separate thread and the result is almost no frame 'pauses' (i.e. where FG just stops). On my system this is a massive improvement when flying as all too often I get a frame pause at exactly the wrong time.

Most of the frame pauses are directly related to the size of the texture being loaded either in the scenery or the MP craft; all of the formats that don't have mipmaps (jpg, png, rgb) will cause OSG to generate mipmaps when the texture is about to be rendered (which is why it stop rendering).

The other thing that FGUK should probably do is to set the /sim/model/fallback-model-index to a value - I've been working slowly on adding low polygon fallback models. Most of the FGUK models are very suited to being directly converted into a low poly model; again this is subjective but generally anything with an .ac and textures less than a few MB is fine.

Fallback (low detail) models are neat because when done right they will load almost instantly and this vastly improves the MP experience. Low detail models require some 3d work, and generally shouldn't contain Nasal and/or too many texture files or animations.

I've also got a suspicion that there are some FG crashes that are caused by models that have load errors and/or Nasal errors - model load errors (for the other players in MP) are something that should really be fixed.
The following user(s) said Thank You: Algernon, enrogue, timi

Please Log in or Create an account to join the conversation.

24 Nov 2018 15:03 #41025 by thebroons

I've also got a suspicion that there are some FG crashes that are caused by models that have load errors and/or Nasal errors - model load errors (for the other players in MP) are something that should really be fixed.


Too right. unfortunately, this seems to be most prevalent in the bus driver community, with a couple of notable military exceptions (old F16 - not the CJ, old F18, etc.)

G

If you lived with my brain you'd begin eviction proceedings...

Please Log in or Create an account to join the conversation.

24 Nov 2018 23:02 #41033 by enrogue
I saw the post & looked at the vids - very impressive

The only feedback I have is that DDS textures don't seem to work on macOS - something to do with either osg or the drivers (nvidia in my case) - I get black textures when they are set to DDS
The following user(s) said Thank You: Richard

Please Log in or Create an account to join the conversation.

25 Nov 2018 06:00 #41034 by Richard
DDS is just a container format unlike other images (png, jpeg) where there is only one encoding. As such DDS can have compressed images (DXT1/DXT5 and others) or raw (ARGB_8888). There is an option (in the property tree /sim/rendering/texture-cache/compression) to disable image compression - which may work.

DXT1/5 compression saves disk space and texture ram - but the main gain for anyone with a GPU that has more than 0.5gb of texture RAM is the inclusion of mipmaps in DDS.

Please Log in or Create an account to join the conversation.

25 Nov 2018 08:56 #41035 by enrogue
OK, cool

I suspect that macOS supports some types of DDS compression but not others - I just had a look in OpenGL Extensions viewer & it looks as though in compatibility mode it only supports DXT1 & S3TC (at least those are the only extensions that are listed)

I'm going to have a muck around in the water effects textures & see if I can find a format that it loads

Please Log in or Create an account to join the conversation.

25 Nov 2018 17:42 #41042 by enrogue
So some dds textures work in effects

ATI2/3Dc seems to work for normal maps ok

I can't seem to get any codec (DXT1/DXT5/no compression) to work with FG as a texture

DXT1 seems to load fine in Blender & AC3D, but osgviewer won't load it - I get the following error:
Warning: detected OpenGL error 'invalid operation' at After Renderer::compile

Please Log in or Create an account to join the conversation.

29 Nov 2018 18:17 #41074 by Richard
@enrouge Remind me what platform / GPU / drivers you are using.

Suggest using Compressonator ( github.com/GPUOpen-Tools/Compressonator ) to produce textures of differing formats and compile a list of what is supported - if it is a case of allowing texture format selection I can probably fairly easily add this to the property tree.

I've got some WIP that aims to exclude transparent textures loaded from an effect; but ideally I'd like to refine this so we can include or exclude textures from the .eff

Also there is possibly some work to do with normalmaps that I haven't figured out yet.

Please Log in or Create an account to join the conversation.

29 Nov 2018 18:42 #41075 by enrogue
It's an iMac 21" late 2013 with an Nvidia GT750M

I'm running macOS Mojave with the default drivers (the web drivers aren't available for mojave yet). It was the same with High Sierra & the web drivers

Thanks - I'll have a look at compressonator - I've tried using gimp with gimp-dds & imagemagick so far

Please Log in or Create an account to join the conversation.

Time to create page: 0.112 seconds
Powered by Kunena Forum

PM Mailbox

You are not logged in.

Latest updated downloads

Forum Search

Keyword