mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2025-12-21 10:59:53 -06:00
Define the supergalactic transformation matrix only once and reuse in other assets
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
local transforms = asset.require("./transforms")
|
||||
|
||||
|
||||
|
||||
local textures = asset.resource({
|
||||
Name = "Point Textures",
|
||||
Type = "HttpSynchronization",
|
||||
@@ -13,13 +17,6 @@ local speck = asset.resource({
|
||||
})
|
||||
|
||||
|
||||
local TransformMatrix = {
|
||||
-0.7357425748, 0.67726129641, 0.0, 0.0,
|
||||
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
|
||||
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0
|
||||
}
|
||||
|
||||
local Object = {
|
||||
Identifier = "Abell",
|
||||
Renderable = {
|
||||
@@ -33,7 +30,7 @@ local Object = {
|
||||
Size = 21.2,
|
||||
MinMaxSize = { 10, 12 },
|
||||
Unit = "Mpc",
|
||||
TransformationMatrix = TransformMatrix
|
||||
TransformationMatrix = transforms.Supergalactic
|
||||
},
|
||||
Opacity = 1.0,
|
||||
Coloring = {
|
||||
@@ -44,7 +41,7 @@ local Object = {
|
||||
File = textures .. "point3A.png",
|
||||
},
|
||||
Unit = "Mpc",
|
||||
TransformationMatrix = TransformMatrix,
|
||||
TransformationMatrix = transforms.Supergalactic,
|
||||
SizeSettings = {
|
||||
ScaleExponent = 23.2,
|
||||
MaxSize = 0.27,
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
local transforms = asset.require("./transforms")
|
||||
|
||||
|
||||
|
||||
local speck = asset.resource({
|
||||
Name = "Clusters Speck Files",
|
||||
Type = "HttpSynchronization",
|
||||
@@ -6,13 +10,6 @@ local speck = asset.resource({
|
||||
})
|
||||
|
||||
|
||||
local TransformMatrix = {
|
||||
-0.7357425748, 0.67726129641, 0.0, 0.0,
|
||||
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
|
||||
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0
|
||||
}
|
||||
|
||||
local Object = {
|
||||
Identifier = "GalaxyClusterLabels",
|
||||
Renderable = {
|
||||
@@ -25,11 +22,11 @@ local Object = {
|
||||
Size = 22,
|
||||
MinMaxSize = { 8, 15 },
|
||||
Unit = "Mpc",
|
||||
TransformationMatrix = TransformMatrix
|
||||
TransformationMatrix = transforms.Supergalactic
|
||||
},
|
||||
Opacity = 0.65,
|
||||
Unit = "Mpc",
|
||||
TransformationMatrix = TransformMatrix
|
||||
TransformationMatrix = transforms.Supergalactic
|
||||
},
|
||||
GUI = {
|
||||
Name = "Galaxy Cluster Labels",
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
local transforms = asset.require("./transforms")
|
||||
|
||||
|
||||
|
||||
local speck = asset.resource({
|
||||
Name = "Galaxy Groups Speck Files",
|
||||
Type = "HttpSynchronization",
|
||||
@@ -6,13 +10,6 @@ local speck = asset.resource({
|
||||
})
|
||||
|
||||
|
||||
local TransformMatrix = {
|
||||
-0.7357425748, 0.67726129641, 0.0, 0.0,
|
||||
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
|
||||
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0
|
||||
}
|
||||
|
||||
local Object = {
|
||||
Identifier = "NearbyGalaxyGroups",
|
||||
Renderable = {
|
||||
@@ -25,11 +22,11 @@ local Object = {
|
||||
Size = 20.4,
|
||||
MinMaxSize = { 8, 20 },
|
||||
Unit = "Mpc",
|
||||
TransformationMatrix = TransformMatrix
|
||||
TransformationMatrix = transforms.Supergalactic
|
||||
},
|
||||
Opacity = 0.65,
|
||||
Unit = "Mpc",
|
||||
TransformationMatrix = TransformMatrix
|
||||
TransformationMatrix = transforms.Supergalactic
|
||||
},
|
||||
GUI = {
|
||||
Name = "Galaxy Group Labels",
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
local transforms = asset.require("./transforms")
|
||||
|
||||
|
||||
|
||||
local homespeck = asset.resource({
|
||||
Name = "Home Speck File",
|
||||
Type = "HttpSynchronization",
|
||||
@@ -5,13 +9,6 @@ local homespeck = asset.resource({
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local TransformMatrix = {
|
||||
-0.7357425748, 0.67726129641, 0.0, 0.0,
|
||||
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
|
||||
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0
|
||||
}
|
||||
|
||||
|
||||
local Object = {
|
||||
Identifier = "HomeLabel",
|
||||
@@ -25,7 +22,7 @@ local Object = {
|
||||
Size = 20.50,
|
||||
MinMaxSize = { 16, 20 },
|
||||
Unit = "Mpc",
|
||||
TransformationMatrix = TransformMatrix
|
||||
TransformationMatrix = transforms.Supergalactic
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
|
||||
19
data/assets/scene/digitaluniverse/transforms.asset
Normal file
19
data/assets/scene/digitaluniverse/transforms.asset
Normal file
@@ -0,0 +1,19 @@
|
||||
local Supergalactic = {
|
||||
-0.7357425748, 0.67726129641, 0.0, 0.0,
|
||||
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
|
||||
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0
|
||||
}
|
||||
|
||||
asset.export("Supergalactic", Supergalactic)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Supergalactic Transformation",
|
||||
Description = [[This asset defines the transformation matrix to convert supergalactic
|
||||
coordinates into galactic coordinates.]],
|
||||
Author = "OpenSpace Team",
|
||||
URL = "https://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
local transforms = asset.require("./transforms")
|
||||
|
||||
|
||||
|
||||
local textures = asset.resource({
|
||||
Name = "Tully Textures",
|
||||
Type = "HttpSynchronization",
|
||||
@@ -13,13 +17,6 @@ local speck = asset.resource({
|
||||
})
|
||||
|
||||
|
||||
local TransformMatrix = {
|
||||
-0.7357425748, 0.67726129641, 0.0, 0.0,
|
||||
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
|
||||
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0
|
||||
}
|
||||
|
||||
local TullyGalaxies = {
|
||||
Identifier = "TullyGalaxies",
|
||||
Renderable = {
|
||||
@@ -31,7 +28,7 @@ local TullyGalaxies = {
|
||||
Size = 19.36,
|
||||
MinMaxSize = { 8, 20 },
|
||||
Unit = "Mpc",
|
||||
TransformationMatrix = TransformMatrix
|
||||
TransformationMatrix = transforms.Supergalactic
|
||||
},
|
||||
Opacity = 0.99,
|
||||
File = speck .. "tully.speck",
|
||||
@@ -49,7 +46,7 @@ local TullyGalaxies = {
|
||||
}
|
||||
},
|
||||
Unit = "Mpc",
|
||||
TransformationMatrix = TransformMatrix,
|
||||
TransformationMatrix = transforms.Supergalactic,
|
||||
Fading = {
|
||||
FadeInDistances = { 0.001, 1.0 } -- Fade in value in the same unit as "Unit"
|
||||
},
|
||||
@@ -86,7 +83,7 @@ local TullyGalaxiesImages = {
|
||||
Texture = {
|
||||
Folder = textures
|
||||
},
|
||||
TransformationMatrix = TransformMatrix,
|
||||
TransformationMatrix = transforms.Supergalactic,
|
||||
-- Use fixed orientation, and rotate planes based on orientation information in
|
||||
-- the dataset
|
||||
OrientationRenderOption = "Fixed Rotation",
|
||||
|
||||
Reference in New Issue
Block a user