mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
Merge branch 'master' into thesis/2025/black-hole
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
-- Basic
|
||||
-- Creates a screenspace image that shows a spherical grid as an example for any
|
||||
-- [Renderable](#renderable) that can be displayed.
|
||||
|
||||
local Object = {
|
||||
Type = "ScreenSpaceRenderableRenderable",
|
||||
Identifier = "ScreenSpaceRenderableRenderable_Example",
|
||||
Renderable = {
|
||||
Type = "RenderableSphericalGrid",
|
||||
Opacity = 1.0,
|
||||
Color = { 0.3, 0.84, 1.0 },
|
||||
LineWidth = 2.0
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addScreenSpaceRenderable(Object)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeScreenSpaceRenderable(Object)
|
||||
end)
|
||||
@@ -0,0 +1,24 @@
|
||||
-- Axes
|
||||
-- Creates a screenspace image that renders three Cartesian axes into the screen space
|
||||
-- window. This example also modifies the original camera position to give an oblique view
|
||||
-- onto the axes and increases the field of view of the camera to a wider degree. We also
|
||||
-- set the background color to be fully opaque to make it easier to see the axes.
|
||||
|
||||
local Object = {
|
||||
Type = "ScreenSpaceRenderableRenderable",
|
||||
Identifier = "ScreenSpaceRenderableRenderable_Example_Axes",
|
||||
Renderable = {
|
||||
Type = "RenderableCartesianAxes"
|
||||
},
|
||||
BackgroundColor = { 0.0, 0.0, 0.0, 1.0 },
|
||||
CameraPosition = { 1.0, 1.0, 1.0 },
|
||||
CameraFov = 80.0
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addScreenSpaceRenderable(Object)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeScreenSpaceRenderable(Object)
|
||||
end)
|
||||
@@ -0,0 +1,41 @@
|
||||
-- Model Distance
|
||||
-- Creates a screen space window into which 3D model of the Eiffel tower is rendered. As
|
||||
-- the objects are rendered in meter scale, and the Eiffel tower is about 300m tall, we
|
||||
-- place the camera at a great distance to be able to see the entire Eiffel tower at the
|
||||
-- same time.
|
||||
|
||||
-- Download the model file for the Eiffel tower
|
||||
local modelFolder = asset.resource({
|
||||
Name = "Scale Eiffel Tower",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "scale_model_eiffel_tower",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local Object = {
|
||||
Type = "ScreenSpaceRenderableRenderable",
|
||||
Identifier = "ScreenSpaceRenderableRenderable_Example_ModelDistance",
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
GeometryFile = modelFolder .. "eiffeltower.osmodel",
|
||||
RotationVector = { 0.0, 45.0, 0.0 },
|
||||
LightSources = {
|
||||
{
|
||||
Identifier = "Camera",
|
||||
Type = "CameraLightSource",
|
||||
Intensity = 5.0
|
||||
}
|
||||
}
|
||||
},
|
||||
Scale = 1.25,
|
||||
CameraPosition = { 0.0, 3500.0, 9000.0 },
|
||||
CameraCenter = { 0.0, 2750.0, 0.0 }
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addScreenSpaceRenderable(Object)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeScreenSpaceRenderable(Object)
|
||||
end)
|
||||
@@ -0,0 +1,47 @@
|
||||
-- Model
|
||||
-- Creates a screen space window into which 3D model of the Eiffel tower is rendered. As
|
||||
-- the objects are rendered in meter scale, and the Eiffel tower is about 300m tall, we
|
||||
-- both shrink the rendering to make the entire model fit into the view and also modify
|
||||
-- the position of the camera.
|
||||
|
||||
-- Download the model file for the Eiffel tower
|
||||
local modelFolder = asset.resource({
|
||||
Name = "Scale Eiffel Tower",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "scale_model_eiffel_tower",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local Object = {
|
||||
Type = "ScreenSpaceRenderableRenderable",
|
||||
Identifier = "ScreenSpaceRenderableRenderable_Example_Model",
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 0.0002
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
GeometryFile = modelFolder .. "eiffeltower.osmodel",
|
||||
RotationVector = { 0.0, 45.0, 0.0 },
|
||||
LightSources = {
|
||||
{
|
||||
Identifier = "Camera",
|
||||
Type = "CameraLightSource",
|
||||
Intensity = 5.0
|
||||
}
|
||||
}
|
||||
},
|
||||
Scale = 1.25,
|
||||
CameraPosition = { 0.0, 1.0, 2.0 },
|
||||
CameraCenter = { 0.0, 0.5, 0.0 }
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addScreenSpaceRenderable(Object)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeScreenSpaceRenderable(Object)
|
||||
end)
|
||||
@@ -42,8 +42,7 @@ local LightPollutionSphere = {
|
||||
Orientation = "Inside",
|
||||
MirrorTexture = true,
|
||||
FadeOutThreshold = 1.00,
|
||||
RenderBinMode = "PostDeferredTransparent",
|
||||
Enabled = asset.enabled
|
||||
RenderBinMode = "PostDeferredTransparent"
|
||||
},
|
||||
GUI = {
|
||||
Name = "Light Pollution Sphere",
|
||||
|
||||
@@ -23,7 +23,9 @@ local Object = {
|
||||
Texture = textures .. "mwHalpha-f.png",
|
||||
Orientation = "Inside",
|
||||
MirrorTexture = true,
|
||||
FadeOutThreshold = 0.025
|
||||
FadeOutThreshold = 0.025,
|
||||
BlendingOption = "Additive",
|
||||
DisableDepth = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Hydrogen Alpha",
|
||||
|
||||
@@ -30,7 +30,9 @@ local COBE = {
|
||||
Texture = textures .. "COBErect.png",
|
||||
Orientation = "Both",
|
||||
MirrorTexture = true,
|
||||
FadeInThreshold = 0.4
|
||||
FadeInThreshold = 0.4,
|
||||
BlendingOption = "Additive",
|
||||
DisableDepth = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "1990 COBE CMB",
|
||||
@@ -62,7 +64,9 @@ local WMAP = {
|
||||
Texture = textures .. "wmap_ilc_7yr_v4_200uK_RGB_sos.png",
|
||||
Orientation = "Both",
|
||||
MirrorTexture = true,
|
||||
FadeInThreshold = 0.4
|
||||
FadeInThreshold = 0.4,
|
||||
BlendingOption = "Additive",
|
||||
DisableDepth = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "2003 WMAP CMB",
|
||||
@@ -93,7 +97,9 @@ local Planck = {
|
||||
Texture = textures .. "cmb4k.jpg",
|
||||
Orientation = "Both",
|
||||
MirrorTexture = true,
|
||||
FadeInThreshold = 0.4
|
||||
FadeInThreshold = 0.4,
|
||||
BlendingOption = "Additive",
|
||||
DisableDepth = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "2013 Planck CMB",
|
||||
|
||||
@@ -27,7 +27,9 @@ local PlanckMultiverse1 = {
|
||||
Texture = textures .. "cmb4k.jpg",
|
||||
Orientation = "Both",
|
||||
MirrorTexture = true,
|
||||
FadeInThreshold = 0.4
|
||||
FadeInThreshold = 0.4,
|
||||
BlendingOption = "Additive",
|
||||
DisableDepth = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Planck Multiverse 1",
|
||||
@@ -56,7 +58,9 @@ local PlanckMultiverse2 = {
|
||||
Texture = textures .. "cmb4k.jpg",
|
||||
Orientation = "Both",
|
||||
MirrorTexture = true,
|
||||
FadeInThreshold = 0.4
|
||||
FadeInThreshold = 0.4,
|
||||
BlendingOption = "Additive",
|
||||
DisableDepth = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Planck Multiverse 2",
|
||||
@@ -85,7 +89,9 @@ local PlanckMultiverse3 = {
|
||||
Texture = textures .. "cmb4k.jpg",
|
||||
Orientation = "Both",
|
||||
MirrorTexture = true,
|
||||
FadeInThreshold = 0.4
|
||||
FadeInThreshold = 0.4,
|
||||
BlendingOption = "Additive",
|
||||
DisableDepth = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Planck Multiverse 3",
|
||||
@@ -114,7 +120,9 @@ local PlanckMultiverse4 = {
|
||||
Texture = textures .. "cmb4k.jpg",
|
||||
Orientation = "Both",
|
||||
MirrorTexture = true,
|
||||
FadeInThreshold = 0.4
|
||||
FadeInThreshold = 0.4,
|
||||
BlendingOption = "Additive",
|
||||
DisableDepth = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Planck Multiverse 4",
|
||||
|
||||
@@ -22,7 +22,9 @@ local Object = {
|
||||
Texture = textures .. "eso0932a_blend.png",
|
||||
Orientation = "Inside",
|
||||
MirrorTexture = true,
|
||||
FadeOutThreshold = 0.01
|
||||
FadeOutThreshold = 0.01,
|
||||
BlendingOption = "Additive",
|
||||
DisableDepth = true
|
||||
},
|
||||
GUI = {
|
||||
Name = "Milky Way (ESO)",
|
||||
|
||||
221
data/assets/util/calibration.asset
Normal file
221
data/assets/util/calibration.asset
Normal file
@@ -0,0 +1,221 @@
|
||||
local textures = asset.resource({
|
||||
Name = "Calibration Images",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "calibration_images",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local Distance = 1000
|
||||
local Size = 1000
|
||||
|
||||
|
||||
local Center = {
|
||||
Identifier = "Calibration",
|
||||
GUI = {
|
||||
Name = "Calibration",
|
||||
Description = "The centerpoint of the calibration cube",
|
||||
Path = "/Calibration"
|
||||
}
|
||||
}
|
||||
|
||||
local Front = {
|
||||
Identifier = "Calibration_Front",
|
||||
Parent = Center.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "StaticTranslation",
|
||||
Position = { 0, Distance, 0 }
|
||||
},
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = { math.pi / 2.0, 0.0, 0.0 }
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderablePlaneImageLocal",
|
||||
Enabled = asset.enabled,
|
||||
Size = Size,
|
||||
Origin = "Center",
|
||||
Texture = textures .. "test-pattern-0.png"
|
||||
},
|
||||
GUI = {
|
||||
Name = "Calibration (Front)",
|
||||
Description = "The front face of the calibration cube",
|
||||
Path = "/Calibration"
|
||||
}
|
||||
}
|
||||
|
||||
local Right = {
|
||||
Identifier = "Calibration_Right",
|
||||
Parent = Center.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "StaticTranslation",
|
||||
Position = { Distance, 0, 0 }
|
||||
},
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = { math.pi / 2.0, 0.0, -math.pi / 2.0 }
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderablePlaneImageLocal",
|
||||
Enabled = asset.enabled,
|
||||
Size = Size,
|
||||
Origin = "Center",
|
||||
Texture = textures .. "test-pattern-1.png"
|
||||
},
|
||||
GUI = {
|
||||
Name = "Calibration (Right)",
|
||||
Description = "The right face of the calibration cube",
|
||||
Path = "/Calibration"
|
||||
}
|
||||
}
|
||||
|
||||
local Back = {
|
||||
Identifier = "Calibration_Back",
|
||||
Parent = Center.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "StaticTranslation",
|
||||
Position = { 0, -Distance, 0 }
|
||||
},
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = { -math.pi / 2.0, math.pi, 0.0 }
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderablePlaneImageLocal",
|
||||
Enabled = asset.enabled,
|
||||
Size = Size,
|
||||
Origin = "Center",
|
||||
Texture = textures .. "test-pattern-2.png"
|
||||
},
|
||||
GUI = {
|
||||
Name = "Calibration (Back)",
|
||||
Description = "The back face of the calibration cube",
|
||||
Path = "/Calibration"
|
||||
}
|
||||
}
|
||||
|
||||
local Left = {
|
||||
Identifier = "Calibration_Left",
|
||||
Parent = Center.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "StaticTranslation",
|
||||
Position = { -Distance, 0, 0 }
|
||||
},
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = { math.pi / 2.0, 0.0, math.pi / 2.0 }
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderablePlaneImageLocal",
|
||||
Enabled = asset.enabled,
|
||||
Size = Size,
|
||||
Origin = "Center",
|
||||
Texture = textures .. "test-pattern-3.png"
|
||||
},
|
||||
GUI = {
|
||||
Name = "Calibration (Left)",
|
||||
Description = "The left face of the calibration cube",
|
||||
Path = "/Calibration"
|
||||
}
|
||||
}
|
||||
|
||||
local Top = {
|
||||
Identifier = "Calibration_Top",
|
||||
Parent = Center.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "StaticTranslation",
|
||||
Position = { 0, 0, Distance }
|
||||
},
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = { 0.0, math.pi, -math.pi }
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderablePlaneImageLocal",
|
||||
Enabled = asset.enabled,
|
||||
Size = Size,
|
||||
Origin = "Center",
|
||||
Texture = textures .. "test-pattern-4.png"
|
||||
},
|
||||
GUI = {
|
||||
Name = "Calibration (Top)",
|
||||
Description = "The top face of the calibration cube",
|
||||
Path = "/Calibration"
|
||||
}
|
||||
}
|
||||
|
||||
local Bottom = {
|
||||
Identifier = "Calibration_Bottom",
|
||||
Parent = Center.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "StaticTranslation",
|
||||
Position = { 0, 0, -Distance }
|
||||
},
|
||||
Rotation = {
|
||||
Type = "StaticRotation",
|
||||
Rotation = { 0.0, 0.0, 0.0 }
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderablePlaneImageLocal",
|
||||
Enabled = asset.enabled,
|
||||
Size = Size,
|
||||
Origin = "Center",
|
||||
Texture = textures .. "test-pattern-5.png"
|
||||
},
|
||||
GUI = {
|
||||
Name = "Calibration (Bottom)",
|
||||
Description = "The bottom face of the calibration cube",
|
||||
Path = "/Calibration"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Center)
|
||||
openspace.addSceneGraphNode(Left)
|
||||
openspace.addSceneGraphNode(Right)
|
||||
openspace.addSceneGraphNode(Front)
|
||||
openspace.addSceneGraphNode(Back)
|
||||
openspace.addSceneGraphNode(Top)
|
||||
openspace.addSceneGraphNode(Bottom)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(Bottom)
|
||||
openspace.removeSceneGraphNode(Top)
|
||||
openspace.removeSceneGraphNode(Back)
|
||||
openspace.removeSceneGraphNode(Front)
|
||||
openspace.removeSceneGraphNode(Right)
|
||||
openspace.removeSceneGraphNode(Left)
|
||||
openspace.removeSceneGraphNode(Center)
|
||||
end)
|
||||
|
||||
asset.export(Center)
|
||||
asset.export(Left)
|
||||
asset.export(Right)
|
||||
asset.export(Front)
|
||||
asset.export(Back)
|
||||
asset.export(Top)
|
||||
asset.export(Bottom)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Calibrator",
|
||||
Description = [[A cube that can be used to verify calibration in a complicated display
|
||||
environment]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
36
data/profiles/calibrator.profile
Normal file
36
data/profiles/calibrator.profile
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"assets": [
|
||||
"base_blank",
|
||||
"util/calibration"
|
||||
],
|
||||
"camera": {
|
||||
"aim": "Calibration_Front",
|
||||
"anchor": "Calibration",
|
||||
"frame": "Calibration",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.5,
|
||||
"z": 0.5
|
||||
},
|
||||
"type": "setNavigationState"
|
||||
},
|
||||
"meta": {
|
||||
"author": "OpenSpace Team",
|
||||
"description": "This profile places the camera in the inside of a calibration cube. This profile can be used to verify that a display environment is set up correctly. If a setup is correct, the different windows/viewports should show the correct parts of the surrounding cube accurately and withou any unwanted distortion.",
|
||||
"license": "MIT license",
|
||||
"name": "Calibration",
|
||||
"url": "https://openspaceproject.com",
|
||||
"version": "1.0"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"name": "NavigationHandler.OrbitalNavigator.LimitZoom.EnabledMinimumAllowedDistance",
|
||||
"type": "setPropertyValueSingle",
|
||||
"value": "false"
|
||||
}
|
||||
],
|
||||
"version": {
|
||||
"major": 1,
|
||||
"minor": 4
|
||||
}
|
||||
}
|
||||
17
data/web/default_ui_panels.json
Normal file
17
data/web/default_ui_panels.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"0": { "id": "scene", "name": "Scene", "visible": true, "enabled": true },
|
||||
"1": { "id": "settings", "name": "Settings", "visible": false, "enabled": true },
|
||||
"2": { "id": "navigation", "name": "Navigation", "visible": true, "enabled": true },
|
||||
"3": { "id": "timePanel", "name": "Date & Time", "visible": true, "enabled": true },
|
||||
"4": { "id": "sessionRecording", "name": "Session Recording", "visible": true, "enabled": true },
|
||||
"5": { "id": "geoLocation", "name": "Geo Location", "visible": true, "enabled": true },
|
||||
"6": { "id": "screenSpaceRenderables", "name": "ScreenSpace Renderables", "visible": true, "enabled": true },
|
||||
"7": { "id": "exoplanets", "name": "Exoplanets", "visible": true, "enabled": true },
|
||||
"8": { "id": "userPanels", "name": "User Panels", "visible": true, "enabled": true },
|
||||
"9": { "id": "actions", "name": "Actions", "visible": true, "enabled": true },
|
||||
"10": { "id": "skyBrowser", "name": "SkyBrowser", "visible": true, "enabled": true },
|
||||
"11": { "id": "mission", "name": "Mission", "visible": false, "enabled": false },
|
||||
"12": { "id": "flightControl", "name": "Flight Control", "visible": false, "enabled": true },
|
||||
"13": { "id": "keybindingsLayout", "name": "Keybindings", "visible": true, "enabled": true },
|
||||
"14": { "id": "gettingStartedTour", "name": "Getting Started Tour", "visible": true, "enabled": true }
|
||||
}
|
||||
Reference in New Issue
Block a user