Files
OpenSpace/data/scene/newhorizons.scene
T
2017-10-12 12:13:55 -04:00

227 lines
8.6 KiB
Plaintext

-- These values specify the textures that are used for Pluto and Charon
-- The paths are relative to data/scene/missions/newhorizons/pluto/pluto and
-- data/scene/missions/newhorizons/pluto/charon respectively
-- Each image is provided at a lower resolution for lower spec systems
-- pluto_image = "textures/NH_Pluto_mosaic_8192.png"
-- pluto_image = "textures/NH_Pluto_mosaic_16384.png"
pluto_image = "textures/pmap_cyl_k201.jpg"
-- pluto_image = "textures/pmap_cyl_k201_4096.jpg"
-- pluto_height = "textures/NH_Pluto_DTM_8192.png"
pluto_height = "textures/NH_Pluto_DTM_16384.png"
charon_image = "textures/NH_Charon_mosaic.png"
-- charon_image = "textures/NH_Charon_mosaic_8192.png"
charon_height = "textures/NH_Charon_DTM.png"
-- charon_height = "textures/NH_Charon_DTM_8192.png"
dofile(openspace.absPath('${SCRIPTS}/scene_helper.lua'))
function preInitialization()
--[[
The scripts in this function are executed after the scene is loaded but before the
scene elements have been initialized, thus they should be used to set the time at
which the scene should start and other settings that might determine initialization
critical objects.
]]--
openspace.spice.loadKernel("${SPICE}/naif0012.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
openspace.time.setTime("2015-07-14T08:00:00.00")
-- Load the common helper functions
dofile(openspace.absPath('${SCRIPTS}/common.lua'))
openspace.clearKeys()
helper.setCommonKeys()
helper.setDeltaTimeKeys({
1, 5, 10, 20, 40, 60, 120, 360, 540, 1080,
2160, 4320, 8640
})
openspace.bindKey(
"a",
"openspace.setPropertyValue('NavigationHandler.Origin', 'NewHorizons')",
"Sets the focus of the camera on 'NewHorizons'."
)
openspace.bindKey(
"s",
"openspace.setPropertyValue('NavigationHandler.Origin', 'Pluto')",
"Sets the focus of the camera on 'Pluto'"
)
openspace.bindKey(
"d",
"openspace.setPropertyValue('NavigationHandler.Origin', 'Charon')",
"Sets the focus of the camera on 'Charon'."
)
openspace.bindKey(
"z",
"openspace.setPropertyValue('NavigationHandler.Origin', 'JupiterProjection')",
"Sets the focus of the camera on 'Jupiter'."
)
openspace.bindKey(
"x",
"openspace.setPropertyValue('NavigationHandler.Origin', 'Europa')",
"Sets the focus of the camera on 'Europa'."
)
openspace.bindKey(
"F8",
"openspace.setPropertyValue('Pluto.renderable.ProjectionComponent.ClearAllProjections', true);" ..
"openspace.setPropertyValue('Charon.renderable.ProjectionComponent.ClearAllProjections', true);",
"Removes all image projections from Pluto and Charon."
)
openspace.bindKey(
"F9",
"openspace.time.setTime('2015-07-14T09:00:00.00');" ..
"openspace.setPropertyValue('Pluto.renderable.ClearAllProjections', true);" ..
"openspace.setPropertyValue('Charon.renderable.ClearAllProjections', true);",
"Jumps to the 14th of July 2015 at 0900 UTC and clears all projections."
)
openspace.bindKey(
"KP_8",
helper.property.increment('Pluto.renderable.HeightExaggeration', 5000000),
"Increases the height map exaggeration on Pluto."
)
openspace.bindKey(
"KP_2",
helper.property.decrement('Pluto.renderable.HeightExaggeration', 5000000),
"Decreases the height map exaggeration on Pluto."
)
openspace.bindKey(
"KP_9",
helper.property.increment('Charon.renderable.HeightExaggeration', 5000000),
"Increases the height map exaggeration on Charon."
)
openspace.bindKey(
"KP_3",
helper.property.decrement('Charon.renderable.HeightExaggeration', 5000000),
"Decreases the height map exaggeration on Charon."
)
openspace.bindKey(
"q",
helper.property.invert('SunMarker.renderable.Enabled'),
"Toggles the visibility of the text marking the location of the Sun."
)
openspace.bindKey(
"e",
helper.property.invert('EarthMarker.renderable.Enabled'),
"Toggles the visibility of the text marking the location of the Earth."
)
openspace.bindKey(
"o",
helper.property.invert('PlutoTrail.renderable.Enabled'),
"Toggles the visibility of the trail behind Pluto."
)
openspace.bindKey(
"j",
helper.renderable.toggle('PlutoText') .. helper.renderable.toggle('CharonText') ..
helper.renderable.toggle('HydraText') .. helper.renderable.toggle('NixText') ..
helper.renderable.toggle('KerberosText') .. helper.renderable.toggle('StyxText'),
"Toggles the visibility of the text labels of Pluto, Charon, Hydra, Nix, Kerberos, and Styx."
)
openspace.bindKey(
"l",
helper.property.invert('Labels.renderable.performFading'),
"Toggles the visibility of the labels for the New Horizons instruments."
)
openspace.bindKey("m",
helper.property.invert('NH_LORRI.renderable.SolidDraw') ..
helper.property.invert('NH_RALPH_LEISA.renderable.SolidDraw') ..
helper.property.invert('NH_RALPH_MVIC_PAN1.renderable.SolidDraw') ..
helper.property.invert('NH_RALPH_MVIC_PAN2.renderable.SolidDraw') ..
helper.property.invert('NH_RALPH_MVIC_RED.renderable.SolidDraw') ..
helper.property.invert('NH_RALPH_MVIC_BLUE.renderable.SolidDraw') ..
helper.property.invert('NH_RALPH_MVIC_FT.renderable.SolidDraw') ..
helper.property.invert('NH_RALPH_MVIC_METHANE.renderable.SolidDraw') ..
helper.property.invert('NH_RALPH_MVIC_NIR.renderable.SolidDraw') ..
helper.property.invert('NH_ALICE_AIRGLOW.renderable.SolidDraw') ..
helper.property.invert('NH_ALICE_SOC.renderable.SolidDraw'),
"Draws the instrument field of views in a solid color or as lines."
)
openspace.bindKey(
"t",
helper.renderable.toggle('PlutoShadow') .. helper.renderable.toggle('CharonShadow'),
"Toggles the visibility of the shadow visualization of Pluto and Charon."
)
-- openspace.bindKey("p",
-- helper.property.invert('JupiterProjection.renderable.PerformProjection') ..
-- helper.property.invert('Io.renderable.PerformProjection') ..
-- helper.property.invert('Ganymede.renderable.PerformProjection') ..
-- helper.property.invert('Europa.renderable.PerformProjection') ..
-- helper.property.invert('Callisto.renderable.PerformProjection') ..
-- helper.property.invert('Pluto.renderable.PerformProjection') ..
-- helper.property.invert('Charon.renderable.PerformProjection'),
-- "Enables or disables the image projection on the different available objects."
-- )
end
function postInitialization()
--[[
The scripts in this function are executed after all objects in the scene have been
created and initialized, but before the first render call. This is the place to set
graphical settings for the renderables.
]]--
openspace.printInfo("Setting default values")
openspace.setPropertyValue("Sun.renderable.Enabled", false)
openspace.setPropertyValue("SunMarker.renderable.Enabled", true)
openspace.setPropertyValue("EarthMarker.renderable.Enabled", true)
--openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false)
openspace.setPropertyValue("PlutoTrail.renderable.Enabled", false)
openspace.setPropertyValue("PlutoTexture.renderable.Enabled", false)
openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55)
openspace.setPropertyValue("MilkyWay.renderable.Segments", 50)
openspace.printInfo("Done setting default values")
-- Defined in scene_helper.lua
-- Used to create focus buttons for a subset of scenegraph nodes
mark_interesting_nodes({
"Pluto", "NewHorizons", "Charon"
})
end
return {
ScenePath = ".",
CommonFolder = "common",
Camera = {
Focus = "NewHorizons",
Position = {4662120063743.592773, 1263245003503.724854, -955413856565.788086},
Rotation = {0.683224, -0.165934, 0.701234, 0.118073},
},
Modules = {
"sun",
"mercury",
"venus",
"earth",
"mars",
"jupiter/jupiter",
"saturn/saturn",
"uranus",
"neptune",
"stars/digitaluniverse",
-- "stars/denver",
"milkyway/digitaluniverse",
--"milkyway/eso",
"missions/newhorizons/pluto",
-- "missions/newhorizons/jupiter",
"missions/newhorizons/newhorizons",
"missions/newhorizons/newhorizonsfov"
}
}