Define the supergalactic transformation matrix only once and reuse in other assets

This commit is contained in:
Alexander Bock
2024-08-14 15:10:44 +02:00
parent ab4023b9fd
commit c7f2ab1a43
6 changed files with 49 additions and 45 deletions

View File

@@ -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,

View File

@@ -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",

View File

@@ -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",

View File

@@ -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 = {

View 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"
}

View File

@@ -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",