Make the Sun asset export the Sun as a light source (closes #1870)

This commit is contained in:
Alexander Bock
2022-03-19 13:56:16 +01:00
parent 86dcff62c4
commit 6f25dd31e5
29 changed files with 351 additions and 366 deletions
+6 -31
View File
@@ -1,4 +1,4 @@
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local transforms = asset.require("scene/solarsystem/planets/earth/transforms")
local model = asset.syncedResource({
@@ -27,12 +27,7 @@ local animationLoop = {
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -61,12 +56,7 @@ local animationLoopInf = {
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -95,12 +85,7 @@ local animationOnce = {
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -129,12 +114,7 @@ local animationBounceInf = {
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -163,12 +143,7 @@ local animationBounce = {
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
+2 -7
View File
@@ -1,4 +1,4 @@
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local transforms = asset.require("scene/solarsystem/planets/earth/transforms")
local generic_action = {
@@ -34,12 +34,7 @@ local obj = {
GeometryFile = model .. "BoxAnimated.glb",
ModelScale = 1.0,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -1,4 +1,4 @@
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local transforms = asset.require("scene/solarsystem/planets/earth/transforms")
local model = asset.syncedResource({
@@ -22,12 +22,7 @@ local model = {
GeometryFile = model .. "BoxAnimated.glb",
ModelScale = 3E7,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true,
@@ -1,20 +1,6 @@
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local transforms = asset.require("./transforms")
local LIGHTS = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
local sync = asset.syncedResource({
Name = "Orion Nebula Model",
Type = "HttpSynchronization",
@@ -77,7 +63,14 @@ local OrionNebulaModel = {
DiffuseIntensity = 1.0,
--PerformShading = false,
RotationVector = { 0.000000, 22.300000, 0.000000 },
LightSources = LIGHTS;
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Orion Nebula Model",
@@ -105,7 +98,14 @@ local OrionNebulaShocksModel = {
DiffuseIntensity = 1.0,
--PerformShading = false,
RotationVector = { 0.000000, 22.300000, 0.000000 },
LightSources = LIGHTS;
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Orion Nebula Shocks",
@@ -134,7 +134,14 @@ local OrionNebulaProplydsModel = {
DiffuseIntensity = 1.0,
--PerformShading = false,
RotationVector = { 0.000000, 22.300000, 0.000000 },
LightSources = LIGHTS;
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Orion Nebula Proplyds",
@@ -1,4 +1,4 @@
local sun_transforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local moon_transforms = asset.require("scene/solarsystem/planets/earth/moon/moon")
local descentKeyframes = asset.require("./lem_descent.asset")
@@ -68,12 +68,7 @@ local Apollo11Model = {
Type = "RenderableModel",
GeometryFile = models .. "Apollo_CSM_shrunk_rotated_xy_double_size.obj",
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
@@ -197,12 +192,7 @@ local Apollo11LemDescentModel = {
SpecularIntensity = 0.0,
RotationVector = { 273.750,28.0,309.85 },
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
@@ -235,12 +225,7 @@ local Apollo11LemLandedModel = {
SpecularIntensity = 0.0,
RotationVector = { 273.750,28.0,309.85 },
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
@@ -1,5 +1,4 @@
-- a11_lem.asset
local sun_transforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local moon_asset = asset.require("scene/solarsystem/planets/earth/moon/moon")
@@ -43,12 +42,7 @@ local Apollo11LemModel = {
GeometryFile = lem_model .. "LM-2_ver2clean.obj",
RotationVector = { 91.044090, 171.229706, 111.666664 },
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
@@ -1,5 +1,5 @@
local moon_transforms = asset.require("scene/solarsystem/planets/earth/moon/moon")
local sun_transforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
asset.require("spice/base")
local models = asset.syncedResource({
@@ -19,22 +19,6 @@ local kernels = asset.require("scene/solarsystem/missions/apollo/15/kernels").ke
-- Version = 1
-- })
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
-- {
-- Identifier = "Camera",
-- Type = "CameraLightSource",
-- Intensity = 0.5,
-- Enabled = false
-- }
}
local Apollo15 = {
Identifier = "Apollo15",
Parent = moon_transforms.Moon.Identifier,
@@ -57,12 +41,7 @@ local Apollo15 = {
GeometryFile = models .. "ApolloCSM.osmodel",
ModelScale = 0.0001,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -1,4 +1,4 @@
local sun_transforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local moon_asset = asset.require("scene/solarsystem/planets/earth/moon/moon")
local models = asset.syncedResource({
@@ -8,20 +8,6 @@ local models = asset.syncedResource({
Version = 2
})
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
local Station2Boulder1Holder = {
Identifier = "Station_2_Boulder1",
Parent = moon_asset.Moon.Identifier,
@@ -54,7 +40,14 @@ local Station2Boulder1Model = {
Type = "RenderableModel",
GeometryFile = models .. "b1-v2.obj",
RotationVector = { 243.243256 ,206.270264, 309.677429 },
LightSources = LightSources,
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
},
PerformShading = false,
DisableFaceCulling = true
},
@@ -96,7 +89,14 @@ local Station2Boulder2Model = {
Type = "RenderableModel",
GeometryFile = models .. "b2model.obj",
RotationVector = { 66.162155, 7.783780, 114.193550 },
LightSources = LightSources,
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
},
PerformShading = false,
DisableFaceCulling = true
},
@@ -138,7 +138,14 @@ local Station2Boulder3Model = {
Type = "RenderableModel",
GeometryFile = models .. "b3model.obj",
RotationVector = { 161.513519 ,243.243256, 65.806450 },
LightSources = LightSources,
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
},
PerformShading = false,
DisableFaceCulling = true
},
@@ -1,4 +1,4 @@
local sun_transforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local moon_asset = asset.require("scene/solarsystem/planets/earth/moon/moon")
local models = asset.syncedResource({
@@ -8,20 +8,6 @@ local models = asset.syncedResource({
Version = 2
})
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
local Station6Frag1Holder = {
Identifier = "Station_6_Fragment1",
@@ -65,7 +51,14 @@ local Station6Frag1Model = {
Type = "RenderableModel",
GeometryFile = models .. "A17-S6-frag1.obj",
RotationVector = { 235.909088,165.000000,286.299194 },
LightSources = LightSources,
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
},
PerformShading = false,
DisableFaceCulling = true
},
@@ -108,7 +101,14 @@ local Station6Frag2Model = {
Type = "RenderableModel",
GeometryFile = models .. "station6_boulder_frag2.obj",
RotationVector = { 336.959991,210.239990,325.984253 },
LightSources = LightSources,
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
},
PerformShading = false,
DisableFaceCulling = true,
},
@@ -139,7 +139,14 @@ local Station6Frag3Model = {
Type = "RenderableModel",
GeometryFile = models .. "station6_boulder_frag3.obj",
RotationVector = { 293.181824,255.000000,4.090910 },
LightSources = LightSources,
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
},
PerformShading = false,
DisableFaceCulling = true
},
@@ -1,4 +1,4 @@
local sun_transforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local moon_asset = asset.require("scene/solarsystem/planets/earth/moon/moon")
local models = asset.syncedResource({
@@ -8,20 +8,6 @@ local models = asset.syncedResource({
Version = 2
})
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
local Station7BoulderHolder = {
Identifier = "Station_7_Boulder",
Parent = moon_asset.Moon.Identifier,
@@ -54,7 +40,14 @@ local Station7BoulderModel = {
Type = "RenderableModel",
GeometryFile = models .. "b7model.obj",
RotationVector = { 1.945950,274.378387,212.903214 },
LightSources = LightSources,
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
},
PerformShading = false,
DisableFaceCulling = true
},
@@ -1,4 +1,4 @@
local sun_transforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local moon_asset = asset.require("scene/solarsystem/planets/earth/moon/moon")
local model = asset.syncedResource({
@@ -42,12 +42,7 @@ local Apollo17LemModel = {
SpecularIntensity = 0.0,
RotationVector = { 110.255219,171.229706,126.666664 },
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
@@ -1,5 +1,5 @@
local earth_transforms = asset.require("scene/solarsystem/planets/earth/transforms")
local sun_transforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local kernels = asset.require("./kernels").kernels
local models = asset.syncedResource({
@@ -53,12 +53,7 @@ local Apollo8LaunchModel = {
GeometryFile = models .. "ApolloCSM.osmodel",
ModelScale = 0.0001,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -1,5 +1,5 @@
local earth_transforms = asset.require("scene/solarsystem/planets/earth/transforms")
local sun_transforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local kernels = asset.require("./kernels").kernels
local models = asset.syncedResource({
@@ -65,12 +65,7 @@ local Apollo8Model = {
GeometryFile = models .. "ApolloCSM.osmodel",
ModelScale = 0.0001,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sun_transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -1,5 +1,5 @@
local transforms = asset.require("scene/solarsystem/sun/transforms")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local kernels = asset.syncedResource({
@@ -622,12 +622,7 @@ local KernelFiles = {
}
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
@@ -1,5 +1,5 @@
local transforms = asset.require("./transforms")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local model = asset.syncedResource({
Name = "Gaia Model",
@@ -32,12 +32,7 @@ local Gaia = {
Body = "GAIA",
GeometryFile = model .. "gaia.obj",
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 0.3
},
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
@@ -1,5 +1,5 @@
asset.require("spice/base")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local mars = asset.require("scene/solarsystem/planets/mars/mars")
local models = asset.syncedResource({
@@ -31,12 +31,7 @@ local RotationMatrix = {
}
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
sun.LightSource,
{
Type = "SceneGraphLightSource",
Identifier = "Mars",
@@ -1,5 +1,5 @@
local transforms = asset.require("scene/solarsystem/planets/jupiter/transforms")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local model = asset.syncedResource({
@@ -152,12 +152,7 @@ local Juno = {
GeometryFile = model .. "Juno.obj",
ModelTransform = RotationMatrix,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
@@ -1,3 +1,4 @@
local sun = asset.require("scene/solarsystem/sun/sun")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local transforms = asset.require("./transforms")
asset.require("spice/base")
@@ -71,12 +72,7 @@ local JWSTModel = {
AnimationTimeScale = "Millisecond",
AnimationMode = "Once",
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -1,3 +1,4 @@
local sun = asset.require("scene/solarsystem/sun/sun")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local mercuryTransforms = asset.require("scene/solarsystem/planets/mercury/transforms")
@@ -56,21 +57,6 @@ local RotationMatrix = {
0, 1, 0
}
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
local Messenger = {
Identifier = "Messenger",
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
@@ -105,7 +91,14 @@ local MessengerProbeBlack = {
Type = "RenderableModel",
GeometryFile = models .. "MessengerProbe_black.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "MessengerProbe Black",
@@ -120,7 +113,14 @@ local MessengerProbeFoil = {
Type = "RenderableModel",
GeometryFile = models .. "MessengerProbe_foil.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "MessengerProbe foil",
@@ -135,7 +135,14 @@ local MessengerProbeHeatShield = {
Type = "RenderableModel",
GeometryFile = models .. "MessengerProbe_heatShield.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "MessengerProbe Heat Sheild",
@@ -150,7 +157,14 @@ local MessengerProbeMetal = {
Type = "RenderableModel",
GeometryFile = models .. "MessengerProbe_metal.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "MessengerProbe Metal",
@@ -165,7 +179,14 @@ local MessengerProbePanels = {
Type = "RenderableModel",
GeometryFile = models .. "MessengerProbe_panels.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "MessengerProbe Panels",
@@ -1,5 +1,5 @@
local transforms = asset.require("./transforms")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local models = asset.syncedResource({
Name = "New Horizons Model",
@@ -19,12 +19,7 @@ local NewHorizons = {
DiffuseIntensity = 1.0,
SpecularIntensity = 1.0,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
}
},
GUI = {
@@ -1,5 +1,5 @@
local transforms = asset.require("./transforms")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local models = asset.syncedResource({
Name = "Bennu Models",
@@ -10,15 +10,6 @@ local models = asset.syncedResource({
local BENNU_BODY = "2101955"
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
}
local Bennu = {
Identifier = "Bennu",
Parent = transforms.BennuBarycenter.Identifier,
@@ -34,7 +25,9 @@ local Bennu = {
Type = "RenderableModel",
Body = BENNU_BODY,
GeometryFile = models .. "Bennu_v20_200k_an.obj",
LightSources = LightSources,
LightSources = {
sun.LightSource
},
SpecularIntensity = 0.0
},
GUI = {
@@ -1,4 +1,5 @@
local transforms = asset.require("./transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local earthTransforms = asset.require("scene/solarsystem/planets/earth/transforms")
@@ -13,21 +14,6 @@ local models = asset.syncedResource({
local BENNU_BODY = "2101955"
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
local OsirisRex = {
Identifier = "OsirisRex",
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
@@ -48,7 +34,14 @@ local OsirisRex = {
Type = "RenderableModel",
Body = "OSIRIS-REX",
GeometryFile = models .. "orx_base_resized_12_sep_2016.obj",
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "OSIRIS REx",
@@ -74,7 +67,14 @@ local PolyCam = {
Type = "RenderableModel",
Body = "OSIRIS-REX",
GeometryFile = models .. "orx_polycam_resized_12_sep_2016.obj",
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "OCAMS POLYCAM",
@@ -89,7 +89,14 @@ local Rexis = {
Type = "RenderableModel",
Body = "OSIRIS-REX",
GeometryFile = models .. "orx_rexis_resized_12_sep_2016.obj",
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
Transform = {
Translation = {
@@ -1,22 +1,8 @@
local trail = asset.require("./trail")
local marsTransforms = asset.require("scene/solarsystem/planets/mars/transforms")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
-- asset.require("./fov")
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
local models = asset.syncedResource({
Name = "Mars 2020 Kernels",
Type = "HttpSynchronization",
@@ -53,7 +39,14 @@ local Body = {
Type = "RenderableModel",
Body = "MARS SCIENCE LABORATORY",
GeometryFile = models .. "Perseverance.obj",
LightSources = LightSources,
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
},
PerformShading = false,
RotationVector = {65.940000,201.389999,263.980011}
},
@@ -1,4 +1,4 @@
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local modelFolder = asset.syncedResource({
Name = "Pioneer 10/11 Models",
@@ -11,12 +11,7 @@ local ModelRenderable = {
Type = "RenderableModel",
GeometryFile = modelFolder .. "pioneer.fbx",
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
@@ -35,4 +30,4 @@ asset.meta = {
Author = "NASA",
URL = "https://nasa3d.arc.nasa.gov/detail/eoss-pioneer",
License = "NASA"
}
}
@@ -1,3 +1,4 @@
local sun = asset.require("scene/solarsystem/sun/sun")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local transforms = asset.require("./67p")
@@ -65,20 +66,6 @@ local RosettaKernels = {
kernels .. "ROS_CGS_RSOC_V03.TPC"
}
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
local RotationMatrix = {
0, 1, 0,
0, 0, 1,
@@ -130,7 +117,14 @@ local RosettaBlackFoil = {
Body = "ROSETTA",
GeometryFile = models .. "black_foil.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Rosetta Model Part Black Foil",
@@ -146,7 +140,14 @@ local RosettaBlackParts = {
Body = "ROSETTA",
GeometryFile = models .. "black_parts.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Rosetta Model Part Black Parts",
@@ -162,7 +163,14 @@ local RosettaDish = {
Body = "ROSETTA",
GeometryFile = models .. "dish.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Rosetta Model Part Dish",
@@ -178,7 +186,14 @@ local RosettaParts = {
Body = "ROSETTA",
GeometryFile = models .. "parts.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Rosetta Model Part Parts",
@@ -194,7 +209,14 @@ local RosettaSilverFoil = {
Body = "ROSETTA",
GeometryFile = models .. "silver_foil.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Rosetta Model Part Silver Foil",
@@ -210,7 +232,14 @@ local RosettaVents = {
Body = "ROSETTA",
GeometryFile = models .. "vents.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Rosetta Model Part Vents",
@@ -226,7 +255,14 @@ local RosettaWingA = {
Body = "ROSETTA",
GeometryFile = models .."wingA.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Rosetta Model Part Wing A",
@@ -242,7 +278,14 @@ local RosettaWingB = {
Body = "ROSETTA",
GeometryFile = models .. "wingB.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Rosetta Model Part Wing B",
@@ -258,7 +301,14 @@ local RosettaYellowFoil = {
Body = "ROSETTA",
GeometryFile = models .. "yellow_foil.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Rosetta Model Part Yellow Foil",
@@ -303,7 +353,14 @@ local PhilaeFoil = {
Body = "ROSETTA",
GeometryFile = models .. "lander_foil.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Philae Model Part Foil",
@@ -319,7 +376,14 @@ local PhilaeLids = {
Body = "ROSETTA",
GeometryFile = models .. "lander_lids.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Philae Model Part Lids",
@@ -335,7 +399,14 @@ local PhilaeParts = {
Body = "ROSETTA",
GeometryFile = models .. "lander_parts.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Philae Model Part Parts",
@@ -351,7 +422,14 @@ local PhilaeSolarPanels = {
Body = "ROSETTA",
GeometryFile = models .. "lander_solarp.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Philae Model Parts Solar Panels",
@@ -1,3 +1,4 @@
local sun = asset.require("scene/solarsystem/sun/sun")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local models = asset.syncedResource({
@@ -31,20 +32,6 @@ local RotationMatrix = {
0, -1, 0
}
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
local Voyager1 = {
Identifier = "Voyager_1",
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
@@ -79,7 +66,14 @@ local Voyager1Main = {
Type = "RenderableModel",
GeometryFile = models .. "voyager-main.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Voyager 1 Main",
@@ -94,7 +88,14 @@ local Voyager1Antenna = {
Type = "RenderableModel",
GeometryFile = models .. "voyager-antenna.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Voyager 1 Antenna",
@@ -1,3 +1,4 @@
local sun = asset.require("scene/solarsystem/sun/sun")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
@@ -35,20 +36,6 @@ local RotationMatrix = {
}
local LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
},
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
local Voyager2 = {
Identifier = "Voyager_2",
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
@@ -83,7 +70,14 @@ local Voyager2Main = {
Type = "RenderableModel",
GeometryFile = models .. "voyager-main.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Voyager 2 Main",
@@ -98,7 +92,14 @@ local Voyager2Antenna = {
Type = "RenderableModel",
GeometryFile = models .. "voyager-antenna.obj",
ModelTransform = RotationMatrix,
LightSources = LightSources
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Voyager 2 Antenna",
@@ -1,6 +1,6 @@
local satelliteHelper = asset.require("util/tle_helper")
local transforms = asset.require("scene/solarsystem/planets/earth/transforms")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local url = "http://celestrak.com/satcat/tle.php?CATNR=25544"
local identifier = "ISS"
@@ -62,12 +62,7 @@ local initializeAndAddNodes = function()
GeometryFile = models .. "ISS.fbx",
ModelScale = "Centimeter",
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -44,6 +44,13 @@ local SunLabel = {
}
}
local LightSource = {
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = transforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Sun)
openspace.addSceneGraphNode(SunLabel)
@@ -56,6 +63,7 @@ end)
asset.export(Sun)
asset.export(SunLabel)
asset.export("LightSource", LightSource)