Board index FlightGear Development Spaceflight

Earthview - an orbital terrain rendering engine [v2.0]

Discussion about development and usage of spacecraft

Re: Earthview - an orbital terrain rendering engine [v2.0]

Postby chris_blues » Tue Mar 30, 2021 4:34 pm

Hi there!

If you mean with CTD a crash of FG, then you quite possibly run out of memory on your graphics card. Loading 6 Textures * 3 layers (Earth, clouds and normalmap) with 16k is quite a bit of memory usage. Have you tried the 8k textures?

Other than that, I think the others are better suited to help, since I haven't been running FG for a few years now.

Good luck and best regards!
chris
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1572
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Earthview - an orbital terrain rendering engine [v2.0]

Postby eatdirt » Tue Mar 30, 2021 7:41 pm

Is there any other tweek that has to be done to use the 16k o the 8k textures other than install and overwrite the prevous files ?


Hi there,
the wiki should give you more explanations, if not already consulted: https://wiki.flightgear.org/Earthview

I share the opinion of Chris. If you have simply overwritten the default png textures with 16k textures for world, clouds and normalmaps, you're just filling the whole RAM and GPU memory. FG gets killed by the kernel for the offence. For 1920x1080 resolution, all textures loaded at once, we talk about 16GB of GPU memory and 32GB of RAM. Rescale these figures up for higher screen resolutions. Of course, you can lower them down by using smaller textures!

Good luck!
Last edited by eatdirt on Tue Mar 30, 2021 8:43 pm, edited 1 time in total.
eatdirt
 
Posts: 846
Joined: Wed Aug 15, 2018 2:06 pm

Re: Earthview - an orbital terrain rendering engine [v2.0]

Postby Hooray » Tue Mar 30, 2021 7:58 pm

FWIW, speaking in general, memory can be freed CPU-side (RAM) after the texture is allocated on the GPU (VRAM) by using OSG's SetUnRefImageDataAfterApply(true) method (in principle at least) - while that isn't compatible with some more advanced multi-threading/multi-GPU modes (and also isn't easily exposed by FlightGear), you can manually set up/invoke the OSG optimizer directly by setting the corresponding environment variables - this can be set up analogous to how some folks have been setting up additional OSG pager threads (again, that will only be of interest to power users probably):

http://www.openscenegraph.org/index.php ... er-options
http://www.openscenegraph.org/index.php ... -osgviewer

OPTIMIZE_TEXTURE_SETTINGS

Sets the following value for all textures setUnRefImageDataAfterApply(true),

which comes down to the apply() function unreferencing the image data. If enabled, and the image data is only referened by this texture, apply() will delete the image data.


PS: This should also work for Canvas-heavy aircraft that don't need to runtime-modify the image after the texture is applied (e.g. livery use-cases) - there is a Canvas specific patch available on the wiki to enable this individually, i.e. per Canvas - rather than sim-wide.
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: 12201
Joined: Tue Mar 25, 2008 8:40 am

Re: Earthview - an orbital terrain rendering engine [v2.0]

Postby Gomendio » Wed Mar 31, 2021 8:13 am

Thanks for the tips.

I'll have to basically install the 4k textures taking into account the unbearable resources required for the 16k ones. Currently running 16Gb of RAM and 6GB 1080Ti card.
Always thought that this rig will be pretty much sufficient to undertake the burden of the SS under FG but I can see it clearly that it is not the case. Pity though.

I was trying some real SIM scenarios during Ascent to simulate the training of the STS-135, GPC failures with reconfig during stage 1, and initially I thought the CTD was something
related with the switchology reconfig with the GPC's, but clearly not. I was a tad too much trigger happy willing to emulate GinGin's earthview pics than I screwed up the thing installing the 16k.

Carelessness I suppose. Anyway, I'll install the 4k textures and open the eartview console to star/run an see what happens.

Thanks Hooray for the tips in re-scaling the textures. I would not go that far. Guess the 4k would do trick.

Happy Easter to all.
Gomendio
 
Posts: 23
Joined: Fri Oct 25, 2019 10:03 am

Re: Earthview - an orbital terrain rendering engine [v2.0]

Postby eatdirt » Wed Mar 31, 2021 8:36 am

I forget to say, but you can also mix the texture sizes. You can take 16k world 8k clouds 8k normals, or 8/4/4 for instance!
eatdirt
 
Posts: 846
Joined: Wed Aug 15, 2018 2:06 pm

Re: Earthview - an orbital terrain rendering engine [v2.0]

Postby Gomendio » Wed Mar 31, 2021 9:12 am

You red my mind eatdirt. I was about to head over the repository to download the 8k clouds and heights and cook a nice hodgepodge of different textures.
I just cranked the sim up and it seems it is working properly again. No CTD. World N1-4 16K with clouds and earth 8K. It seems to hold up nicely.

Fingers crossed¡
Gomendio
 
Posts: 23
Joined: Fri Oct 25, 2019 10:03 am

Re: Earthview - an orbital terrain rendering engine [v2.0]

Postby chris_blues » Thu Apr 01, 2021 3:42 pm

Your 6GB graphics RAM should definitely be enough to load all 8k resolution. Btw, using the dds files also saves a lot of memory.

Happy easter and much fun in orbit!
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1572
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Previous

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 1 guest