From b55d93ad945f67755bb215a1df69172e352393f6 Mon Sep 17 00:00:00 2001 From: Micah Date: Thu, 10 Sep 2020 17:46:48 -0400 Subject: [PATCH] added orion nebula asset from DU, updated licence template to better support whitespace --- .../objects/orionnebula/cluster.asset | 54 ++++++ .../milkyway/objects/orionnebula/nebula.asset | 159 ++++++++++++++++++ .../objects/orionnebula/orionnebula.asset | 2 + .../objects/orionnebula/transforms.asset | 22 +++ data/colors/pink.png | Bin 0 -> 519 bytes data/web/documentation/scenelicense.hbs | 2 +- data/web/documentation/script.js | 9 + 7 files changed, 247 insertions(+), 1 deletion(-) create mode 100644 data/assets/scene/milkyway/objects/orionnebula/cluster.asset create mode 100644 data/assets/scene/milkyway/objects/orionnebula/nebula.asset create mode 100644 data/assets/scene/milkyway/objects/orionnebula/orionnebula.asset create mode 100644 data/assets/scene/milkyway/objects/orionnebula/transforms.asset create mode 100644 data/colors/pink.png diff --git a/data/assets/scene/milkyway/objects/orionnebula/cluster.asset b/data/assets/scene/milkyway/objects/orionnebula/cluster.asset new file mode 100644 index 0000000000..63956d0b89 --- /dev/null +++ b/data/assets/scene/milkyway/objects/orionnebula/cluster.asset @@ -0,0 +1,54 @@ +--orionnebula/cluster.asset +local assetHelper = asset.require('util/asset_helper') +local transforms = asset.require("./transforms") + +local sync = asset.syncedResource({ + Name = "Orion Nebula Star Cluster", + Type = "HttpSynchronization", + Identifier = "orion_nebula_star_cluster", + Version = 1 +}) + +local OrionClusterStars = { + Identifier = "OrionClusterStars", + Parent = transforms.NebulaPosition.Identifier, + Renderable = { + Type = "RenderableStars", + File = sync .. "/oricluster.speck", + Texture = sync .. "/halo.png", + Texture = sync .. "/colorbv.cmap", + MagnitudeExponent = 5.02, + SizeComposition = "Distance Modulus", + RenderMethod = "Texture Based" + }, + GUI = { + Name = "Orion Nebula Star Cluster", + Path = "/Milky Way/Stars" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { OrionClusterStars }) + +asset.meta = { + Name = "Orion Nebula Star Cluster", + Version = "1.0", + Description = [[ In order to have an accurate depiction of the +Orion nebula, we need to include the star cluster that was birthed +from it. We turned to a study of the cluster’s stellar population by +Lynne Hillenbrand, who was working at the University of California, Berkeley at +the time.The catalog from her paper contains more than 1,500 stars, about +half the stars in the actual cluster. The cluster is very crowded, with +a peak density of 10,000 stars per cubic parsec over a wide range +of masses from a tenth the sun’s mass up to 50 times its mass. We +were presented with one problem: there are no distances. +For the stellar distances, we needed to deduce them by statistical +methods. Knowing the size of the cluster and approximating the +shape to be roughly spherical, we placed each star along a line +of sight through this imaginary sphere centered on the cluster. In +this sense, these data are observed data and the view from Earth is +accurate. But the distance of each star has been derived from this +educated-guess approach for the cluster distribution. ]], + Author = "AMNH Digital Universe", + URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", + License = "custom" +} diff --git a/data/assets/scene/milkyway/objects/orionnebula/nebula.asset b/data/assets/scene/milkyway/objects/orionnebula/nebula.asset new file mode 100644 index 0000000000..e43b606f1b --- /dev/null +++ b/data/assets/scene/milkyway/objects/orionnebula/nebula.asset @@ -0,0 +1,159 @@ +local assetHelper = asset.require('util/asset_helper') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') +local transforms = asset.require('./transforms') + +local LIGHTS = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier); + +local sync = asset.syncedResource({ + Name = "Orion Nebula Model", + Type = "HttpSynchronization", + Identifier = "orion_nebula_model", + Version = 1 +}) + + +local NebulaHolder = { + Identifier = "OrionNebulaHolder", + Parent = transforms.NebulaPosition.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 35999998699110400.000000 + }, + Rotation = { + Type = "FixedRotation", + Attached = "OrionNebulaHolder", + XAxis = {1.000000,1.000000,0.510000}, + XAxisOrthogonal = true, + YAxis = "Sun", + YAxisInverted = false + } + }, + GUI = { + Name = "Orion Nebula", + Path = "/Milky Way/Objects", + } +} + +local OrionNebulaModel = { + Identifier = "OrionNebulaModel", + Parent = NebulaHolder.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.67500000 + } + }, + Renderable = { + Type = "RenderableModel", + Geometry = {{ + Type = "MultiModelGeometry", + GeometryFile = sync .. "/orion_nebula.obj", + ColorTexture = sync .. "/heic0601a_masked.png" + }}, + Opacity = 1.0, + DisableFaceCulling = false, + SpecularIntensity = 0.0, + AmbientIntensity = 0.45, + DiffuseIntensity = 0.0, + RotationVector = {0.000000, 22.300000, 0.000000}, + LightSources = LIGHTS; + }, + GUI = { + Name = "Orion Nebula Model", + Path = "/Milky Way/Objects", + Hidden = true + } +} + +local OrionNebulaShocksModel = { + Identifier = "OrionNebulaShocksModel", + Parent = NebulaHolder.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.67500000 + } + }, + Renderable = { + Type = "RenderableModel", + Geometry = {{ + Type = "MultiModelGeometry", + GeometryFile = sync .. "/orishocks.obj", + ColorTexture = "${DATA}/colors/pink.png" + }}, + Opacity = 1.0, + DisableFaceCulling = false, + SpecularIntensity = 0.0, + AmbientIntensity = 0.19, + DiffuseIntensity = 0.4, + RotationVector = {0.000000, 22.300000, 0.000000}, + LightSources = LIGHTS; + }, + GUI = { + Name = "Orion Nebula Shocks", + Path = "/Milky Way/Objects", + Hidden = false + } +} + +local OrionNebulaProplydsModel = { + Identifier = "OrionNebulaProplydsModel", + Parent = NebulaHolder.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.67500000 + } + }, + Renderable = { + Type = "RenderableModel", + Geometry = {{ + Type = "MultiModelGeometry", + GeometryFile = sync .. "/proplyds.obj", + ColorTexture = "${DATA}/colors/pink.png" + }}, + Opacity = 1.0, + DisableFaceCulling = false, + SpecularIntensity = 0.0, + AmbientIntensity = 1.0, + DiffuseIntensity = 1.0, + RotationVector = {0.000000, 22.300000, 0.000000}, + LightSources = LIGHTS; + }, + GUI = { + Name = "Orion Nebula Proplyds", + Path = "/Milky Way/Objects", + Hidden = false + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { + NebulaHolder, + OrionNebulaModel, + OrionNebulaShocksModel, + OrionNebulaProplydsModel +}) + +asset.meta = { + Name = "Orion Nebula Model", + Version = "1.0", + Description = [[ In the Digital Universe model of the Orion Nebula, + we depict the ionization front effectively as a terrain, with a flat Hubble + image of the nebula mapped on the undulating surface. In + reality, the ionization front has a slight thickness to it - about a third + of a light year - but is quite thin compared to the overall size of the + nebula, which stretches about ten light years from side to side.

Close into + the center, we see small teardrop-shaped structures with their + narrow ends pointing away from the bright star: these are protoplanetary +disks, or proplyds, of dense gas and dust surrounding young stars. The larger +formations that one sees farther away from the center of the nebula take on a +cup-like shape, with the narrow end pointing away from the nebulas center. +These enormous structures are bow shocks that delineate the region where +highspeed winds from the central star slow from supersonic to subsonic speeds. +You can think of an Hii region as a sort of tremendous explosion, taking place +over millennia, and the bow shocks are part of the outward rush of material. ]], + Author = "AMNH Digital Universe", + URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", + License = "custom" +} diff --git a/data/assets/scene/milkyway/objects/orionnebula/orionnebula.asset b/data/assets/scene/milkyway/objects/orionnebula/orionnebula.asset new file mode 100644 index 0000000000..dc8c05147b --- /dev/null +++ b/data/assets/scene/milkyway/objects/orionnebula/orionnebula.asset @@ -0,0 +1,2 @@ +asset.require('./cluster') +asset.require('./nebula') \ No newline at end of file diff --git a/data/assets/scene/milkyway/objects/orionnebula/transforms.asset b/data/assets/scene/milkyway/objects/orionnebula/transforms.asset new file mode 100644 index 0000000000..6a7e2be42d --- /dev/null +++ b/data/assets/scene/milkyway/objects/orionnebula/transforms.asset @@ -0,0 +1,22 @@ +local assetHelper = asset.require('util/asset_helper') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') + +local PARSEC_CONSTANT = 3.0856776E16; + +local NebulaPosition = { + Identifier = "NebulaPosition", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { -329.915 * PARSEC_CONSTANT, -183.153 * PARSEC_CONSTANT, -132.706 * PARSEC_CONSTANT} + }, + }, + GUI = { + Name = "Orion Nebula Position", + Path = "/Milky Way/Objects", + Hidden = true + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { NebulaPosition }) diff --git a/data/colors/pink.png b/data/colors/pink.png new file mode 100644 index 0000000000000000000000000000000000000000..bcf3e40111d20ffb10abac85683a3d73f73331a8 GIT binary patch literal 519 zcmV+i0{H!jP)EX>4Tx04R}tkv&MmKpe$iQ^lecK|6?a$WWauh>AE$6^me@v=v%)FuC*#nlvOS zE{=k0!NHHks)LKOt`4q(Aou~|}?mh0_0Yam~RI_UWP&La) z#baVNw<`9$B7i;&B8-T{Og)ia%)oPe-NVP%yC~1{KKJM7SMnwUd?N82(+!JwgLr1s z(mC%FhgeBch|h_~4Z0xlBiCh@-#8Z?7I5bWxZDATpLEHP9LY~pC=`JAGy0|+Fmwy_uDQLn_Hp_EWT>m<8{ps& z7%Nity2rZ%oxS~grq$mMhJ$ji5<~_p00009a7bBm000XU000XU0RWnu7ytkO2XskI zMF->v3lb*`YN58I0000MNklzN0|OHS0|NsC0{|Ou0!ZS?^+*5!002ov JPDHLkV1iO#*Af5# literal 0 HcmV?d00001 diff --git a/data/web/documentation/scenelicense.hbs b/data/web/documentation/scenelicense.hbs index ee9bce0479..b4b0828d8d 100644 --- a/data/web/documentation/scenelicense.hbs +++ b/data/web/documentation/scenelicense.hbs @@ -4,7 +4,7 @@

Asset - {{name}}

-

{{description}}

+

{{{description}}}

Version - {{version}}

Author - {{author}}

Associated URL - {{url}}

diff --git a/data/web/documentation/script.js b/data/web/documentation/script.js index de1f726e0a..ba8e45eb4b 100644 --- a/data/web/documentation/script.js +++ b/data/web/documentation/script.js @@ -127,6 +127,15 @@ window.onload = function () { } } + if (documentation[i].identifier == "sceneLicense") { + for (var j = 0; j < documentation[i].data.length; j++) { + var escaped = documentation[i].data[j].description.replace( + /\\n/g, "" + ); + documentation[i].data[j].description = escaped; + } + } + } currentDocumentation = documentation[3];