Include orientation data in new point cloud and remove RenderablePlanesCloud (#3168)

* WIP start including rotation data

* Fix option to use orientation data or not

* Renames to reflect that points are no longer billboarded (at least not always)

* Increase max value for scale factor

* Fix correct scaling for tully and deep sky objects

* Remove the old RenderablePlanesCloud, we don't need it anymore

* Add unit handling for size scaling from data values

* Clarify some documentation about the points being rendered as planes

* Update datasets to the new ones on the server

* Use quaternions for orientation instead of vectors (simplifies interpolation and requires less data)

* Make interpolation of orientation work

* Fix size for deep sky objects being too small due to data being radius rather than diameter

* Add IsRadius flag for deepsky

* Update asset versions (major number update, due to breaking changes)

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
This commit is contained in:
Emma Broman
2024-04-18 14:06:55 +02:00
committed by GitHub
parent 2b5b882e14
commit 82ddbc57f8
19 changed files with 491 additions and 941 deletions
+19 -11
View File
@@ -9,7 +9,7 @@ local speck = asset.resource({
Name = "Deep Sky Objects Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_deepsky_speck",
Version = 1
Version = 2
})
@@ -57,19 +57,27 @@ local DeepSkyObjects = {
local DeepSkyObjectsImages = {
Identifier = "DeepSkyObjectsImages",
Renderable = {
Type = "RenderablePlanesCloud",
Type = "RenderablePointCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Opacity = 0.99,
ScaleFactor = 1.0,
File = speck .. "dso.speck",
TexturePath = textures,
Luminosity = "radius",
ScaleLuminosity = 0.001,
Texture = {
Folder = textures
},
-- Use fixed orientation, and rotate planes based on orientation information in
-- the dataset
OrientationRenderOption = "Fixed Rotation",
UseOrientationData = true,
Unit = "pc",
-- Fade in value in the same unit as "Unit"
--FadeInDistances = {0.001, 0.05010},
PlaneMinSize = 5.0
SizeSettings = {
SizeMapping = {
ParameterOptions = { "radius" },
ScaleFactor = "Parsec",
IsRadius = true
},
-- No exponential scaling, just use size mapping to set the correct size
ScaleExponent = 0.0
}
},
Transform = {
Rotation = {
@@ -111,7 +119,7 @@ asset.export(DeepSkyObjectsImages)
asset.meta = {
Name = "Deep Sky Objects Images",
Version = "2.0",
Version = "3.0",
Description = "Digital Universe asset for Deep Sky Objects and their Images",
Author = "Nate Greenstein, Matt Everhart, Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
@@ -1,34 +1,41 @@
local planeTextures = asset.resource({
local textures = asset.resource({
Name = "Milky Way Plane Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_milkyway_textures",
Version = 2
})
local planeSpeck = asset.resource({
local speck = asset.resource({
Name = "Milky Way Plane Speck",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_milkyway_speck",
Version = 1
Version = 2
})
local Plane = {
local Object = {
Identifier = "MilkyWayGalaxyImage",
Parent = "Root",
Renderable = {
Type = "RenderablePlanesCloud",
Enabled = true,
Color = { 1.0, 1.0, 1.0 },
Type = "RenderablePointCloud",
Opacity = 0.99,
ScaleFactor = 2.8,
File = planeSpeck .. "galaxy.speck",
TexturePath = planeTextures,
Luminosity = "size",
ScaleLuminosity = 1.0,
FadeInDistances = { 3000.0, 50000.0 },
PlaneMinSize = 5.0,
Unit = "pc"
File = speck .. "galaxy.speck",
Texture = {
Folder = textures
},
-- Use fixed orientation, and rotate planes based on orientation information in
-- the dataset
OrientationRenderOption = "Fixed Rotation",
UseOrientationData = true,
Unit = "pc",
Fading = {
FadeInDistances = { 16000.0, 100000.0 } -- Fade in value in the same unit as "Unit"
},
SizeSettings = {
SizeMapping = {
ParameterOptions = { "size" }
},
ScaleExponent = 16.936
},
},
GUI = {
Name = "Milky Way Galaxy Image",
@@ -46,20 +53,20 @@ local Plane = {
asset.onInitialize(function()
openspace.addSceneGraphNode(Plane)
openspace.addSceneGraphNode(Object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Plane)
openspace.removeSceneGraphNode(Object)
end)
asset.export(Plane)
asset.export(Object)
asset.meta = {
Name = "MilkyWay Galaxy",
Version = "2.1",
Version = "3.0",
Description = [[Digital Universe asset containt 2D image of the MilkyWay. For
extragalactic viewing]],
Author = "Brian Abbott, Carter Emmart (AMNH)",
@@ -1,34 +1,42 @@
local planeTextures = asset.resource({
local textures = asset.resource({
Name = "Milky Way Plane Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_milkyway_textures",
Version = 2
})
local planeSpeck = asset.resource({
local speck = asset.resource({
Name = "Milky Way Plane Speck",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_milkyway_speck",
Version = 1
Version = 2
})
local Object = {
Identifier = "MilkyWayGalaxyArmLabelsImage",
Parent = "Root",
Renderable = {
Type = "RenderablePlanesCloud",
Type = "RenderablePointCloud",
Enabled = false,
Color = { 1.0, 1.0, 1.0 },
Opacity = 0.99,
ScaleFactor = 2.8,
File = planeSpeck .. "galaxyArmLabels.speck",
TexturePath = planeTextures,
Luminosity = "size",
ScaleLuminosity = 1.0,
FadeInDistances = { 3000.0, 50000.0 },
PlaneMinSize = 5.0,
Unit = "pc"
File = speck .. "galaxyArmLabels.speck",
Texture = {
Folder = textures
},
-- Use fixed orientation, and rotate planes based on orientation information in
-- the dataset
OrientationRenderOption = "Fixed Rotation",
UseOrientationData = true,
Unit = "pc",
Fading = {
FadeInDistances = { 8000.0, 140000.0 } -- Fade in value in the same unit as "Unit"
},
SizeSettings = {
SizeMapping = {
ParameterOptions = { "size" }
},
ScaleExponent = 16.936
},
},
GUI = {
Name = "Milky Way Arms Labels",
@@ -56,7 +64,7 @@ asset.export(Object)
asset.meta = {
Name = "Milky Way Arms Labels",
Version = "1.1",
Version = "2.0",
Description = "Image with arm labels for the Milky Way galaxy",
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
+22 -12
View File
@@ -9,7 +9,7 @@ local speck = asset.resource({
Name = "Tully Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_tully_speck",
Version = 3
Version = 4
})
@@ -84,20 +84,30 @@ local TullyGalaxies = {
local TullyGalaxiesImages = {
Identifier = "TullyGalaxiesImages",
Renderable = {
Type = "RenderablePlanesCloud",
Enabled = true,
Color = { 1.0, 1.0, 1.0 },
Type = "RenderablePointCloud",
Opacity = 0.99,
ScaleFactor = 1.0,
File = speck .. "tully.speck",
TexturePath = textures,
Luminosity = "diamkpc",
ScaleLuminosity = 0.001,
SkipFirstDataPoint = true,
Texture = {
Folder = textures
},
TransformationMatrix = TransformMatrix,
-- Use fixed orientation, and rotate planes based on orientation information in
-- the dataset
OrientationRenderOption = "Fixed Rotation",
UseOrientationData = true,
Unit = "Mpc",
-- Fade in value in the same unit as "Unit"
FadeInDistances = {0.0005, 0.003},
PlaneMinSize = 1.0
Fading = {
FadeInDistances = { 0.0005, 0.003 } -- Fade in value in the same unit as "Unit"
},
SizeSettings = {
SizeMapping = {
ParameterOptions = { "diamkpc" },
ScaleFactor = "Kiloparsec"
},
-- No exponential scaling, just use size mapping to set the correct size
ScaleExponent = 0.0
}
},
GUI = {
Name = "Tully Galaxies Images",
@@ -133,7 +143,7 @@ asset.export(TullyGalaxiesImages)
asset.meta = {
Name = "Tully Galaxies",
Version = "4.0",
Version = "5.0",
Description = [[Digital Universe asset for Tully Galaxies, including point cloud and
images]],
Author = "Stuart Levy (NCSA/UIUC), Brian Abbott (AMNH)",