mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-08 04:20:14 -05:00
c165098cdc
* Start refactoring billboardscloud renderable * Remove extra unit computation in geometry shader * More refactor and fix size parameter not working without colormap (it never did) * Remove redundant bool in shader * Divide settings into property owners * Refactor colormap * More refactoring (utilize properties for visiblity) * Remove redundant extra data structures for options * Move data logic to the colormap settings structure * Remove confusing correction size properties * Separate polygon cloud into its own renderable * Clean up some unused code * Update some property descriptions * Split some more code out into functions * Remove odd and unused "linear filtering" Should be reimplemented ina better way in a general color map overhaul * Start refactoring some more properties * Make color optional and remove redundant color assignments in assets * Refactor color-parameter input and make range mapping work correctly * Code cleanup (unused code and fix data types) * Rename ScaleFactor to ScaleExponent * Add a scale factor as well, as they're easier to use, and clarify documentation * Fix faultily renamed scale factors * Remove confusing multiplication for scale exponent * Fix problem with points not appearing when _drawElements was set to true * Move all colormapsettings into its own table in the asset files * Move scaling/sizing into its own table as well * Group sizing properties and remove min pixel size limit (was always zero) * Add some docs and rename a parameter to avoid repetition * Remove IsExact colormap and add an option to hide outliers OBS! Still need to update the actual cmap files * Add property to disable size mapping * Increase pixel size of polyon texture - reduces jagged edges * Remove unused points class * Rename files and billboard class, to make it clearer that it is a point cloud * Move size mapping into size settings * Move color map properties out into its own component * Move color map related computations into the new component * Add outlier colors, to cover some specific color mapping issues * Automatically fill parameter options if no colormap parameters were defined * Move all color-related parameters to under one property owner * Inlcude changes from matrix maintenance * Add a checkbox to disable additive blending * Remove a unused variable in shader * DO color maping on the graphics card instead of CPU, using a texture * WIP remove old "Outliers" and start introducing concept of no data colors instead * Move speck loader to core and divide into a general data loader and a speck specific loader (In preparation for adding CSV support) * More labelscomponent to core * Fix a faulty header * Handle NaN values * Rename color map component property owner It's not just the color map, but the settings for the entire mapping * Hide point with nan value is show missing data is not selected * Fix labels component documentation after move * Add option to not provide any texture, and use a sphere generated form the shader * Don't crash when loading unsupported data formats :) * Add some TODO comments that should be addressed before merge * Move renderables from DU module to base, and do some header cleanup * Move colormapping component to core ad rename it to make it clear that it is not the color map itself * Add above, below and nan color values to cmap loading * Remove missing Data value specs in asset (and use belowRange in cmap instead) * Make warning about wrong color number more verbose * Add TODO comment about colormap, and actually used color in prev version, to localdwarfs * WIP: Load CSV files * Update some property visbility * Check if chosen parameter options actually exist * Fix fault column check * Update example asset to cover more different cases * Use new asset.resource loading * Update asset versions (major update) * Add parent documentation for RenderablePolygonCloud * Add point cloud example with size scaling and add TODO comment * Add example with textured points * Don't blend textured points * Fix problem with shaders being confused about texture units * Bring back deepsky points color * Start implementing more sophisticated datamapping for point data files * Allow reading datamapping from input dictionary * Load dataset in constructor instead Solves problem with color map columns not loading for big datasets when loaded the first time * Fix crash from reading column value that is interpreted as inf * Inlcude information about data mapping when caching dataset Updating the parameters now leads to an updated caching of the data file * Adapt to tolower update * Add option to specify columns to exclude in load (for CSV files) * Start updating some docs * Add a readonly property that shows the number of data points * Rename example asset to shorter name * Add option for not using cache when loading dataset * Fix some errors in example asset * Set scaleExponent from max position if not specified That way the points are always visible, even when no exponent is given * Restructure and add explanations in example asset * Add option to not cache labels component data file * Add example file with labels and units * Compute fade distances in model coordinates instead of world space (issue #1746) * Add possiblity to invert fading and add exmaple asset * Make a separate propertyowner for fading settings * Update docs * Add example asset with custom data mapping * Address some of my own review comments * Read provided Parameter from asset * Read ValueRange from asset * Add example asset for more advanced color mapping settings * Allow using the same column for two position coordinate axes * Update src/rendering/colormappingcomponent.cpp Co-authored-by: Alexander Bock <alexander.bock@liu.se> * Update src/data/datamapping.cpp * Use helper function for tolowercase * Simplify some std::optional handling, and fix broken assignment from code review fix * Update data file versions to get updated cmap files * Include a progress bar to show progress of CSV data loading * Update csv data-to-float parsing for clang * Add a description about why `openspace.absPath` is used in the file instead of `asset.resource` * Apply suggestions from code review * Apply suggestions from code review * Add some missing info in documentation * Place size-related property descriptions next to each other * Remove the explicitly set renderbin * Fix overly complicated description * Fix polygon texture not being used * Add polygon cloud example * only bind texture and activate texture unit when required * Rename alpha to opacity in shader * Fix value range not loading, and make first parameter in list the default * Rename Pixel Size property * Use base 10 for scale exponent instead of base e * Update src/data/datamapping.cpp * Update modules/base/shaders/billboardpoint_gs.glsl * Remove some redundant asset settings (Home label) * Review comments * Add TODO comment for localdwarfs asset (Speck file reading problems) * Oops, forgot part of the comment * Apply suggestions from code review Co-authored-by: Alexander Bock <alexander.bock@liu.se> * More code review fixes * Fix faulty isReady check when labels are included * Apply suggestions from code review Co-authored-by: Alexander Bock <alexander.bock@liu.se> * Apply suggestions from code review Co-authored-by: Alexander Bock <alexander.bock@liu.se> * More code review updates --------- Co-authored-by: Alexander Bock <alexander.bock@liu.se>
711 lines
17 KiB
Lua
711 lines
17 KiB
Lua
local transforms = asset.require("scene/solarsystem/sun/transforms")
|
|
local earthTransforms = asset.require("scene/solarsystem/planets/earth/transforms")
|
|
|
|
|
|
|
|
local speck = asset.resource({
|
|
Name = "Grids Speck Files",
|
|
Type = "HttpSynchronization",
|
|
Identifier = "digitaluniverse_grids_speck",
|
|
Version = 3
|
|
})
|
|
|
|
|
|
local EquatorialRotationMatrix = {
|
|
-0.05487554, 0.4941095, -0.8676661,
|
|
-0.8734371 , -0.4448296, -0.1980764,
|
|
-0.483835 , 0.7469823, 0.4559838
|
|
}
|
|
|
|
local EquatorialTransformationMatrix = {
|
|
-0.05487554, 0.4941095, -0.8676661, 0.0,
|
|
-0.8734371 , -0.4448296, -0.1980764, 0.0,
|
|
-0.483835 , 0.7469823, 0.4559838, 0.0,
|
|
0.0 , 0.0 , 0.0 , 1.0
|
|
}
|
|
|
|
local EclipticRotationMatrix = {
|
|
-0.05487554, 0.4941095, -0.8676661,
|
|
-0.9938214 , -0.1109906, -0.0003515167,
|
|
-0.09647644, 0.8622859, 0.4971472
|
|
}
|
|
|
|
local EclipticTransformationMatrix = {
|
|
-0.05487554, 0.4941095, -0.8676661, 0.0,
|
|
-0.9938214 , -0.1109906, -0.0003515167, 0.0,
|
|
-0.09647644, 0.8622859, 0.4971472, 0.0,
|
|
0.0 , 0.0 , 0.0 , 1.0
|
|
}
|
|
|
|
local LightHour = 1.0792528488E12
|
|
local LightDay = 2.59020684E13
|
|
local LightMonth = 7.771E14
|
|
local LightYear = 9.4605284E15
|
|
|
|
local RadioSphere = {
|
|
Identifier = "RadioSphere",
|
|
Parent = earthTransforms.EarthBarycenter.Identifier,
|
|
Transform = {
|
|
Scale = {
|
|
Type = "TimeDependentScale",
|
|
-- First TV signals strong enough to leave the ionosphere
|
|
ReferenceDate = "1936 AUG 01 12:00:00",
|
|
Speed = 299792458 -- c
|
|
},
|
|
Rotation = {
|
|
Type = "StaticRotation",
|
|
Rotation = EquatorialRotationMatrix
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableSphericalGrid",
|
|
Enabled = false,
|
|
Opacity = 1.0,
|
|
Color = { 0.3, 0.84, 1.0 },
|
|
LineWidth = 2.0
|
|
},
|
|
GUI = {
|
|
Name = "Radio Sphere",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local OortSphere = {
|
|
Identifier = "OortSphere",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Transform = {
|
|
Scale = {
|
|
Type = "StaticScale",
|
|
Scale = 7.47989845E15
|
|
},
|
|
Rotation = {
|
|
Type = "StaticRotation",
|
|
Rotation = EclipticRotationMatrix
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableSphericalGrid",
|
|
Enabled = false,
|
|
Opacity = 0.8,
|
|
Color = { 0.8, 0.4, 0.4 },
|
|
LineWidth = 2.0
|
|
},
|
|
GUI = {
|
|
Name = "Oort Sphere",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local EclipticSphere = {
|
|
Identifier = "EclipticSphere",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Transform = {
|
|
Scale = {
|
|
Type = "StaticScale",
|
|
Scale = 9.46377307652E17
|
|
},
|
|
Rotation = {
|
|
Type = "StaticRotation",
|
|
Rotation = EclipticRotationMatrix
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableSphericalGrid",
|
|
Enabled = false,
|
|
Opacity = 1.0,
|
|
Color = { 0.74, 0.26, 0.26 },
|
|
LineWidth = 2.0
|
|
},
|
|
GUI = {
|
|
Name = "Ecliptic Sphere",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local EclipticSphereLabels = {
|
|
Identifier = "EclipticSphereLabels",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Renderable = {
|
|
Type = "RenderablePointCloud",
|
|
Enabled = false,
|
|
Labels = {
|
|
Enabled = true,
|
|
File = speck .. "eclip.label",
|
|
Color = { 0.5, 0.5, 0.5 },
|
|
Size = 14.75,
|
|
MinMaxSize = { 1, 50 },
|
|
Unit = "pc",
|
|
TransformationMatrix = EclipticTransformationMatrix
|
|
},
|
|
Opacity = 0.65,
|
|
Unit = "pc",
|
|
TransformationMatrix = EclipticTransformationMatrix
|
|
},
|
|
GUI = {
|
|
Name = "Ecliptic Sphere Labels",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local EquatorialSphere = {
|
|
Identifier = "EquatorialSphere",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Transform = {
|
|
Scale = {
|
|
Type = "StaticScale",
|
|
Scale = 4.28601E17
|
|
},
|
|
Rotation = {
|
|
Type = "StaticRotation",
|
|
Rotation = EquatorialRotationMatrix
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableSphericalGrid",
|
|
Enabled = false,
|
|
Opacity = 0.8,
|
|
Color = { 0.69, 0.68, 0.29 },
|
|
LineWidth = 2.0
|
|
},
|
|
GUI = {
|
|
Name = "Equatorial Sphere",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local EquatorialSphereLabels = {
|
|
Identifier = "EquatorialSphereLabels",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Renderable = {
|
|
Type = "RenderablePointCloud",
|
|
Enabled = false,
|
|
Labels = {
|
|
Enabled = true,
|
|
File = speck .. "radec.label",
|
|
Color = { 0.5, 0.5, 0.5 },
|
|
Size = 14.5,
|
|
MinMaxSize = { 2, 70 },
|
|
Unit = "pc",
|
|
TransformationMatrix = EquatorialTransformationMatrix
|
|
},
|
|
Opacity = 0.65,
|
|
Unit = "pc",
|
|
TransformationMatrix = EquatorialTransformationMatrix
|
|
},
|
|
GUI = {
|
|
Name = "Equatorial Sphere Labels",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local GalacticSphere = {
|
|
Identifier = "GalacticSphere",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Transform = {
|
|
Scale = {
|
|
Type = "StaticScale",
|
|
Scale = 9.46377307652E18
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableSphericalGrid",
|
|
Enabled = false,
|
|
LineWidth = 2.0,
|
|
Opacity = 1.0,
|
|
Color = { 0.0, 0.6, 0.6 }
|
|
},
|
|
GUI = {
|
|
Name = "Galactic Sphere",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local GalacticSphereLabels = {
|
|
Identifier = "GalacticSphereLabels",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Renderable = {
|
|
Type = "RenderablePointCloud",
|
|
Enabled = false,
|
|
Labels = {
|
|
Enabled = true,
|
|
File = speck .. "galac.label",
|
|
Color = { 0.5, 0.5, 0.5 },
|
|
Size = 15.8,
|
|
MinMaxSize = { 1, 100 },
|
|
Unit = "pc"
|
|
},
|
|
Opacity = 0.65,
|
|
Unit = "pc"
|
|
},
|
|
GUI = {
|
|
Name = "Galactic Sphere Labels",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane1lh = {
|
|
Identifier = "1lhGrid",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Transform = {
|
|
Rotation = {
|
|
Type = "StaticRotation",
|
|
Rotation = EclipticRotationMatrix
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "1lh.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 9.5,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "Km"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
LineWidth = 2.0,
|
|
Segments = { 20, 20 },
|
|
Size = { 2 * LightHour, 2 * LightHour }
|
|
},
|
|
GUI = {
|
|
Name = "1lh Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane1ld = {
|
|
Identifier = "1ldGrid",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Transform = {
|
|
Rotation = {
|
|
Type = "StaticRotation",
|
|
Rotation = EclipticRotationMatrix
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "1ld.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 10.3,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "Km"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
LineWidth = 2.0,
|
|
Segments = { 20, 20 },
|
|
Size = { 2 * LightDay, 2 * LightDay }
|
|
},
|
|
GUI = {
|
|
Name = "1ld Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane1lm = {
|
|
Identifier = "1lmGrid",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Transform = {
|
|
Rotation = {
|
|
Type = "StaticRotation",
|
|
Rotation = EclipticRotationMatrix
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "1lm.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 11.8,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "pc"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
LineWidth = 2.0,
|
|
Segments = { 20, 20 },
|
|
Size = { 2 * LightMonth, 2 * LightMonth }
|
|
},
|
|
GUI = {
|
|
Name = "1lm Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane1ly = {
|
|
Identifier = "1lyGrid",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Transform = {
|
|
Rotation = {
|
|
Type = "StaticRotation",
|
|
Rotation = EclipticRotationMatrix
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "1ly.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 13.0,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "pc"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
LineWidth = 2.0,
|
|
Segments = { 20, 20 },
|
|
Size = { 2 * LightYear, 2 * LightYear }
|
|
},
|
|
GUI = {
|
|
Name = "1ly Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane10ly = {
|
|
Identifier = "10lyGrid",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Transform = {
|
|
Rotation = {
|
|
Type = "StaticRotation",
|
|
Rotation = EclipticRotationMatrix
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "10ly.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 14.17,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "pc"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
LineWidth = 2.0,
|
|
Segments = { 20, 20 },
|
|
Size = { 10 * 2 * LightYear, 10 * 2 * LightYear }
|
|
},
|
|
GUI = {
|
|
Name = "10ly Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane100ly = {
|
|
Identifier = "100lyGrid",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Transform = {
|
|
Rotation = {
|
|
Type = "StaticRotation",
|
|
Rotation = EclipticRotationMatrix
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "100ly.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 15.0,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "pc"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
LineWidth = 2.0,
|
|
Segments = { 20, 20 },
|
|
Size = { 100 * 2 * LightYear, 100 * 2 * LightYear }
|
|
},
|
|
GUI = {
|
|
Name = "100ly Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane1kly = {
|
|
Identifier = "1klyGrid",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Transform = {
|
|
Rotation = {
|
|
Type = "StaticRotation",
|
|
Rotation = EclipticRotationMatrix
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "1kly.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 16.0,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "pc"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
LineWidth = 2.0,
|
|
Segments = { 20, 20 },
|
|
Size = { 1000 * 2 * LightYear, 1000 * 2 * LightYear }
|
|
},
|
|
GUI = {
|
|
Name = "1kly Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane10kly = {
|
|
Identifier = "10klyGrid",
|
|
Parent = transforms.SolarSystemBarycenter.Name,
|
|
Transform = {
|
|
Rotation = {
|
|
Type = "StaticRotation",
|
|
Rotation = EclipticRotationMatrix
|
|
}
|
|
},
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "10kly.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 17.25,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "pc"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
LineWidth = 2.0,
|
|
Segments = { 20, 20 },
|
|
Size = { 10000 * 2 * LightYear, 10000 * 2 * LightYear }
|
|
},
|
|
GUI = {
|
|
Name = "10kly Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane100kly = {
|
|
Identifier = "100klyGrid",
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "100kly.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 18.6,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "Mpc"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
HighlightColor = { 0.3, 0.7, 0.8 },
|
|
LineWidth = 2.0,
|
|
Segments = { 20, 20 },
|
|
HighlightRate = { 5, 5 },
|
|
Size = { 100000 * 2 * LightYear, 100000 * 2 * LightYear }
|
|
},
|
|
GUI = {
|
|
Name = "100kly Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane1Mly = {
|
|
Identifier = "1MlyGrid",
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "1Mly.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 19.6,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "Mpc"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
HighlightColor = { 0.3, 0.7, 0.8 },
|
|
LineWidth = 2.0,
|
|
Segments = { 20, 20 },
|
|
HighlightRate = { 5, 5 },
|
|
Size = { 1E6 * 2 * LightYear, 1E6 * 2 * LightYear }
|
|
},
|
|
GUI = {
|
|
Name = "1Mly Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane10Mly = {
|
|
Identifier = "10MlyGrid",
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "10Mly.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 20.6,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "Mpc"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
HighlightColor = { 0.3, 0.7, 0.8 },
|
|
LineWidth = 2.0,
|
|
Segments = { 20, 20 },
|
|
HighlightRate = { 5, 5 },
|
|
Size = { 10E6 * 2 * LightYear, 10E6 * 2 * LightYear }
|
|
},
|
|
GUI = {
|
|
Name = "10Mly Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane100Mly = {
|
|
Identifier = "100MlyGrid",
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "100Mly.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 21.6,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "Mpc"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
HighlightColor = { 0.3, 0.7, 0.8 },
|
|
LineWidth = 2.0,
|
|
Segments = { 20, 20 },
|
|
HighlightRate = { 5, 5 },
|
|
Size = { 100E6 * 2 * LightYear, 100E6 * 2 * LightYear }
|
|
},
|
|
GUI = {
|
|
Name = "100Mly Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
local Plane20Gly = {
|
|
Identifier = "20GlyGrid",
|
|
Renderable = {
|
|
Type = "RenderableGrid",
|
|
Enabled = false,
|
|
Labels = {
|
|
File = speck .. "20Gly.label",
|
|
Color = { 0.0, 0.2, 0.5 },
|
|
Size = 23.6,
|
|
MinMaxSize = { 0, 30 },
|
|
Unit = "Mpc"
|
|
},
|
|
Opacity = 0.4,
|
|
Color = { 0.1, 0.5, 0.6 },
|
|
HighlightColor = { 0.3, 0.7, 0.8 },
|
|
LineWidth = 2.0,
|
|
Segments = { 40, 40 },
|
|
HighlightRate = { 5, 5 },
|
|
Size = { 20E9 * 2 * LightYear, 20E9 * 2 * LightYear }
|
|
},
|
|
GUI = {
|
|
Name = "20Gly Grid",
|
|
Path = "/Other/Grids"
|
|
}
|
|
}
|
|
|
|
|
|
asset.onInitialize(function()
|
|
openspace.addSceneGraphNode(RadioSphere)
|
|
openspace.addSceneGraphNode(OortSphere)
|
|
openspace.addSceneGraphNode(EclipticSphere)
|
|
openspace.addSceneGraphNode(EclipticSphereLabels)
|
|
openspace.addSceneGraphNode(EquatorialSphere)
|
|
openspace.addSceneGraphNode(EquatorialSphereLabels)
|
|
openspace.addSceneGraphNode(GalacticSphere)
|
|
openspace.addSceneGraphNode(GalacticSphereLabels)
|
|
openspace.addSceneGraphNode(Plane1lh)
|
|
openspace.addSceneGraphNode(Plane1ld)
|
|
openspace.addSceneGraphNode(Plane1lm)
|
|
openspace.addSceneGraphNode(Plane1ly)
|
|
openspace.addSceneGraphNode(Plane10ly)
|
|
openspace.addSceneGraphNode(Plane100ly)
|
|
openspace.addSceneGraphNode(Plane1kly)
|
|
openspace.addSceneGraphNode(Plane10kly)
|
|
openspace.addSceneGraphNode(Plane100kly)
|
|
openspace.addSceneGraphNode(Plane1Mly)
|
|
openspace.addSceneGraphNode(Plane10Mly)
|
|
openspace.addSceneGraphNode(Plane100Mly)
|
|
openspace.addSceneGraphNode(Plane20Gly)
|
|
end)
|
|
|
|
asset.onDeinitialize(function()
|
|
openspace.removeSceneGraphNode(Plane20Gly)
|
|
openspace.removeSceneGraphNode(Plane100Mly)
|
|
openspace.removeSceneGraphNode(Plane10Mly)
|
|
openspace.removeSceneGraphNode(Plane1Mly)
|
|
openspace.removeSceneGraphNode(Plane100kly)
|
|
openspace.removeSceneGraphNode(Plane10kly)
|
|
openspace.removeSceneGraphNode(Plane1kly)
|
|
openspace.removeSceneGraphNode(Plane100ly)
|
|
openspace.removeSceneGraphNode(Plane10ly)
|
|
openspace.removeSceneGraphNode(Plane1ly)
|
|
openspace.removeSceneGraphNode(Plane1lm)
|
|
openspace.removeSceneGraphNode(Plane1ld)
|
|
openspace.removeSceneGraphNode(Plane1lh)
|
|
openspace.removeSceneGraphNode(GalacticSphereLabels)
|
|
openspace.removeSceneGraphNode(GalacticSphere)
|
|
openspace.removeSceneGraphNode(EquatorialSphereLabels)
|
|
openspace.removeSceneGraphNode(EquatorialSphere)
|
|
openspace.removeSceneGraphNode(EclipticSphereLabels)
|
|
openspace.removeSceneGraphNode(EclipticSphere)
|
|
openspace.removeSceneGraphNode(OortSphere)
|
|
openspace.removeSceneGraphNode(RadioSphere)
|
|
end)
|
|
|
|
asset.export(RadioSphere)
|
|
asset.export(OortSphere)
|
|
asset.export(EclipticSphere)
|
|
asset.export(EclipticSphereLabels)
|
|
asset.export(EquatorialSphere)
|
|
asset.export(EquatorialSphereLabels)
|
|
asset.export(GalacticSphere)
|
|
asset.export(GalacticSphereLabels)
|
|
asset.export(Plane1lh)
|
|
asset.export(Plane1ld)
|
|
asset.export(Plane1lm)
|
|
asset.export(Plane1ly)
|
|
asset.export(Plane10ly)
|
|
asset.export(Plane100ly)
|
|
asset.export(Plane1kly)
|
|
asset.export(Plane10kly)
|
|
asset.export(Plane100kly)
|
|
asset.export(Plane1Mly)
|
|
asset.export(Plane10Mly)
|
|
asset.export(Plane100Mly)
|
|
asset.export(Plane20Gly)
|
|
|
|
|
|
|
|
asset.meta = {
|
|
Name = "Grids",
|
|
Version = "3.0",
|
|
Description = [[Various grids for showing size reference. Included: 10,000 light year
|
|
grid, 10 light year grid, 20 billion light year grid, 10 million light year grid,
|
|
100 light year grid, 100 million light year grid, Ecliptic Coordinate Sphere
|
|
(500-light-year radius), Galactic Coordinate Sphere (1000-light-year radius),
|
|
Galaxy Coordinate Grid, Celestial Coordinates / Radio Sphere (dynamic radius), 1
|
|
billion light year grid, Celestial Coordinate Sphere (1000000-light-year radius),
|
|
1,000 light year grid, 1 million light year grid, 1 light year grid]],
|
|
Author = "Brian Abbott (AMNH)",
|
|
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
|
|
License = "AMNH Digital Universe"
|
|
}
|