mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-03 09:20:26 -05:00
Feature/globebrowsing optimization (#310)
* Simplest possible PBO implementation. * Add PBO class * TileLoadJob owns raw tile data * Working on a soluton to cache textures and reuse them * PBO and cached textures working for one texture type. Color textures. * Threadpool for tile requests uses LRU cache as queue * Remove framesUntilRequestFlush * Clean up * Clean up * Use prioritizing concurrent job manager * Use TileTextureInitData to initialize RawTileDataReader. * Class TextureContainer owns the textures to use for tiles. * Using TileTextureInitData to determine if new caches need to be created. * Remove WriteDataDescription * Remove TileDataLayout * Rendering many different layer types again * TileProviderByLevel gives layergroup id to tile providers * Comment away use of PBO * Erase unfinished requests to make room for new ones * Enable choice of PBO or not. * Enable resetting of asynctiledataprovider * Add the ability to use PBO and also load to CPU * Update ghoul * Solve culling issue. * Texture pointer of Tile is now a raw pointer. Currently break single image tile provider and text tile provider. * Add gpudata * Move fetching of shader preprocessing data to LayerManager * No comparisons to determine shader recompilation. * Show the tile cache size in the GUI * Clean up and comment. * Solve bug where float is interpreted as NaN * Enable ability to blend between layers again * Fix single image provider * Fix windows build error * Fix OSX compile issue. * Some clean up * Showing correct texture data size * Enable use of text tile providers again. No backgroupd image path however. * Change cache size from GUI * Clean up * Solve osx compilation error. * Update ghoul * Make it possible to switch between PBO and not during runtime. * Enable resetting of tile datasets * change function module in moduleengine to identify module by name * MemoryAwareTileCache is no longer a singleton * Update ownership of properties for globe browsing * Logging info about resetting tile reader. * Logging info * Fix requested changes * Fix some compile warnings. * Fix compilation warnings * Add ability to blend values with blend parameter. Also define settings through lua dict. * Fix some comments on pull request. * Change formatting * Change formatting * Change formatting * Fix pull request comments. * Those are details * Make Mercury great again. * Make Earth great again. * Solve conflict * Test to sometimes use valueblending and sometimes not * Not always use value blending * Update ghoul * Change from auto to explicit type. * Update test for LRU Cache * Include algorithm.
This commit is contained in:
@@ -64,8 +64,6 @@ end
|
||||
function postInitialization()
|
||||
openspace.printInfo("Setting default values")
|
||||
|
||||
openspace.setInteractionMode('GlobeBrowsing')
|
||||
|
||||
openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55)
|
||||
openspace.setPropertyValue("MilkyWay.renderable.segments", 50)
|
||||
|
||||
@@ -74,8 +72,8 @@ function postInitialization()
|
||||
openspace.setPropertyValue("SunMarker.renderable.enabled", false)
|
||||
|
||||
openspace.setPropertyValue("Earth.RenderableGlobe.atmosphere", true)
|
||||
openspace.setPropertyValue("Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.settings.gamma", 1.8)
|
||||
openspace.setPropertyValue("Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.settings.multiplier", 10)
|
||||
openspace.setPropertyValue("Earth.RenderableGlobe.Debug.levelByProjectedAreaElseDistance", false)
|
||||
openspace.setPropertyValue("Earth.RenderableGlobe.Layers.ColorLayers.blendTileLevels", true)
|
||||
|
||||
openspace.resetCameraDirection()
|
||||
|
||||
@@ -88,8 +86,8 @@ return {
|
||||
CommonFolder = "common",
|
||||
Camera = {
|
||||
Focus = "Earth",
|
||||
Position = {138530625167.228241, 42217005217.825005, -46336405755.934372},
|
||||
Rotation = {0.633883, 0.492158, -0.123913, -0.583625},
|
||||
Position = {30000000, 0, 0},
|
||||
Rotation = {0.758797, 0.221490, -0.605693, -0.091135},
|
||||
},
|
||||
|
||||
Modules = {
|
||||
|
||||
@@ -56,31 +56,27 @@ return {
|
||||
SegmentsPerPatch = 64,
|
||||
Layers = {
|
||||
ColorLayers = {
|
||||
|
||||
{
|
||||
Name = "ESRI VIIRS Combo",
|
||||
Type = "ByLevel",
|
||||
LevelTileProviders = {
|
||||
{
|
||||
MaxLevel = 3,
|
||||
TileProvider = { Type = "Temporal", FilePath = "map_service_configs/GIBS/Temporal_VIIRS_SNPP_CorrectedReflectance_TrueColor.xml", },
|
||||
TileProvider = {
|
||||
Type = "Temporal",
|
||||
Name = "Temporal VIIRS SNPP",
|
||||
FilePath = "map_service_configs/GIBS/Temporal_VIIRS_SNPP_CorrectedReflectance_TrueColor.xml", },
|
||||
},
|
||||
{
|
||||
MaxLevel = 22,
|
||||
TileProvider = { FilePath = "map_service_configs/ESRI/ESRI_Imagery_World_2D.wms" },
|
||||
MaxLevel = 22,
|
||||
TileProvider = {
|
||||
Name = "ESRI Imagery World 2D",
|
||||
FilePath = "map_service_configs/ESRI/ESRI_Imagery_World_2D.wms"
|
||||
},
|
||||
},
|
||||
},
|
||||
Enabled = true,
|
||||
},
|
||||
{
|
||||
Name = "ESRI Imagery World",
|
||||
FilePath = "map_service_configs/ESRI/ESRI_Imagery_World_2D.wms"
|
||||
},
|
||||
{
|
||||
Type = "Temporal",
|
||||
Name = "Temporal VIIRS SNPP",
|
||||
FilePath = "map_service_configs/GIBS/Temporal_VIIRS_SNPP_CorrectedReflectance_TrueColor.xml",
|
||||
},
|
||||
{
|
||||
Type = "Temporal",
|
||||
Name = "Temporal_GHRSST_L4_MUR_Sea_Surface_Temperature",
|
||||
@@ -90,21 +86,11 @@ return {
|
||||
Type = "Temporal",
|
||||
Name = "Temporal_AMSR2_GCOM_W1_Sea_Ice_Concentration",
|
||||
FilePath = "map_service_configs/GIBS/Temporal_AMSR2_GCOM_W1_Sea_Ice_Concentration.xml",
|
||||
},
|
||||
-- {
|
||||
-- Type = "SingleImage",
|
||||
-- Name = "Debug Tiles",
|
||||
-- FilePath = "../../debugglobe/textures/test_tile.png",
|
||||
-- },
|
||||
},
|
||||
{
|
||||
Name = "BMNG",
|
||||
FilePath = "map_service_configs/Utah/Bmng.wms"
|
||||
}
|
||||
-- {
|
||||
-- Type = "Temporal",
|
||||
-- Name = "NOAA RT",
|
||||
-- FilePath = "map_service_configs/other/noaa_rt.xml"
|
||||
-- }
|
||||
},
|
||||
GrayScaleLayers = { },
|
||||
GrayScaleColorOverlays = { },
|
||||
@@ -113,6 +99,11 @@ return {
|
||||
Name = "Earth at Night 2012",
|
||||
FilePath = "map_service_configs/GIBS/VIIRS_CityLights_2012.xml",
|
||||
Enabled = true,
|
||||
Settings = {
|
||||
Opacity = 1.0,
|
||||
Gamma = 1.5,
|
||||
Multiplier = 15.0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Type = "Temporal",
|
||||
@@ -154,20 +145,6 @@ return {
|
||||
Radii = earthEllipsoid,
|
||||
BackgroundImagePath = "../arrows.png",
|
||||
},
|
||||
--[[{
|
||||
Name = "Test",
|
||||
Type = "LevelSpecific",
|
||||
LevelTileProviders = {
|
||||
{
|
||||
MaxLevel = 5,
|
||||
TileProvider = { Type = "TileIndex" },
|
||||
},
|
||||
{
|
||||
MaxLevel = 7,
|
||||
TileProvider = { Type = "SingleImage", FilePath = "../../debugglobe/textures/test_tile.png",},
|
||||
},
|
||||
},
|
||||
},]]
|
||||
},
|
||||
HeightLayers = {
|
||||
{
|
||||
@@ -175,7 +152,6 @@ return {
|
||||
FilePath = "map_service_configs/ESRI/TERRAIN.wms",
|
||||
Enabled = true,
|
||||
TilePixelSize = 64,
|
||||
DoPreProcessing = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<OpenSpaceTemporalGDALDataset>
|
||||
<OpenSpaceTimeStart>2015-11-24</OpenSpaceTimeStart>
|
||||
<OpenSpaceTimeEnd></OpenSpaceTimeEnd>
|
||||
<OpenSpaceTimeEnd>Yesterday</OpenSpaceTimeEnd>
|
||||
<OpenSpaceTimeResolution>1d</OpenSpaceTimeResolution>
|
||||
<OpenSpaceTimeIdFormat>YYYY-MM-DD</OpenSpaceTimeIdFormat>
|
||||
<GDAL_WMS>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<UpperLeftY>90</UpperLeftY>
|
||||
<LowerRightX>396.0</LowerRightX>
|
||||
<LowerRightY>-198</LowerRightY>
|
||||
<TileLevel>8</TileLevel>
|
||||
<TileLevel>7</TileLevel>
|
||||
<TileCountX>2</TileCountX>
|
||||
<TileCountY>1</TileCountY>
|
||||
<YOrigin>top</YOrigin>
|
||||
|
||||
@@ -38,18 +38,8 @@ return {
|
||||
Layers = {
|
||||
ColorLayers = {
|
||||
{
|
||||
Name = "Viking combo",
|
||||
Type = "ByLevel",
|
||||
LevelTileProviders = {
|
||||
{
|
||||
MaxLevel = 3,
|
||||
TileProvider = { FilePath = "textures/mars.jpg", },
|
||||
},
|
||||
{
|
||||
MaxLevel = 22,
|
||||
TileProvider = { FilePath = "map_service_configs/MARS_Viking_MDIM21.xml" },
|
||||
},
|
||||
},
|
||||
Name = "Viking",
|
||||
FilePath = "map_service_configs/MARS_Viking_MDIM21.xml",
|
||||
Enabled = true,
|
||||
},
|
||||
-- {
|
||||
@@ -157,7 +147,7 @@ return {
|
||||
Name = "West Candor Chasma",
|
||||
FilePath = "map_datasets/CTX/West_Candor_Chasma_DEM_longlat_global.vrt",
|
||||
--Enabled = true,
|
||||
MinimumPixelSize = 90,
|
||||
TilePixelSize = 90,
|
||||
DoPreProcessing = true,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
return {
|
||||
-- Barycenter module
|
||||
{
|
||||
Name = "MercuryBarycenter",
|
||||
Parent = "SolarSystemBarycenter",
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Body = "MERCURY",
|
||||
Observer = "SUN",
|
||||
Kernels = "${OPENSPACE_DATA}/spice/de430_1850-2150.bsp"
|
||||
},
|
||||
},
|
||||
},
|
||||
-- RenderableGlobe module
|
||||
{
|
||||
Name = "Mercury",
|
||||
Parent = "MercuryBarycenter",
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "SpiceRotation",
|
||||
SourceFrame = "IAU_MERCURY",
|
||||
DestinationFrame = "GALACTIC",
|
||||
},
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 1,
|
||||
},
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableGlobe",
|
||||
Radii = {2439700, 2439700.0, 2439700.0},
|
||||
Frame = "IAU_MERCURY",
|
||||
Body = "MERCURY",
|
||||
|
||||
CameraMinHeight = 300,
|
||||
InteractionDepthBelowEllipsoid = 0, -- Useful when having negative height map values
|
||||
SegmentsPerPatch = 64,
|
||||
Layers = {
|
||||
ColorLayers = {
|
||||
{
|
||||
Name = "Simple Texture",
|
||||
FilePath = "textures/mercury.jpg",
|
||||
Enabled = true,
|
||||
TilePixelSize = 256,
|
||||
},
|
||||
{
|
||||
Name = "Messenger_Mosaic",
|
||||
FilePath = "map_service_configs/Utah/MessengerMosaic.wms"
|
||||
}
|
||||
--[[
|
||||
{
|
||||
Name = "On Mercury Color",
|
||||
FilePath = "map_service_configs/OnMercuryColor.xml",
|
||||
Enabled = true,
|
||||
},
|
||||
{
|
||||
Name = "On Mercury Image",
|
||||
FilePath = "map_service_configs/OnMercuryImage.xml",
|
||||
},
|
||||
]]
|
||||
},
|
||||
GrayScaleLayers = {
|
||||
{
|
||||
Name = "Messenger_MDIS",
|
||||
FilePath = "map_service_configs/Utah/MessengerMDIS.wms"
|
||||
}
|
||||
},
|
||||
GrayScaleColorOverlays = { },
|
||||
NightLayers = { },
|
||||
WaterMasks = { },
|
||||
ColorOverlays = { },
|
||||
HeightLayers = {
|
||||
--[[
|
||||
{
|
||||
Name = "On Mercury Height",
|
||||
FilePath = "map_service_configs/OnMercuryElevationGaskell.xml",
|
||||
Enabled = true,
|
||||
},
|
||||
]]
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- Trail module
|
||||
{
|
||||
Name = "MercuryTrail",
|
||||
Parent = "SolarSystemBarycenter",
|
||||
Renderable = {
|
||||
Type = "RenderableTrailOrbit",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Body = "MERCURY",
|
||||
Observer = "SUN",
|
||||
},
|
||||
Color = {0.6, 0.5, 0.5 },
|
||||
Period = 87.968,
|
||||
Resolution = 100
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user