diff --git a/data/scene/atmosphereearth/atmosphereearth.mod b/data/scene/atmosphereearth/atmosphereearth.mod index bdf236fe04..fd7116b122 100644 --- a/data/scene/atmosphereearth/atmosphereearth.mod +++ b/data/scene/atmosphereearth/atmosphereearth.mod @@ -40,10 +40,10 @@ return { }, --Caster2 = { Name = "Independency Day Ship", Radius = 0 } }, + ColorTexture = "textures/earth_bluemarble.jpg", + NightTexture = "textures/earth_night.jpg", Textures = { Type = "simple", - Color = "textures/earth_bluemarble.jpg", - Night = "textures/earth_night.jpg", --Height = "textures/earth_bluemarble_height.jpg", -- Depth = "textures/earth_depth.png", Reflectance = "textures/earth_reflectance.png", diff --git a/data/scene/earth/earth.mod b/data/scene/earth/earth.mod index ee8f812ffc..c4e478efd5 100644 --- a/data/scene/earth/earth.mod +++ b/data/scene/earth/earth.mod @@ -37,17 +37,9 @@ return { Radius = 6.371E6, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/earth_bluemarble.jpg", - Night = "textures/earth_night.jpg", - Height = "textures/earth_bluemarble_height.jpg" - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/earth_bluemarble.jpg", + HeightTexture = "textures/earth_bluemarble_height.jpg", + NightTexture = "textures/earth_night.jpg", }, Tag = {"planet_solarSystem", "planet_terrestrial"}, Transform = { diff --git a/data/scene/jupiter/callisto/callisto.mod b/data/scene/jupiter/callisto/callisto.mod index 1491d121c1..89bcbd9e4a 100644 --- a/data/scene/jupiter/callisto/callisto.mod +++ b/data/scene/jupiter/callisto/callisto.mod @@ -12,15 +12,7 @@ return { Radius = 2.631E6, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/callisto.jpg", - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/callisto.jpg", }, Transform = { Translation = { diff --git a/data/scene/jupiter/europa/europa.mod b/data/scene/jupiter/europa/europa.mod index c1e6953ede..123a9d86b5 100644 --- a/data/scene/jupiter/europa/europa.mod +++ b/data/scene/jupiter/europa/europa.mod @@ -12,15 +12,7 @@ return { Radius = 1.561E6, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/europa.jpg", - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/europa.jpg", }, Transform = { Translation = { diff --git a/data/scene/jupiter/ganymede/ganymede.mod b/data/scene/jupiter/ganymede/ganymede.mod index e8414d015f..7971e3c62e 100644 --- a/data/scene/jupiter/ganymede/ganymede.mod +++ b/data/scene/jupiter/ganymede/ganymede.mod @@ -12,15 +12,7 @@ return { Radius = 2.631E6, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/ganymede.jpg", - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/ganymede.jpg", }, Transform = { Translation = { diff --git a/data/scene/jupiter/io/io.mod b/data/scene/jupiter/io/io.mod index 438999814c..bae45773e6 100644 --- a/data/scene/jupiter/io/io.mod +++ b/data/scene/jupiter/io/io.mod @@ -12,15 +12,7 @@ return { Radius = 1.8213E6, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/io.jpg", - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/io.jpg", }, Transform = { Translation = { diff --git a/data/scene/jupiter/jupiter/jupiter.mod b/data/scene/jupiter/jupiter/jupiter.mod index ae139ae95e..128c743f33 100644 --- a/data/scene/jupiter/jupiter/jupiter.mod +++ b/data/scene/jupiter/jupiter/jupiter.mod @@ -25,15 +25,7 @@ return { Radius = 0.71492E8, Segments = 200 }, - Textures = { - Type = "simple", - Color = "textures/jupiter.jpg", - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/jupiter.jpg", }, Tag = "planet_solarSystem", Transform = { diff --git a/data/scene/mars/mars.mod b/data/scene/mars/mars.mod index 43c33ead59..ea2b1200d1 100644 --- a/data/scene/mars/mars.mod +++ b/data/scene/mars/mars.mod @@ -25,15 +25,7 @@ return { Radius = 6.390E6, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/mars.jpg", - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/mars.jpg", }, Tag = {"planet_solarSystem", "planet_terrestrial"}, Transform = { diff --git a/data/scene/mercury/mercury.mod b/data/scene/mercury/mercury.mod index 106b781331..59c2708f5d 100644 --- a/data/scene/mercury/mercury.mod +++ b/data/scene/mercury/mercury.mod @@ -25,15 +25,7 @@ return { Radius = 2.4397E6, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/mercury.jpg", - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/mercury.jpg", }, Tag = {"planet_solarSystem", "planet_terrestrial"}, Transform = { diff --git a/data/scene/missions/dawn/ceres/ceres.mod b/data/scene/missions/dawn/ceres/ceres.mod index 0c29ae852b..775b94dae8 100644 --- a/data/scene/missions/dawn/ceres/ceres.mod +++ b/data/scene/missions/dawn/ceres/ceres.mod @@ -13,10 +13,7 @@ return { Radius = 6.390E5, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/gray.png", - }, + ColorTexture = "textures/gray.png", StartTime = "2010 JAN 01 00:00:00", EndTime = "2018 JAN 22 12:00:00" }, diff --git a/data/scene/missions/dawn/dawn/dawn.mod b/data/scene/missions/dawn/dawn/dawn.mod index 8bf49c27e7..54aae8158d 100644 --- a/data/scene/missions/dawn/dawn/dawn.mod +++ b/data/scene/missions/dawn/dawn/dawn.mod @@ -11,10 +11,7 @@ return { Type = "MultiModelGeometry", GeometryFile = "${OPENSPACE_DATA}/scene/dawn/obj/mainbodydawn.obj", }, - Textures = { - Type = "simple", - Color = "textures/gray.png", - }, + ColorTexture = "textures/gray.png", Rotation = { Source = "DAWN_SPACECRAFT", Destination = "GALACTIC" @@ -634,10 +631,7 @@ return { Type = "MultiModelGeometry", GeometryFile = "${OPENSPACE_DATA}/scene/dawn/obj/solarpanelleft.obj", }, - Textures = { - Type = "simple", - Color = "textures/gray.png", - }, + ColorTexture = "textures/gray.png", Rotation = { Source = "DAWN_SA-Y", Destination = "GALACTIC" @@ -657,10 +651,7 @@ return { Type = "MultiModelGeometry", GeometryFile = "${OPENSPACE_DATA}/scene/dawn/obj/solarpanelright.obj", }, - Textures = { - Type = "simple", - Color = "textures/gray.png", - }, + ColorTexture = "textures/gray.png", Rotation = { Source = "DAWN_SA+Y", Destination = "GALACTIC" diff --git a/data/scene/missions/dawn/vestaprojection/vestaprojection.mod b/data/scene/missions/dawn/vestaprojection/vestaprojection.mod index b2167abf15..379d0272c2 100644 --- a/data/scene/missions/dawn/vestaprojection/vestaprojection.mod +++ b/data/scene/missions/dawn/vestaprojection/vestaprojection.mod @@ -11,9 +11,9 @@ return { Type = "MultiModelGeometry", GeometryFile = "${OPENSPACE_DATA}/scene/vestaprojection_2/obj/VestaComet_5000.obj", }, + ColorTexture = "textures/dummy.jpg", Textures = { Type = "simple", - Color = "textures/dummy.jpg", Project = "textures/projectMe.png", Default = "textures/defaultProj_backup.png" }, diff --git a/data/scene/missions/juno/juno/juno.mod b/data/scene/missions/juno/juno/juno.mod index 3e6d9703fb..8ef710ddcc 100644 --- a/data/scene/missions/juno/juno/juno.mod +++ b/data/scene/missions/juno/juno/juno.mod @@ -13,10 +13,7 @@ return { GeometryFile = "Juno.obj", Magnification = 4, }, - Textures = { - Type = "simple", - Color = "textures/gray.png", - }, + ColorTexture = "textures/gray.png", Rotation = { Source = "JUNO_SPACECRAFT", Destination = "GALACTIC", diff --git a/data/scene/missions/newhorizons/jupiter/callisto/callisto.mod b/data/scene/missions/newhorizons/jupiter/callisto/callisto.mod index 40daf905ef..25facc74d4 100644 --- a/data/scene/missions/newhorizons/jupiter/callisto/callisto.mod +++ b/data/scene/missions/newhorizons/jupiter/callisto/callisto.mod @@ -15,9 +15,9 @@ return { Radius = callisto_radius, Segments = 100 }, + ColorTexture = "textures/callisto.jpg", Textures = { Type = "simple", - Color = "textures/callisto.jpg", Project = "textures/defaultProj.png", Sequencing = "true", }, diff --git a/data/scene/missions/newhorizons/jupiter/europa/europa.mod b/data/scene/missions/newhorizons/jupiter/europa/europa.mod index 0558ac06b7..8d0fbe1039 100644 --- a/data/scene/missions/newhorizons/jupiter/europa/europa.mod +++ b/data/scene/missions/newhorizons/jupiter/europa/europa.mod @@ -15,9 +15,9 @@ return { Radius = europa_radius, Segments = 100 }, + ColorTexture = "textures/europa.jpg", Textures = { Type = "simple", - Color = "textures/europa.jpg", Project = "textures/defaultProj.png", Sequencing = "true", }, diff --git a/data/scene/missions/newhorizons/jupiter/ganymede/ganymede.mod b/data/scene/missions/newhorizons/jupiter/ganymede/ganymede.mod index 21dccf80ee..fe5facac2b 100644 --- a/data/scene/missions/newhorizons/jupiter/ganymede/ganymede.mod +++ b/data/scene/missions/newhorizons/jupiter/ganymede/ganymede.mod @@ -15,9 +15,9 @@ return { Radius = ganymede_local, Segments = 100 }, + ColorTexture = "textures/ganymede.jpg", Textures = { Type = "simple", - Color = "textures/ganymede.jpg", Project = "textures/defaultProj.png", Sequencing = "true", }, diff --git a/data/scene/missions/newhorizons/jupiter/io/io.mod b/data/scene/missions/newhorizons/jupiter/io/io.mod index 70b810faf3..c8bc937554 100644 --- a/data/scene/missions/newhorizons/jupiter/io/io.mod +++ b/data/scene/missions/newhorizons/jupiter/io/io.mod @@ -15,9 +15,9 @@ return { Radius = io_radius, Segments = 100 }, + ColorTexture = "textures/io.jpg", Textures = { Type = "simple", - Color = "textures/io.jpg", Project = "textures/defaultProj.png", Sequencing = "true", }, diff --git a/data/scene/missions/newhorizons/jupiter/jupiter/jupiter.mod b/data/scene/missions/newhorizons/jupiter/jupiter/jupiter.mod index c0f338abe6..f611aa5542 100644 --- a/data/scene/missions/newhorizons/jupiter/jupiter/jupiter.mod +++ b/data/scene/missions/newhorizons/jupiter/jupiter/jupiter.mod @@ -28,9 +28,9 @@ return { Radius = jupiter_local, Segments = 200, }, + ColorTexture = "textures/jupiterFlipped_low.jpg", Textures = { Type = "simple", - Color = "textures/jupiterFlipped_low.jpg", Project = "textures/lorriTest1.jpg", Sequencing = "true", }, diff --git a/data/scene/missions/newhorizons/newhorizons/newhorizons.mod b/data/scene/missions/newhorizons/newhorizons/newhorizons.mod index c71caaba34..d15b46d79d 100644 --- a/data/scene/missions/newhorizons/newhorizons/newhorizons.mod +++ b/data/scene/missions/newhorizons/newhorizons/newhorizons.mod @@ -98,10 +98,7 @@ return { GeometryFile = "models/NewHorizonsCleanModel.obj", -- Magnification = 4, }, - Textures = { - Type = "simple", - Color = "textures/NHTexture.jpg", - }, + ColorTexture = "textures/NHTexture.jpg", Shading = { PerformShading = true, Fadeable = false, @@ -145,9 +142,9 @@ return { GeometryFile = "models/Labels.obj", -- Magnification = 4, }, + ColorTexture = "textures/labels.png", Textures = { Type = "simple", - Color = "textures/labels.png", BumpMap = "textures/goldfoilbump.tif" }, Rotation = { diff --git a/data/scene/missions/newhorizons/pluto/charon/charon.mod b/data/scene/missions/newhorizons/pluto/charon/charon.mod index ac9c616432..2f611209cb 100644 --- a/data/scene/missions/newhorizons/pluto/charon/charon.mod +++ b/data/scene/missions/newhorizons/pluto/charon/charon.mod @@ -31,10 +31,8 @@ return { Radius = charon_radius, Segments = 100 }, - Textures = { - Color = ColorTexture, - Height = "textures/cpdem-Mcolor2-MLorriCA-lr-5_ZMfs-cyl.jpg", - }, + ColorTexture = ColorTexture, + HeightTexture = "textures/cpdem-Mcolor2-MLorriCA-lr-5_ZMfs-cyl.jpg", Projection = { Observer = "NEW HORIZONS", Target = "CHARON", @@ -99,7 +97,6 @@ return { Observer = "NEW HORIZONS", Body = "CHARON", BodyFrame = "IAU_CHARON", - MainFrame = "GALACTIC", Aberration = "NONE", }, }, diff --git a/data/scene/missions/newhorizons/pluto/hydra/hydra.mod b/data/scene/missions/newhorizons/pluto/hydra/hydra.mod index 1165dcac5f..b6d7101c42 100644 --- a/data/scene/missions/newhorizons/pluto/hydra/hydra.mod +++ b/data/scene/missions/newhorizons/pluto/hydra/hydra.mod @@ -25,10 +25,7 @@ return { Radius = charon_radius, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/gray.jpg", - } + ColorTexture = "textures/gray.jpg", }, Transform = { Translation = { diff --git a/data/scene/missions/newhorizons/pluto/kerberos/kerberos.mod b/data/scene/missions/newhorizons/pluto/kerberos/kerberos.mod index 68039ab0d3..f75c930f0d 100644 --- a/data/scene/missions/newhorizons/pluto/kerberos/kerberos.mod +++ b/data/scene/missions/newhorizons/pluto/kerberos/kerberos.mod @@ -25,10 +25,7 @@ return { Radius = kerberos_radius, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/gray.jpg", - } + ColorTexture = "textures/gray.jpg", }, Transform = { Translation = { diff --git a/data/scene/missions/newhorizons/pluto/nix/nix.mod b/data/scene/missions/newhorizons/pluto/nix/nix.mod index 9d8d25da53..f5c75c866f 100644 --- a/data/scene/missions/newhorizons/pluto/nix/nix.mod +++ b/data/scene/missions/newhorizons/pluto/nix/nix.mod @@ -25,10 +25,7 @@ return { Radius = nix_radius, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/gray.jpg", - } + ColorTexture = "textures/gray.jpg", }, Transform = { Translation = { diff --git a/data/scene/missions/newhorizons/pluto/pluto/pluto.mod b/data/scene/missions/newhorizons/pluto/pluto/pluto.mod index 20fc87d708..5077ef65af 100644 --- a/data/scene/missions/newhorizons/pluto/pluto/pluto.mod +++ b/data/scene/missions/newhorizons/pluto/pluto/pluto.mod @@ -44,10 +44,8 @@ return { Radius = pluto_radius, Segments = 100 }, - Textures = { - Color = ColorTexture, - Height = "textures/pluto_shenk_heightmap.jpg", - }, + ColorTexture = ColorTexture, + HeightTexture = "textures/pluto_shenk_heightmap.jpg", Projection = { Sequence = "${OPENSPACE_DATA}/scene/missions/newhorizons/pluto/pluto/images", EventFile = "${OPENSPACE_DATA}/scene/missions/newhorizons/pluto/pluto/assets/core_v9h_obs_getmets_v8_time_fix_nofrcd_mld.txt", @@ -231,7 +229,6 @@ return { Observer = "NEW HORIZONS", Body = "PLUTO", BodyFrame = "IAU_PLUTO", - MainFrame = "GALACTIC", Aberration = "NONE", }, }, diff --git a/data/scene/missions/newhorizons/pluto/styx/styx.mod b/data/scene/missions/newhorizons/pluto/styx/styx.mod index fa3a975fce..3d157182e5 100644 --- a/data/scene/missions/newhorizons/pluto/styx/styx.mod +++ b/data/scene/missions/newhorizons/pluto/styx/styx.mod @@ -25,10 +25,7 @@ return { Radius = styx_radius, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/gray.jpg", - } + ColorTexture = "textures/gray.jpg", }, Transform = { Translation = { diff --git a/data/scene/missions/osirisrex/osirisrex/osirisrex.mod b/data/scene/missions/osirisrex/osirisrex/osirisrex.mod index 8ba3127250..8871183179 100644 --- a/data/scene/missions/osirisrex/osirisrex/osirisrex.mod +++ b/data/scene/missions/osirisrex/osirisrex/osirisrex.mod @@ -169,10 +169,7 @@ return { GeometryFile = "models/orx_base_resized_12_sep_2016.obj", Magnification = 0, }, - Textures = { - Type = "simple", - Color = "textures/osirisTex.png", - }, + ColorTexture = "textures/osirisTex.png", Shading = { PerformShading = true, Fadeable = false, @@ -204,10 +201,7 @@ return { GeometryFile = "models/orx_polycam_resized_12_sep_2016.obj", Magnification = 0, }, - Textures = { - Type = "simple", - Color = "textures/osirisTex.png", - }, + ColorTexture = "textures/osirisTex.png", Shading = { PerformShading = true, Fadeable = false, @@ -237,10 +231,7 @@ return { GeometryFile = "models/orx_rexis_resized_12_sep_2016.obj", Magnification = 0, }, - Textures = { - Type = "simple", - Color = "textures/osirisTex.png", - }, + ColorTexture = "textures/osirisTex.png", Shading = { PerformShading = true, Fadeable = false, diff --git a/data/scene/missions/rosetta/rosetta/rosetta.mod b/data/scene/missions/rosetta/rosetta/rosetta.mod index 9ef08a4f90..fecc927266 100644 --- a/data/scene/missions/rosetta/rosetta/rosetta.mod +++ b/data/scene/missions/rosetta/rosetta/rosetta.mod @@ -95,10 +95,7 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/black_foil.obj" }, - Textures = { - Type = "simple", - Color = "textures/foil_silver_ramp.png" - }, + ColorTexture = "textures/foil_silver_ramp.png", ModelTransform = RotationMatrix } }, @@ -112,10 +109,7 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/black_parts.obj" }, - Textures = { - Type = "simple", - Color = "textures/foil_silver_ramp.png" - }, + ColorTexture = "textures/foil_silver_ramp.png", ModelTransform = RotationMatrix } }, @@ -129,20 +123,9 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/dish.obj" }, - Textures = { - Type = "simple", - Color = "textures/dish_AO.png" - }, + ColorTexture = "textures/dish_AO.png", ModelTransform = RotationMatrix - }, - -- Transform = { - -- Rotation = { - -- Type = "SpiceRotation", - -- SourceFrame = "-226071", -- ROS_HGA - -- DestinationFrame = "ROS_SPACECRAFT", - -- } - -- } }, { Name = "Rosetta_parts", @@ -154,12 +137,8 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/parts.obj" }, - Textures = { - Type = "simple", - Color = "textures/parts2_AO.png" - }, + ColorTexture = "textures/parts2_AO.png", ModelTransform = RotationMatrix - } }, { @@ -172,12 +151,8 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/silver_foil.obj" }, - Textures = { - Type = "simple", - Color = "textures/foil_silver_ramp.png" - }, + ColorTexture = "textures/foil_silver_ramp.png", ModelTransform = RotationMatrix - } }, { @@ -190,12 +165,8 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/vents.obj" }, - Textures = { - Type = "simple", - Color = "textures/tex_01.png" - }, + ColorTexture = "textures/tex_01.png", ModelTransform = RotationMatrix - } }, { @@ -208,20 +179,9 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/wingA.obj" }, - Textures = { - Type = "simple", - Color = "textures/tex_01.png" - }, + ColorTexture = "textures/tex_01.png", ModelTransform = RotationMatrix - }, - -- Transform = { - -- Rotation = { - -- Type = "SpiceRotation", - -- SourceFrame = "-226015", -- ROS_SA - -- DestinationFrame = "ROS_SPACECRAFT", - -- } - -- } }, { Name = "Rosetta_wing_b", @@ -233,12 +193,8 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/wingB.obj" }, - Textures = { - Type = "simple", - Color = "textures/tex_01.png" - }, + ColorTexture = "textures/tex_01.png", ModelTransform = RotationMatrix - }, -- Transform = { -- Rotation = { @@ -258,12 +214,8 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/yellow_foil.obj" }, - Textures = { - Type = "simple", - Color = "textures/foil_gold_ramp.png" - }, + ColorTexture = "textures/foil_gold_ramp.png", ModelTransform = RotationMatrix - } }, { @@ -300,12 +252,8 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/lander_foil.obj" }, - Textures = { - Type = "simple", - Color = "textures/foil_silver_ramp.png" - }, + ColorTexture = "textures/foil_silver_ramp.png", ModelTransform = RotationMatrix - } }, { @@ -318,12 +266,8 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/lander_lids.obj" }, - Textures = { - Type = "simple", - Color = "textures/parts2_AO.png" - }, + ColorTexture = "textures/parts2_AO.png", ModelTransform = RotationMatrix - } }, { @@ -336,12 +280,8 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/lander_parts.obj" }, - Textures = { - Type = "simple", - Color = "textures/foil_silver_ramp.png" - }, + ColorTexture = "textures/foil_silver_ramp.png", ModelTransform = RotationMatrix - } }, { @@ -354,10 +294,7 @@ return { Type = "MultiModelGeometry", GeometryFile = "rosetta/lander_solarp.obj" }, - Textures = { - Type = "simple", - Color = "textures/tex_01.png" - }, + ColorTexture = "textures/tex_01.png", ModelTransform = RotationMatrix } }, diff --git a/data/scene/moon/moon.mod b/data/scene/moon/moon.mod index e9369653ed..29298049c0 100644 --- a/data/scene/moon/moon.mod +++ b/data/scene/moon/moon.mod @@ -22,11 +22,7 @@ return { Radius = 6.371E6 }, }, - Textures = { - Type = "simple", - Color = "textures/Moon16K.dds", - --Color = "textures/moonmap4k.jpg", - }, + ColorTexture = "textures/Moon16K.dds", }, Transform = { Translation = { diff --git a/data/scene/neptune/neptune.mod b/data/scene/neptune/neptune.mod index 03640a07ec..5ba2c55237 100644 --- a/data/scene/neptune/neptune.mod +++ b/data/scene/neptune/neptune.mod @@ -26,10 +26,7 @@ return { Radius = 2.4622E7, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/neptune.jpg", - } + ColorTexture = "textures/neptune.jpg", }, Tag = "planet_solarSystem", Transform = { diff --git a/data/scene/pluto/pluto.mod b/data/scene/pluto/pluto.mod index fcc75d1e8a..c8cbb52367 100644 --- a/data/scene/pluto/pluto.mod +++ b/data/scene/pluto/pluto.mod @@ -28,15 +28,7 @@ return { Radius = 1.173E6, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/pluto.jpg", - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/pluto.jpg", }, Transformation = { Translation = { @@ -64,15 +56,7 @@ return { Radius = 6.035E5, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/gray.jpg", - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/gray.jpg", }, Transformation = { Translation = { diff --git a/data/scene/saturn/dione/dione.mod b/data/scene/saturn/dione/dione.mod index 2726cb1bac..f11eeb7113 100644 --- a/data/scene/saturn/dione/dione.mod +++ b/data/scene/saturn/dione/dione.mod @@ -11,9 +11,7 @@ return { Radius = 0.563E3, Segments = 50 }, - Textures = { - Color = "textures/dione.jpg" - } + ColorTexture = "textures/dione.jpg" }, Transform = { Translation = { diff --git a/data/scene/saturn/enceladus/enceladus.mod b/data/scene/saturn/enceladus/enceladus.mod index 2128c9924f..2e547a6d45 100644 --- a/data/scene/saturn/enceladus/enceladus.mod +++ b/data/scene/saturn/enceladus/enceladus.mod @@ -11,9 +11,7 @@ return { Radius = 0.257E3, Segments = 50 }, - Textures = { - Color = "textures/enceladus.jpg" - } + ColorTexture = "textures/enceladus.jpg" }, Transform = { Translation = { diff --git a/data/scene/saturn/iapetus/iapetus.mod b/data/scene/saturn/iapetus/iapetus.mod index 01f1bdd59f..20dc2ddc85 100644 --- a/data/scene/saturn/iapetus/iapetus.mod +++ b/data/scene/saturn/iapetus/iapetus.mod @@ -11,9 +11,7 @@ return { Radius = 0.746E3, Segments = 50 }, - Textures = { - Color = "textures/iapetus.jpg" - } + ColorTexture = "textures/iapetus.jpg" }, Transform = { Translation = { diff --git a/data/scene/saturn/mimas/mimas.mod b/data/scene/saturn/mimas/mimas.mod index bed954f391..c46f657208 100644 --- a/data/scene/saturn/mimas/mimas.mod +++ b/data/scene/saturn/mimas/mimas.mod @@ -11,9 +11,7 @@ return { Radius = 0.28E3, Segments = 50 }, - Textures = { - Color = "textures/mimas.jpg" - } + ColorTexture = "textures/mimas.jpg" }, Transform = { Translation = { diff --git a/data/scene/saturn/rhea/rhea.mod b/data/scene/saturn/rhea/rhea.mod index 4f887a0804..1c642c2bab 100644 --- a/data/scene/saturn/rhea/rhea.mod +++ b/data/scene/saturn/rhea/rhea.mod @@ -11,9 +11,7 @@ return { Radius = 0.765E3, Segments = 50 }, - Textures = { - Color = "textures/rhea.jpg" - } + ColorTexture = "textures/rhea.jpg" }, Transform = { Translation = { diff --git a/data/scene/saturn/saturn/saturn.mod b/data/scene/saturn/saturn/saturn.mod index 4fd550b3ac..955e1821c6 100644 --- a/data/scene/saturn/saturn/saturn.mod +++ b/data/scene/saturn/saturn/saturn.mod @@ -26,15 +26,7 @@ return { Radius = 5.8232E7, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/saturn.jpg", - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/saturn.jpg", }, Tag = "planet_solarSystem", Transform = { diff --git a/data/scene/saturn/tethys/tethys.mod b/data/scene/saturn/tethys/tethys.mod index c680a48509..eef45fa450 100644 --- a/data/scene/saturn/tethys/tethys.mod +++ b/data/scene/saturn/tethys/tethys.mod @@ -11,9 +11,7 @@ return { Radius = 0.538E3, Segments = 50 }, - Textures = { - Color = "textures/tethys.jpg" - } + ColorTexture = "textures/tethys.jpg" }, Transform = { Translation = { diff --git a/data/scene/saturn/titan/titan.mod b/data/scene/saturn/titan/titan.mod index 2a5ff9b400..705de12cad 100644 --- a/data/scene/saturn/titan/titan.mod +++ b/data/scene/saturn/titan/titan.mod @@ -11,9 +11,7 @@ return { Radius = 0.2575E4, Segments = 50 }, - Textures = { - Color = "textures/titan.jpg" - } + ColorTexture = "textures/titan.jpg" }, Transform = { Translation = { diff --git a/data/scene/sun/sun.mod b/data/scene/sun/sun.mod index d780ccc3d4..86d5516c68 100644 --- a/data/scene/sun/sun.mod +++ b/data/scene/sun/sun.mod @@ -24,10 +24,7 @@ return { Radius = 6.957E8, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/sun.jpg", - }, + ColorTexture = "textures/sun.jpg", PerformShading = false, }, Transform = { diff --git a/data/scene/uranus/uranus.mod b/data/scene/uranus/uranus.mod index 861cb622eb..8d63b8f740 100644 --- a/data/scene/uranus/uranus.mod +++ b/data/scene/uranus/uranus.mod @@ -26,15 +26,7 @@ return { Radius = 2.5362E7, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/uranus.jpg", - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/uranus.jpg", }, Tag = "planet_solarSystem", Transform = { diff --git a/data/scene/venus/venus.mod b/data/scene/venus/venus.mod index 2c3940ae27..16a08f7d76 100644 --- a/data/scene/venus/venus.mod +++ b/data/scene/venus/venus.mod @@ -26,15 +26,7 @@ return { Radius = 3.760E6, Segments = 100 }, - Textures = { - Type = "simple", - Color = "textures/venus.jpg", - }, - Atmosphere = { - Type = "Nishita", -- for example, values missing etc etc - MieFactor = 1.0, - MieColor = {1.0, 1.0, 1.0} - } + ColorTexture = "textures/venus.jpg", }, Tag = {"planet_solarSystem", "planet_terrestrial"}, Transform = { diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index 4dd43cd3ff..3fce045e87 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -44,11 +44,9 @@ namespace { const char* KeyGeometry = "Geometry"; - const char* KeyTexture = "Textures.Color"; - const char* KeyModelTransform = "ModelTransform"; static const openspace::properties::Property::PropertyInfo TextureInfo = { - "ColorTexture", // @TODO replace with only "Texture" + "ColorTexture", "Color Texture", "This value points to a color texture file that is applied to the geometry " "rendered in this object." @@ -84,7 +82,7 @@ documentation::Documentation RenderableModel::Documentation() { "This specifies the model that is rendered by the Renderable." }, { - KeyTexture, // @TODO replace with TextureInfo.identifier + TextureInfo.identifier, new StringVerifier, Optional::Yes, TextureInfo.description @@ -132,12 +130,14 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) _geometry = modelgeometry::ModelGeometry::createFromDictionary(dict); } - if (dictionary.hasKey(KeyTexture)) { - _colorTexturePath = absPath(dictionary.value(KeyTexture)); + if (dictionary.hasKey(TextureInfo.identifier)) { + _colorTexturePath = absPath(dictionary.value( + TextureInfo.identifier + )); } - if (dictionary.hasKey(KeyModelTransform)) { - _modelTransform = dictionary.value(KeyModelTransform); + if (dictionary.hasKey(ModelTransformInfo.identifier)) { + _modelTransform = dictionary.value(ModelTransformInfo.identifier); } if (dictionary.hasKey(ShadingInfo.identifier)) { diff --git a/modules/newhorizons/rendering/renderablemodelprojection.cpp b/modules/newhorizons/rendering/renderablemodelprojection.cpp index 6b58159866..18b7f76c10 100644 --- a/modules/newhorizons/rendering/renderablemodelprojection.cpp +++ b/modules/newhorizons/rendering/renderablemodelprojection.cpp @@ -44,21 +44,18 @@ namespace { const char* _loggerCat = "RenderableModelProjection"; - const char* keySource = "Rotation.Source"; - const char* keyDestination = "Rotation.Destination"; + const char* keyGeometry = "Geometry"; const char* keyProjection = "Projection"; const char* keyBoundingSphereRadius = "BoundingSphereRadius"; - const char* keyTextureColor = "Textures.Color"; - - const char* _destination = "GALACTIC"; + const char* DestinationFrame = "GALACTIC"; static const openspace::properties::Property::PropertyInfo ColorTextureInfo = { "ColorTexture", "Color Base Texture", - "This is the path to a local image file that is used as the base texture for " - "the model on which the image projections are layered." + "This is the path to a local image file that is used as the base texture for the " + "model on which the image projections are layered." }; static const openspace::properties::Property::PropertyInfo PerformShadingInfo = { @@ -82,8 +79,7 @@ documentation::Documentation RenderableModelProjection::Documentation() { { "Type", new StringEqualVerifier("RenderableModelProjection"), - Optional::No, - "" + Optional::No }, { keyGeometry, @@ -98,7 +94,7 @@ documentation::Documentation RenderableModelProjection::Documentation() { "Contains information about projecting onto this planet." }, { - keyTextureColor, // @TODO Change to ColorTextureInfo.identifier + ColorTextureInfo.identifier, new StringVerifier, Optional::No, ColorTextureInfo.description @@ -149,7 +145,9 @@ RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& di ModelGeometry::createFromDictionary(geometryDictionary) ); - _colorTexturePath = absPath(dictionary.value(keyTextureColor)); + _colorTexturePath = absPath(dictionary.value( + ColorTextureInfo.identifier + )); addPropertySubOwner(_geometry.get()); addPropertySubOwner(_projectionComponent); @@ -172,11 +170,9 @@ RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& di Renderable::addProperty(_performShading); } -RenderableModelProjection::~RenderableModelProjection() { - // This empty method needs to be here in order to use forward declaration with - // std::unique_ptr -} - +// This empty method needs to be here in order to use forward declaration with +// std::unique_ptr +RenderableModelProjection::~RenderableModelProjection() {} bool RenderableModelProjection::isReady() const { bool ready = true; @@ -218,8 +214,9 @@ bool RenderableModelProjection::initialize() { } bool RenderableModelProjection::deinitialize() { - if (_geometry) + if (_geometry) { _geometry->deinitialize(); + } _geometry = nullptr; _baseTexture = nullptr; @@ -237,13 +234,15 @@ ghoul::opengl::Texture& RenderableModelProjection::baseTexture() const { } void RenderableModelProjection::render(const RenderData& data, RendererTasks&) { - if (_projectionComponent.needsClearProjection()) + if (_projectionComponent.needsClearProjection()) { _projectionComponent.clearAllProjections(); + } _up = data.camera.lookUpVectorCameraSpace(); - if (_capture && _projectionComponent.doesPerformProjection()) + if (_capture && _projectionComponent.doesPerformProjection()) { project(); + } _programObject->activate(); @@ -296,8 +295,9 @@ void RenderableModelProjection::update(const UpdateData& data) { _projectionComponent.update(); - if (_depthFboProgramObject->isDirty()) + if (_depthFboProgramObject->isDirty()) { _depthFboProgramObject->rebuildFromFile(); + } _time = data.time.j2000Seconds(); @@ -368,7 +368,11 @@ void RenderableModelProjection::imageProjectGPU( void RenderableModelProjection::attitudeParameters(double time) { try { - _instrumentMatrix = SpiceManager::ref().positionTransformMatrix(_projectionComponent.instrumentId(), _destination, time); + _instrumentMatrix = SpiceManager::ref().positionTransformMatrix( + _projectionComponent.instrumentId(), + DestinationFrame, + time + ); } catch (const SpiceManager::SpiceException&) { return; @@ -381,7 +385,9 @@ void RenderableModelProjection::attitudeParameters(double time) { } glm::dvec3 boresight; try { - SpiceManager::FieldOfViewResult res = SpiceManager::ref().fieldOfView(_projectionComponent.instrumentId()); + SpiceManager::FieldOfViewResult res = SpiceManager::ref().fieldOfView( + _projectionComponent.instrumentId() + ); boresight = std::move(res.boresightVector); } catch (const SpiceManager::SpiceException&) { return; @@ -391,7 +397,7 @@ void RenderableModelProjection::attitudeParameters(double time) { glm::dvec3 p = SpiceManager::ref().targetPosition( _projectionComponent.projectorId(), _projectionComponent.projecteeId(), - _destination, + DestinationFrame, _projectionComponent.aberration(), time, lightTime ); @@ -417,7 +423,10 @@ void RenderableModelProjection::attitudeParameters(double time) { void RenderableModelProjection::project() { for (auto img : _imageTimes) { attitudeParameters(img.timeRange.start); - auto projTexture = _projectionComponent.loadProjectionTexture(img.path, img.isPlaceholder); + auto projTexture = _projectionComponent.loadProjectionTexture( + img.path, + img.isPlaceholder + ); imageProjectGPU(projTexture); } _capture = false; @@ -426,8 +435,9 @@ void RenderableModelProjection::project() { bool RenderableModelProjection::loadTextures() { _baseTexture = nullptr; if (_colorTexturePath.value() != "") { - _baseTexture = ghoul::io::TextureReader::ref().loadTexture(absPath(_colorTexturePath)) - ; + _baseTexture = ghoul::io::TextureReader::ref().loadTexture( + absPath(_colorTexturePath) + ); if (_baseTexture) { LDEBUG("Loaded texture from '" << absPath(_colorTexturePath) << "'"); _baseTexture->uploadTexture(); diff --git a/modules/newhorizons/rendering/renderableplanetprojection.cpp b/modules/newhorizons/rendering/renderableplanetprojection.cpp index 357f6887fe..b3f257db9d 100644 --- a/modules/newhorizons/rendering/renderableplanetprojection.cpp +++ b/modules/newhorizons/rendering/renderableplanetprojection.cpp @@ -54,36 +54,27 @@ namespace { const char* _loggerCat = "RenderablePlanetProjection"; - const char* keyGeometry = "Geometry"; - const char* keyProjection = "Projection"; - const char* keyMeridianShift = "Textures.MeridianShift"; - const char* keyColorTexture = "Textures.Color"; - const char* keyHeightTexture = "Textures.Height"; + const char* KeyGeometry = "Geometry"; + const char* KeyProjection = "Projection"; - const char* keyRadius = "Geometry.Radius"; + const char* KeyRadius = "Geometry.Radius"; // const char* keyShading = "PerformShading"; const char* _mainFrame = "GALACTIC"; static const openspace::properties::Property::PropertyInfo ColorTextureInfo = { - "PlanetTexture", + "ColorTexture", "Color Base Texture", "The path to the base color texture that is used on the planet prior to any " "image projection." }; static const openspace::properties::Property::PropertyInfo HeightTextureInfo = { - "HeightMap", + "HeightTexture", "Heightmap Texture", "The path to the height map texture that is used for the planet. If no height " "map is specified the planet does not use a height field." }; - static const openspace::properties::Property::PropertyInfo ShiftMeridianInfo = { - "ShiftMeridian", - "Shift Meridian by 180 deg", - "Shift the position of the meridian by 180 degrees. This value " - }; - static const openspace::properties::Property::PropertyInfo HeightExaggerationInfo = { "HeightExaggeration", "Height Exaggeration", @@ -108,32 +99,25 @@ documentation::Documentation RenderablePlanetProjection::Documentation() { "" }, { - keyGeometry, + KeyGeometry, new ReferencingVerifier("space_geometry_planet"), Optional::No, "The geometry that is used for rendering this planet.", }, { - keyProjection, + KeyProjection, new ReferencingVerifier("newhorizons_projectioncomponent"), Optional::No, "Contains information about projecting onto this planet.", }, { - keyMeridianShift, - new BoolVerifier, - Optional::Yes, - "Determines whether the meridian of the planet should be shifted by 180 " - "degrees. The default value is 'false'" - }, - { - keyColorTexture, // @TODO This should be ColorTextureInfo.identifier + ColorTextureInfo.identifier, new StringVerifier, Optional::No, ColorTextureInfo.description }, { - keyHeightTexture, // @TODO This should be HeightTextureInfo.identifier + HeightTextureInfo.identifier, new StringVerifier, Optional::Yes, HeightTextureInfo.description @@ -152,12 +136,10 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& : Renderable(dictionary) , _colorTexturePath(ColorTextureInfo) , _heightMapTexturePath(HeightTextureInfo) - , _rotation({ "Rotation", "Rotation", "" }, 0, 0, 360) // @TODO Missing documentation , _programObject(nullptr) , _fboProgramObject(nullptr) , _baseTexture(nullptr) , _heightMapTexture(nullptr) - , _shiftMeridianBy180({"asd", "", "" }, false) // @TODO Missing documentation , _heightExaggeration(HeightExaggerationInfo, 1.f, 0.f, 100.f) , _capture(false) { @@ -172,8 +154,7 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& ghoul_assert(success, ""); ghoul::Dictionary geometryDictionary; - success = dictionary.getValue( - keyGeometry, geometryDictionary); + success = dictionary.getValue(KeyGeometry, geometryDictionary); if (success) { geometryDictionary.setValue(SceneGraphNode::KeyName, name); using planetgeometry::PlanetGeometry; @@ -182,38 +163,34 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& ); } - _projectionComponent.initialize(dictionary.value(keyProjection)); + _projectionComponent.initialize(dictionary.value(KeyProjection)); // TODO: textures need to be replaced by a good system similar to the geometry as soon // as the requirements are fixed (ab) std::string texturePath = ""; - success = dictionary.getValue("Textures.Color", texturePath); + success = dictionary.getValue(ColorTextureInfo.identifier, texturePath); if (success) { _colorTexturePath = absPath(texturePath); } std::string heightMapPath = ""; - success = dictionary.getValue("Textures.Height", heightMapPath); + success = dictionary.getValue(HeightTextureInfo.identifier, heightMapPath); if (success) { _heightMapTexturePath = absPath(heightMapPath); } - if (dictionary.hasKeyAndValue(keyMeridianShift)) { - _shiftMeridianBy180 = dictionary.value(keyMeridianShift); - } - float radius = std::pow(10.f, 9.f); - dictionary.getValue(keyRadius, radius); + dictionary.getValue(KeyRadius, radius); setBoundingSphere(radius); addPropertySubOwner(_geometry.get()); addPropertySubOwner(_projectionComponent); addProperty(_colorTexturePath); - _colorTexturePath.onChange(std::bind(&RenderablePlanetProjection::loadTextures, this)); + _colorTexturePath.onChange([&]() { loadTextures(); }); addProperty(_heightMapTexturePath); - _heightMapTexturePath.onChange(std::bind(&RenderablePlanetProjection::loadTextures, this)); + _heightMapTexturePath.onChange([&]() { loadTextures(); }); if (dictionary.hasKey(HeightExaggerationInfo.identifier)) { _heightExaggeration = static_cast( @@ -222,8 +199,6 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary& } addProperty(_heightExaggeration); - - addProperty(_shiftMeridianBy180); } RenderablePlanetProjection::~RenderablePlanetProjection() {} @@ -231,12 +206,14 @@ RenderablePlanetProjection::~RenderablePlanetProjection() {} bool RenderablePlanetProjection::initialize() { bool completeSuccess = true; - _programObject = OsEng.renderEngine().buildRenderProgram("projectiveProgram", + _programObject = OsEng.renderEngine().buildRenderProgram( + "projectiveProgram", "${MODULE_NEWHORIZONS}/shaders/renderablePlanet_vs.glsl", "${MODULE_NEWHORIZONS}/shaders/renderablePlanet_fs.glsl" ); - _fboProgramObject = ghoul::opengl::ProgramObject::Build("fboPassProgram", + _fboProgramObject = ghoul::opengl::ProgramObject::Build( + "fboPassProgram", "${MODULE_NEWHORIZONS}/shaders/renderablePlanetProjection_vs.glsl", "${MODULE_NEWHORIZONS}/shaders/renderablePlanetProjection_fs.glsl" ); @@ -311,17 +288,17 @@ void RenderablePlanetProjection::imageProjectGPU( _fboProgramObject->setUniform("_scaling" , _camScaling); _fboProgramObject->setUniform("boresight" , _boresight); - if (_geometry->hasProperty("radius")){ - ghoul::any r = _geometry->property("radius")->get(); + if (_geometry->hasProperty("Radius")){ + ghoul::any r = _geometry->property("Radius")->get(); if (glm::vec3* radius = ghoul::any_cast(&r)){ _fboProgramObject->setUniform("_radius", radius); } - }else{ + } else { LERROR("Geometry object needs to provide radius"); } - if (_geometry->hasProperty("segments")){ - ghoul::any s = _geometry->property("segments")->get(); - if (int* segments = ghoul::any_cast(&s)){ + if (_geometry->hasProperty("Segments")) { + ghoul::any s = _geometry->property("Segments")->get(); + if (int* segments = ghoul::any_cast(&s)) { _fboProgramObject->setUniform("_segments", segments[0]); } }else{ @@ -353,13 +330,8 @@ void RenderablePlanetProjection::attitudeParameters(double time) { static_cast(M_PI_2), glm::vec3(0, -1, 0) ); - glm::mat4 rotProp = glm::rotate( - _transform, - static_cast(glm::radians(static_cast(_rotation))), - glm::vec3(0, 1, 0) - ); - _transform = glm::mat4(_stateMatrix) * rot * roty * rotProp; + _transform = glm::mat4(_stateMatrix) * rot * roty; glm::dvec3 bs; try { @@ -465,8 +437,6 @@ void RenderablePlanetProjection::render(const RenderData& data, RendererTasks&) //setPscUniforms(*_programObject.get(), data.camera, data.position); - _programObject->setUniform("shiftMeridian", _shiftMeridianBy180); - ghoul::opengl::TextureUnit unit[3]; unit[0].activate(); _baseTexture->bind(); diff --git a/modules/newhorizons/rendering/renderableplanetprojection.h b/modules/newhorizons/rendering/renderableplanetprojection.h index ee131fdcb4..8723a024e0 100644 --- a/modules/newhorizons/rendering/renderableplanetprojection.h +++ b/modules/newhorizons/rendering/renderableplanetprojection.h @@ -67,16 +67,12 @@ private: properties::StringProperty _colorTexturePath; properties::StringProperty _heightMapTexturePath; - properties::IntProperty _rotation; - std::unique_ptr _programObject; std::unique_ptr _fboProgramObject; std::unique_ptr _baseTexture; std::unique_ptr _heightMapTexture; - properties::BoolProperty _shiftMeridianBy180; - properties::FloatProperty _heightExaggeration; std::unique_ptr _geometry; diff --git a/modules/newhorizons/rendering/renderableshadowcylinder.cpp b/modules/newhorizons/rendering/renderableshadowcylinder.cpp index 465c84db02..b6b5c8fd99 100644 --- a/modules/newhorizons/rendering/renderableshadowcylinder.cpp +++ b/modules/newhorizons/rendering/renderableshadowcylinder.cpp @@ -34,7 +34,7 @@ #include namespace { - const char* KeyMainFrame = "MainFrame"; + const char* MainFrame = "GALACTIC"; static const openspace::properties::Property::PropertyInfo NumberPointsInfo = { "AmountOfPoints", @@ -175,8 +175,7 @@ documentation::Documentation RenderableShadowCylinder::Documentation() { Optional::No, AberrationInfo.description }, - }, - Exhaustive::Yes + } }; } @@ -197,7 +196,6 @@ RenderableShadowCylinder::RenderableShadowCylinder(const ghoul::Dictionary& dict , _observer(ObserverInfo) , _body(BodyInfo) , _bodyFrame(BodyFrameInfo) - , _mainFrame({"mainFrame", "Main Frame", ""}) // @TODO Remove this , _aberration(AberrationInfo) , _shader(nullptr) , _vao(0) @@ -246,8 +244,6 @@ RenderableShadowCylinder::RenderableShadowCylinder(const ghoul::Dictionary& dict _observer = dictionary.value(ObserverInfo.identifier); _body = dictionary.value(BodyInfo.identifier); _bodyFrame = dictionary.value(BodyFrameInfo.identifier); - _mainFrame = dictionary.value(KeyMainFrame); - using T = SpiceManager::AberrationCorrection::Type; _aberration.addOptions({ @@ -330,7 +326,7 @@ void RenderableShadowCylinder::render(const RenderData& data, RendererTasks&) { void RenderableShadowCylinder::update(const UpdateData& data) { _stateMatrix = SpiceManager::ref().positionTransformMatrix( _bodyFrame, - _mainFrame, + MainFrame, data.time.j2000Seconds() ); if (_shader->isDirty()) { @@ -383,7 +379,7 @@ void RenderableShadowCylinder::createCylinder(double time) { glm::dvec3 vecLightSource = SpiceManager::ref().targetPosition( _body, _lightSource, - _mainFrame, + MainFrame, { SpiceManager::AberrationCorrection::Type(_aberration.value()), SpiceManager::AberrationCorrection::Direction::Reception diff --git a/modules/newhorizons/rendering/renderableshadowcylinder.h b/modules/newhorizons/rendering/renderableshadowcylinder.h index cebe3a4bdc..72382b9f6c 100644 --- a/modules/newhorizons/rendering/renderableshadowcylinder.h +++ b/modules/newhorizons/rendering/renderableshadowcylinder.h @@ -75,7 +75,6 @@ private: properties::StringProperty _observer; properties::StringProperty _body; properties::StringProperty _bodyFrame; - properties::StringProperty _mainFrame; properties::OptionProperty _aberration; std::unique_ptr _shader; diff --git a/modules/newhorizons/shaders/renderablePlanet_vs.glsl b/modules/newhorizons/shaders/renderablePlanet_vs.glsl index f14fb9eab8..d26f56720d 100644 --- a/modules/newhorizons/shaders/renderablePlanet_vs.glsl +++ b/modules/newhorizons/shaders/renderablePlanet_vs.glsl @@ -40,16 +40,10 @@ uniform mat4 modelViewProjectionTransform; uniform bool _hasHeightMap; uniform float _heightExaggeration; uniform sampler2D heightTexture; -uniform bool shiftMeridian; void main() { vs_st = in_st; - vec2 st = in_st; - if (shiftMeridian) { - st.s += 0.5; - } - vec4 tmp = in_position; // this is wrong for the normal. @@ -58,7 +52,7 @@ void main() { if (_hasHeightMap) { - const float height = texture(heightTexture, st).s; + const float height = texture(heightTexture, in_st).s; const vec3 displacementDirection = (normalize(tmp.xyz)); const float displacementFactor = height * _heightExaggeration / 750.0; tmp.xyz += displacementDirection * displacementFactor; diff --git a/modules/space/rendering/renderableplanet.cpp b/modules/space/rendering/renderableplanet.cpp index 86ea1410ee..7dd725773a 100644 --- a/modules/space/rendering/renderableplanet.cpp +++ b/modules/space/rendering/renderableplanet.cpp @@ -53,10 +53,6 @@ namespace { const char* KeyGeometry = "Geometry"; const char* KeyRadius = "Radius"; - const char* KeyColorTexture = "Textures.Color"; - const char* KeyNightTexture = "Textures.Night"; - const char* KeyHeightTexture = "Textures.Height"; - const char* KeyShading = "PerformShading"; static const char* _loggerCat = "RenderablePlanet"; @@ -67,14 +63,14 @@ namespace { const char* keyBody = "Body"; static const openspace::properties::Property::PropertyInfo ColorTextureInfo = { - "PlanetTexture", + "ColorTexture", "Color Base Texture", "The path to the base color texture that is used on the planet prior to any " "image projection." }; static const openspace::properties::Property::PropertyInfo HeightTextureInfo = { - "HeightMap", + "HeightTexture", "Heightmap Texture", "The path to the height map texture that is used for the planet. If no height " "map is specified the planet does not use a height field." @@ -101,7 +97,8 @@ namespace { "Perform Shading", "If this value is enabled, the model will be shaded based on the relative " "location to the Sun. If this value is disabled, shading is disabled and the " - "entire model is rendered brightly." + "entire model is rendered brightly. If this value is 'false', any existing night " + "texture will not be used." }; } // namespace @@ -127,31 +124,28 @@ documentation::Documentation RenderablePlanet::Documentation() { "will try to query the SPICE library for radius values." }, { - KeyColorTexture, // @TODO Use ColorTextureInfo.identifier instead + ColorTextureInfo.identifier, new StringVerifier, Optional::Yes, - "Specifies the color texture that is used for this RenderablePlanet." + ColorTextureInfo.description }, { - KeyHeightTexture, // @TODO Use HeightTextureInfo.identifier instead + HeightTextureInfo.identifier, new StringVerifier, Optional::Yes, - "Specifies the height texture that is used for this RenderablePlanet." + HeightTextureInfo.description }, { - KeyNightTexture, // @TODO Use NightTextureInfo.identifier instead + NightTextureInfo.identifier, new StringVerifier, Optional::Yes, - "Specifies the texture that is used for the night side of this " - "RenderablePlanet." + NightTextureInfo.description }, { - KeyShading, + PerformShadingInfo.identifier, new BoolVerifier, Optional::Yes, - "Specifies whether the planet should be rendered shaded by the Sun. If " - "this value is 'false', any existing night texture will not be used. " - "This value defaults to 'true'." + PerformShadingInfo.description }, { HeightExaggerationInfo.identifier, @@ -221,27 +215,33 @@ RenderablePlanet::RenderablePlanet(const ghoul::Dictionary& dictionary) _geometry = planetgeometry::PlanetGeometry::createFromDictionary(geomDict); - if (dictionary.hasKey(KeyColorTexture)) { - _colorTexturePath = absPath(dictionary.value(KeyColorTexture)); + if (dictionary.hasKey(ColorTextureInfo.identifier)) { + _colorTexturePath = absPath(dictionary.value( + ColorTextureInfo.identifier + )); } - if (dictionary.hasKey(KeyNightTexture)) { + if (dictionary.hasKey(NightTextureInfo.identifier)) { _hasNightTexture = true; - _nightTexturePath = absPath(dictionary.value(KeyNightTexture)); + _nightTexturePath = absPath(dictionary.value( + NightTextureInfo.identifier + )); } - if (dictionary.hasKey(KeyHeightTexture)) { + if (dictionary.hasKey(HeightTextureInfo.identifier)) { _hasHeightTexture = true; - _heightMapTexturePath = absPath(dictionary.value(KeyHeightTexture)); + _heightMapTexturePath = absPath(dictionary.value( + HeightTextureInfo.identifier + )); } - if (dictionary.hasKey(KeyShading)) { - _performShading = dictionary.value(KeyShading); + if (dictionary.hasKey(PerformShadingInfo.identifier)) { + _performShading = dictionary.value(PerformShadingInfo.identifier); } addPropertySubOwner(_geometry.get()); - auto loadTextureCallback = [this]() {loadTexture(); }; + auto loadTextureCallback = [this]() { loadTexture(); }; addProperty(_colorTexturePath); _colorTexturePath.onChange(loadTextureCallback);