Commit 0b063827 authored by Alexander Bock's avatar Alexander Bock Committed by GitHub
Browse files

Merge pull request #379 from OpenSpace/misc/various-fixes

Misc/various fixes
parents 02ce2a1b e07822e2
Showing with 98 additions and 40 deletions
+98 -40
......@@ -55,8 +55,8 @@ data/scene/lodglobes/uranus/textures
data/scene/lodglobes/venus/textures
data/scene/mars/textures
data/scene/mercury/textures
data/scene/milkyway/textures
data/scene/milkyway-eso/textures
data/scene/milkyway/digitaluniverse/textures
data/scene/milkyway/eso/textures
data/scene/missions/dawn/ceres/textures
data/scene/missions/dawn/dawn/obj
data/scene/missions/dawn/dawn/textures
......@@ -98,12 +98,12 @@ data/scene/saturn/rhea/textures
data/scene/saturn/saturn/textures
data/scene/saturn/tethys/textures
data/scene/saturn/titan/textures
data/scene/stars/colorbv.cmap
data/scene/stars/speck
data/scene/stars/textures
data/scene/stars-denver/denver_colorbv.cmap
data/scene/stars-denver/speck
data/scene/stars-denver/textures
data/scene/stars/digitaluniverse/colorbv.cmap
data/scene/stars/digitaluniverse/speck
data/scene/stars/digitaluniverse/textures
data/scene/stars/denver/denver_colorbv.cmap
data/scene/stars/denver/speck
data/scene/stars/denver/textures
data/scene/sun/textures
data/scene/uranus/textures
data/scene/venus/textures
......
......@@ -42,14 +42,14 @@ return {
Camera = {
Focus = "Earth",
Position = {1, 0, 0},
Rotation = {0.250635, -0.028751, 0.879269, 0.404030},
Rotation = {0.250635, -0.028751, 0.879269, 0.404030},
},
Modules = {
"sun",
"earth",
"stars",
--"stars-denver",
"milkyway",
-- "milkyway-eso",
"stars/digitaluniverse",
-- "stars/denver",
"milkyway/digitaluniverse",
--"milkyway/eso",
}
}
......@@ -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",
......@@ -110,7 +110,7 @@ return {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Body = "EARTH",
Target = "EARTH",
Observer = "SUN"
},
Color = { 0.5, 0.8, 1.0 },
......
File moved
local zodiacs = {
"Cancer", "Taurus", "Pisces", "Aries", "Libra", "Aquarius", "Capricornus", "Scorpius",
"Virgo", "Sagittarius", "Gemini", "Leo"
}
return {
-- Stars module
{
......@@ -6,7 +11,8 @@ return {
Renderable = {
Type = "RenderableConstellationBounds",
File = "${OPENSPACE_DATA}/scene/constellationbounds/data/bound_20.dat",
ConstellationFile = "${OPENSPACE_DATA}/scene/constellationbounds/data/constellations.dat"
ConstellationFile = "${OPENSPACE_DATA}/scene/constellationbounds/data/constellations.dat",
-- ConstellationSelection = zodiacs
},
Transform = {
Rotation = {
......
......@@ -51,8 +51,10 @@ return {
"uranus",
"neptune",
"pluto",
"stars",
"milkyway",
"stars/digitaluniverse",
-- "stars/denver",
"milkyway/digitaluniverse",
--"milkyway/eso",
"missions/dawn"
}
}
......
-- Add folders to this list that contain .info files describing HiRISE patches
local mars_folders = {
-- Add a folder here whose contents will be automatically added to the Mars globe
}
function preInitialization()
--[[
The scripts in this function are executed after the scene is loaded but before the
......@@ -11,35 +16,76 @@ function preInitialization()
openspace.time.setTime(openspace.time.currentWallTime())
dofile(openspace.absPath('${SCRIPTS}/bind_common_keys.lua'))
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("SunMarker.renderable.Enabled", false)
openspace.setPropertyValue("EarthMarker.renderable.Enabled", false)
openspace.setPropertyValue("Constellation Bounds.renderable.Enabled", false)
openspace.setPropertyValue("MilkyWay.renderable.Transparency", 0.55)
openspace.setPropertyValue("MilkyWay.renderable.Segments", 50)
-- Toggle night texture, shading, atmosphere and water
openspace.bindKey("s",
helper.property.invert('Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.Enabled') ..
helper.property.invert('Earth.RenderableGlobe.PerformShading') ..
helper.property.invert('Earth.RenderableGlobe.Atmosphere') ..
helper.property.invert('Earth.RenderableGlobe.Layers.WaterMasks.MODIS_Water_Mask.Enabled'),
"Toggle night texture, shading, atmosphere, and water for Earth."
)
-- Toggle background
openspace.bindKey("b",
helper.property.invert('MilkyWay.renderable.Enabled') ..
helper.property.invert('Stars.renderable.Enabled'),
"Toggle background (Stars and Milkyway)."
)
openspace.bindKey("g",
helper.property.invert('MilkyWay.renderable.Enabled') ..
helper.property.invert('Stars.renderable.Enabled') ..
helper.property.invert('Earth.RenderableGlobe.Layers.NightLayers.Earth at Night 2012.Enabled') ..
helper.property.invert('Earth.RenderableGlobe.PerformShading') ..
helper.property.invert('Mars.RenderableGlobe.PerformShading') ..
helper.property.invert('Earth.RenderableGlobe.Atmosphere') ..
helper.property.invert('Earth.RenderableGlobe.Layers.WaterMasks.MODIS_Water_Mask.Enabled') ..
helper.property.invert('Moon.RenderableGlobe.Enabled') ..
helper.property.invert('Sun.renderable.Enabled'),
"Toogles background and shading mode on the Earth and Mars alongside visibility of the Moon and the Sun"
)
openspace.bindKey("h",
"openspace.setPropertyValue('*Trail.renderable.Enabled', false)",
"Disables visibility of the trails"
)
end
function postInitialization()
openspace.addVirtualProperty(
"BoolProperty",
"Show Trails",
"*Trail.renderable.enabled",
"*Trail.renderable.Enabled",
"Disable or enable all trails of the scene at the same time",
true,
nil,
nil
)
openspace.navigation.resetCameraDirection()
openspace.printInfo("Setting default values")
openspace.setPropertyValue("SunGlare.renderable.Enabled", false)
openspace.setPropertyValue("SunMarker.renderable.Enabled", false)
openspace.setPropertyValue("Constellation Bounds.renderable.Enabled", false)
openspace.setPropertyValue("Earth.RenderableGlobe.Atmosphere", true)
openspace.setPropertyValue("Earth.RenderableGlobe.Debug.LevelByProjectedAreaElseDistance", false)
openspace.setPropertyValue("Ecliptic Grid.renderable.Enabled", false)
openspace.setPropertyValue("Equatorial Grid.renderable.Enabled", false)
openspace.setPropertyValue("Galactic Grid.renderable.Enabled", false)
openspace.globebrowsing.goToGeo(58.5877, 16.1924, 20000000)
openspace.printInfo("Done setting default values")
-- Add the HiRISE patches described at the top of this file
for _, file in pairs(mars_folders) do
openspace.globebrowsing.addBlendingLayersFromDirectory(file, "Mars")
end
end
......@@ -48,23 +94,27 @@ return {
CommonFolder = "common",
Camera = {
Focus = "Earth",
Position = {505370268486.696167, 1089706179272.719116, -890259148524.319458},
Rotation = {0.250635, -0.028751, 0.879269, 0.404030},
Position = {0, 0, 0},
Rotation = {0.758797, 0.221490, -0.605693, -0.091135},
},
Modules = {
"sun",
"mercury",
"venus",
"earth",
"moon",
"mars",
"jupiter",
"saturn",
"uranus",
"neptune",
"stars",
-- "stars-denver",
"milkyway",
--"milkyway-eso",
"stars/digitaluniverse",
-- "stars/denver",
"milkyway/digitaluniverse",
--"milkyway/eso",
-- "satellites"
"constellationbounds",
"grids"
}
}
File moved
File moved
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment