mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-03 01:09:34 -05:00
Feature/mars moons (#1963)
* Add Mars moon models * wip commit * update size and roations for deimos and phobos * update asset for pr comments Co-authored-by: Malin E <malin.ejdbo@gmail.com>
This commit is contained in:
@@ -7,9 +7,7 @@ asset.require("./jupiter/europa/default_layers")
|
||||
asset.require("./jupiter/ganymede/default_layers")
|
||||
asset.require("./jupiter/io/default_layers")
|
||||
|
||||
asset.require("./mars/default_layers")
|
||||
asset.require("./mars/moons/layers/colorlayers/deimos_viking")
|
||||
asset.require("./mars/moons/layers/colorlayers/phobos_viking")
|
||||
asset.require('./mars/default_layers')
|
||||
|
||||
asset.require("./mercury/default_layers")
|
||||
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
local transforms = asset.require("../transforms")
|
||||
local transforms = asset.require('scene/solarsystem/planets/mars/transforms')
|
||||
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
||||
local sun = asset.require("scene/solarsystem/sun/sun")
|
||||
|
||||
local model = asset.syncedResource({
|
||||
Name = "Deimos Model",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "deimos_model",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local kernels = asset.syncedResource({
|
||||
Name = "Mars Spice Kernels",
|
||||
@@ -25,10 +34,17 @@ local Deimos = {
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableGlobe",
|
||||
Radii = { 15000, 12200, 11000 },
|
||||
SegmentsPerPatch = 90,
|
||||
Layers = {}
|
||||
Type = "RenderableModel",
|
||||
GeometryFile = model .. "/Deimos_1_1000.glb",
|
||||
ModelScale = 'Kilometer',
|
||||
RotationVector = { 180, 0, 180 },
|
||||
AmbientIntensity = 0.02,
|
||||
SpecularIntensity = 0.0,
|
||||
LightSources = {
|
||||
sun.LightSource
|
||||
},
|
||||
PerformShading = true,
|
||||
DisableFaceCulling = true
|
||||
},
|
||||
Tag = { "moon_solarSystem", "moon_terrestrial", "moon_mars" },
|
||||
GUI = {
|
||||
@@ -74,11 +90,10 @@ asset.export(Deimos)
|
||||
asset.export(DeimosTrail)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Deimos",
|
||||
Version = "1.1",
|
||||
Description = [[ RenderableGlobe and Trail for Deimos.]],
|
||||
Version = "1.0",
|
||||
Description = [[ RenderableModel and Trail for Deimos.]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
local transforms = asset.require('../transforms')
|
||||
|
||||
local kernels = asset.syncedResource({
|
||||
Name = "Mars Spice Kernels",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "mars_kernels",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
|
||||
local DeimosGlobe = {
|
||||
Identifier = "Deimos_Globe",
|
||||
Parent = transforms.MarsBarycenter.Identifier,
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "SpiceRotation",
|
||||
SourceFrame = "IAU_DEIMOS",
|
||||
DestinationFrame = "GALACTIC",
|
||||
Kernels = kernels .. "mar097.bsp"
|
||||
},
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "DEIMOS",
|
||||
Observer = "MARS BARYCENTER",
|
||||
Kernels = kernels .. "mar097.bsp"
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableGlobe",
|
||||
Radii = { 7500, 6100, 5200 },
|
||||
--Radius source
|
||||
--https://sci.esa.int/documents/35171/36506/1567259108230-5-ESLAB46-Day2-Rosenblatt.pdf
|
||||
SegmentsPerPatch = 90,
|
||||
Layers = {}
|
||||
},
|
||||
Tag = { "moon_solarSystem", "moon_terrestrial", "moon_mars" },
|
||||
GUI = {
|
||||
Name = "Deimos_Globe",
|
||||
Path = "/Solar System/Planets/Mars",
|
||||
Description = [[One of two moons of Mars.]]
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(DeimosGlobe)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(DeimosGlobe)
|
||||
end)
|
||||
|
||||
asset.export(DeimosGlobe)
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Deimos Globe",
|
||||
Version = "1.0",
|
||||
Description = [[ RenderableGlobe for Deimos.]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license",
|
||||
Identifiers = {"Deimos"}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
local globeIdentifier = asset.require("../../deimos").Deimos.Identifier
|
||||
local globeIdentifier = asset.require("./../../deimos_globe").Deimos_Globe.Identifier
|
||||
|
||||
local layer = {
|
||||
Identifier = "Deimos_Global_Mosaic_USGS",
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
local globeIdentifier = asset.require("../../phobos").Phobos.Identifier
|
||||
local globeIdentifier = asset.require("./../../phobos_globe").Phobos_Globe.Identifier
|
||||
|
||||
local layer = {
|
||||
Identifier = "Phobos_Global_Shaded_Relief_USGS",
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
local transforms = asset.require("../transforms")
|
||||
local transforms = asset.require('scene/solarsystem/planets/mars/transforms')
|
||||
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
||||
local sun = asset.require("scene/solarsystem/sun/sun")
|
||||
|
||||
local model = asset.syncedResource({
|
||||
Name = "Phobos Model",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "phobos_model",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local kernels = asset.syncedResource({
|
||||
Name = "Mars Spice Kernels",
|
||||
@@ -7,6 +16,7 @@ local kernels = asset.syncedResource({
|
||||
Version = 1
|
||||
})
|
||||
|
||||
|
||||
local Phobos = {
|
||||
Identifier = "Phobos",
|
||||
Parent = transforms.MarsBarycenter.Identifier,
|
||||
@@ -25,10 +35,17 @@ local Phobos = {
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableGlobe",
|
||||
Radii = { 27000, 22000, 18000 },
|
||||
SegmentsPerPatch = 90,
|
||||
Layers = {}
|
||||
Type = "RenderableModel",
|
||||
GeometryFile = model .. "/Phobos_1_1000.glb",
|
||||
ModelScale = 'Kilometer',
|
||||
RotationVector = { 90, 0, 90 },
|
||||
AmbientIntensity = 0.02,
|
||||
SpecularIntensity = 0.0,
|
||||
LightSources = {
|
||||
sun.LightSource
|
||||
},
|
||||
PerformShading = true,
|
||||
DisableFaceCulling = true
|
||||
},
|
||||
Tag = { "moon_solarSystem", "moon_terrestrial", "moon_mars" },
|
||||
GUI = {
|
||||
@@ -46,7 +63,8 @@ local PhobosTrail = {
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "PHOBOS",
|
||||
Observer = "MARS BARYCENTER"
|
||||
Observer = "MARS BARYCENTER",
|
||||
Kernels = kernels .. "mar097.bsp"
|
||||
},
|
||||
Color = { 1.0, 0.605, 0.420 },
|
||||
Period = 0.31891023,
|
||||
@@ -77,8 +95,8 @@ asset.export(PhobosTrail)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Phobos",
|
||||
Version = "1.1",
|
||||
Description = [[ RenderableGlobe and Trail for Phobos.]],
|
||||
Version = "1.0",
|
||||
Description = [[ RenderableModel and Trail for Phobos.]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
local transforms = asset.require('../transforms')
|
||||
|
||||
local kernels = asset.syncedResource({
|
||||
Name = "Mars Spice Kernels",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "mars_kernels",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
|
||||
local PhobosGlobe = {
|
||||
Identifier = "Phobos_Globe",
|
||||
Parent = transforms.MarsBarycenter.Identifier,
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "SpiceRotation",
|
||||
SourceFrame = "IAU_PHOBOS",
|
||||
DestinationFrame = "GALACTIC",
|
||||
Kernels = kernels .. "mar097.bsp"
|
||||
},
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = "PHOBOS",
|
||||
Observer = "MARS BARYCENTER",
|
||||
Kernels = kernels .. "mar097.bsp"
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableGlobe",
|
||||
Radii = { 13030, 11400, 9140 },
|
||||
--Radius source
|
||||
--https://naif.jpl.nasa.gov/pub/naif/generic_kernels/dsk/satellites/willner_etal_phobos.pdf
|
||||
SegmentsPerPatch = 90,
|
||||
Layers = {}
|
||||
},
|
||||
Tag = { "moon_solarSystem", "moon_terrestrial", "moon_mars" },
|
||||
GUI = {
|
||||
Name = "Phobos_Globe",
|
||||
Path = "/Solar System/Planets/Mars",
|
||||
Description = [[One of two moons of Mars.]]
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(PhobosGlobe)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(PhobosGlobe)
|
||||
end)
|
||||
|
||||
asset.export(PhobosGlobe)
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Phobos Globe",
|
||||
Version = "1.0",
|
||||
Description = [[ RenderableGlobe for Phobos.]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license",
|
||||
Identifiers = {"Phobos"}
|
||||
}
|
||||
Reference in New Issue
Block a user