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 [v0.1]

Postby chris_blues » Wed Nov 09, 2016 6:03 pm

No problem converting the png's into rgb's. At least I hope so! :)
I'm not sure I know, how to benchmark the loading times. I could do it with a clock in my hands and compare the loading times. If that's all, what it takes. Not sure if other factors are important...

I'll prepare some rgb's and maybe we both can benchmark them. Maybe that'll even the measurement errors a bit. :mrgreen:
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian testing 64bit - Athlon II 2x2.6GHz - 8GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1533
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian 8 64

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby Thorsten » Fri Nov 11, 2016 5:49 pm

I could do it with a clock in my hands and compare the loading times.


There are considerably more fancy ways, but that's how I usually do it, yes.

Anyway - I *think* I have finally found a way to make FG load only what textures we really need that doesn't produce artifacts elsewhere, so then it's down to the bare loading time (which is, as always, best for dds - and I suspect second best for rgb).

Now there's two more issues I need to fix and then I can make a test version available. I won't push this yet because I needed to fiddle in so many places, I don't trust this without independent tests...
Thorsten
 
Posts: 11123
Joined: Mon Nov 02, 2009 8:33 am

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby chris_blues » Fri Nov 11, 2016 11:45 pm

Just to be sure: I should make rgb's out of the normalmaps - or do you want rgb's out off all images concerning EarthView?
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian testing 64bit - Athlon II 2x2.6GHz - 8GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1533
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian 8 64

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby Thorsten » Sat Nov 12, 2016 6:30 am

I believe based on a test I made years ago with cloud textures that rgb always loads faster than png. To my knowledge both formats are loss-less, so the textures in-sim ought to be the same. If rgb turns out to give a good advantage in loading time, then it would be worth converting all textures - terrain, clouds and normal (and perhaps arguing a case why we should be allowed to ship rgb on the project repo as exception to the png policy), if there's no good advantage then we wouldn't do anything.
Thorsten
 
Posts: 11123
Joined: Mon Nov 02, 2009 8:33 am

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby Catalanoic » Sat Nov 12, 2016 8:38 am

Then, why scenemodels is PNG over RGB preferred?
User avatar
Catalanoic
 
Posts: 1055
Joined: Mon Mar 05, 2012 12:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby Thorsten » Sat Nov 12, 2016 9:43 am

Disc space - png takes ~half and scenemodels don't have 8k textures to deal with, so loading times aren't an issue (if they are, textures are waaay too large).
Thorsten
 
Posts: 11123
Joined: Mon Nov 02, 2009 8:33 am

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby chris_blues » Sat Nov 12, 2016 10:27 am

Ok, I'll give it a try, converting everything to (a)rgb and then check the loading times. I don't know, when I'll come around to that - hopefully monday or so...
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian testing 64bit - Athlon II 2x2.6GHz - 8GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1533
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian 8 64

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby chris_blues » Mon Nov 14, 2016 2:05 pm

Well, this didn't work as planned! :?

FG doesn't seem to like rgba files. It crashes as soon as I activate EV with the rgba textures. :evil:

Here's the data I gathered benchmarking png and dds files:

PNG:
Loading time 80secs
GRAM utilization: 692MB

DDS:
Loading time: 55secs
GRAM utilization: 692MB

Edit: Additionally, these RGBAs are huge! 1GB each at 8k resolution!!! :shock:
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian testing 64bit - Athlon II 2x2.6GHz - 8GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1533
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian 8 64

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby Thorsten » Mon Nov 14, 2016 2:42 pm

Edit: Additionally, these RGBAs are huge! 1GB each at 8k resolution!!


What???? I have the 8k world_N1.rgb with 65 MB (compared with 38 MB for the png). Something is not right here...

For dds, the crucial thing is that they're compressed and that mipmaps are pre-generated (note - dds isn't equal dds...) for this to do anything - I remember there's a host of options in the gimp plugin (and I frequently forget which ones I used).
Thorsten
 
Posts: 11123
Joined: Mon Nov 02, 2009 8:33 am

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby chris_blues » Mon Nov 14, 2016 2:51 pm

Ah I see. Just tried with GIMP and it offered 2 options for compression. Now I have to find the same option in imagemagick...
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian testing 64bit - Athlon II 2x2.6GHz - 8GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1533
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian 8 64

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby chris_blues » Mon Nov 14, 2016 3:23 pm

Ok, got them down to 256MB with RLE compression. GIMP offers an aggressive RLE also, but it also says that it's kind of incompatible...
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian testing 64bit - Athlon II 2x2.6GHz - 8GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1533
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian 8 64

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby Richard » Mon Nov 14, 2016 6:20 pm

chris_blues wrote in Mon Nov 14, 2016 3:23 pm:GIMP offers an aggressive RLE also, but it also says that it's kind of incompatible...


I think the agressive RLE works fine with OSG.
Richard
 
Posts: 716
Joined: Sun Nov 02, 2014 10:17 pm
Version: Git
OS: Win10

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby erik » Mon Nov 14, 2016 10:14 pm

Indeed. It even worked on SGI machines in contrast to what Gimp states.

Erik
erik
 
Posts: 1520
Joined: Thu Nov 01, 2007 1:41 pm

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

Postby Thorsten » Tue Nov 15, 2016 10:46 am

Here's a link to the package for alpha-testing (there's so much trickery involved, I don't really dare to push this yet...)

* package extracts in $FGRoot and contains revised effects, shaders, nasal file, GUI and model definitions for the individual segments.

* modify your preferences,xml Earthview section to

Code: Select all
  <earthview>
    <cloudsphere-flag type="bool" userarchive="y">true</cloudsphere-flag>
    <cloud-shadow-flag type="bool" userarchive="y">true</cloud-shadow-flag>
    <overlay-texture-flag type="bool" userarchive="y">true</overlay-texture-flag>
    <mrd-flag type="bool" userarchive="y">true</mrd-flag>
    <cloudsphere-angle type="double" userarchive="n">0.0</cloudsphere-angle>
    <show-n1 type="bool" userarchive="n">true</show-n1>
    <show-n2 type="bool" userarchive="n">true</show-n2>
    <show-n3 type="bool" userarchive="n">true</show-n3>
    <show-n4 type="bool" userarchive="n">true</show-n4>
    <show-s1 type="bool" userarchive="n">true</show-s1>
    <show-s2 type="bool" userarchive="n">true</show-s2>
    <show-s3 type="bool" userarchive="n">true</show-s3>
    <show-s4 type="bool" userarchive="n">true</show-s4>
    <show-dummy type="bool" userarchive="n">false</show-dummy>
    <normalmapping type="bool" userarchive="y">false</normalmapping>
  </earthview>


(I don't want to supply a file overwriting your preferences with mine)

* normal map go into Models/Astro/Textures/ with the other, the expected names are normalmap_earth_XY.png - you *must* supply some normal maps - get them from Chris or FGAddon

This should fix a couple of things:

1) textures are only loaded when actually seen (because now surfaces are only loaded when seen) - memory and startup-time friendly
2) Dawn zone of the planet is better modeled
3) Clouds appear volumetric when cloud shadows are generated
4) Optional normal mapping is available
5) The skydome got some cosmetics blurring the upper edge of the atmosphere close to the actual skydome edge]
6) improved horizon computation fixes some no-show tiles at high altitude

This

Image

is as far as I got out (some 4000 km altitude) before numerics started to eat away the atmosphere.

Low altitude skies look okay to me, so I don't think this messes anything up badly, but please keep an eye open! This really is an alpha version, I won't vouch for anything except that it seems to run okay for me. But I need feedback now...
Thorsten
 
Posts: 11123
Joined: Mon Nov 02, 2009 8:33 am

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

Postby Hooray » Tue Nov 15, 2016 8:05 pm

https://sourceforge.net/p/flightgear/ma ... /35493007/
Thorsten wrote:there is no property pointing to the path, and we can't do
texture animation to introduce a property because that triggers some bug
that screws the visuals [...]the
only way we could do this is make several versions of the mesh and request
different mesh to be loaded dependent on a property.

Referring to the comments in the archives regarding dynamical switching of the texture set, I am not familiar with EarthView or the bugs you mentioned, but depending on what you have in mind, it may be as simple as using Canvas placements for the sphere (UV-mapped)

(disclaimer: I am not saying that this is a good idea or that it even works, but the most obvious way to change a texture at runtime is treating it as a Canvas::Image and setting the path property accordingly, but I am not the slightest bit familiar with Earthview, its sphere or how it is textured, i.e. if it's even compatible with the way Canvas wants things done)

Anyway, here's the screenshot I usually post in similar topics, Torsten's ogel dynamically re-textured using a Canvas map:
http://wiki.flightgear.org/Howto:Dynami ... via_Canvas
Image
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: 11354
Joined: Tue Mar 25, 2008 8:40 am

PreviousNext

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 1 guest

cron