The code for Immersive Stars and Skycultures is available on GitHub.
master
branch for building on desktop/CAVE2 simulatorCAVE2-config
branch for building for the CAVE2The Unity application uses the CAVE2 simulator from the omicron-unity package. To run the application, you will need to use Unity version 2019.2.11f1. The GitHub repository should already contain the necessary packages (omicron-unity, Multiplayer HLAPI, and TextMeshPro). If, when the project is opened, there are compiler errors, double check that Multiplayer HLAPI and TextMeshPro are installed by checking in the Window > Package Manager, and omicron-unity is present by checking for the drop-down at the top, shown below:
To run, you will need to perform the following steps:
/Assets/Scenes
, and drag the “starScene” into the hierarchy.In the Unity Editor, the application looks like the image below, with spheres generated by a geometry shader at runtime.
If you wish to change the music playing in the background, you can add new music to the /Assets/Scenes
folder, then drag it into the AudioSource component of the PlayerController, as shown below:
There are three main GameObjects that control the visualization.
Stars
GameObject runs the PointCloudCustomVertData.cs
script. This Script reads in the star data from the CSV file in /Assets/Resources
and creates a Mesh object with all the necessary vertex data. This includes the (x,y,z) position, the (vx,vy,vz) for velocity, and the color and radius details.Constellations
GameObject runs the DrawLinksAsMesh.cs
script. This script reads in a selected constellation file and constellation name file. Similar to the Stars
object, it passes (x,y,z) and (vx,vy,vz) to the shader program.In /Assets/Shaders
, the PointCloudDisk.shader
shader contains the code to draw the stars. This shader program reads in the vertex data sent from the Mesh created in PointCloudCustomVertData.cs
. There, it applies transoformations to get the stars in the right place, at the right scale, at the right time. These vertexes are passed to a geometry shader where a sphere is drawn at each point. Finally, the spheres are colored by either spectral type of exoplanet number, and are darkened the farther the camera is from their base point.
In In /Assets/Textures
, there are several custom UI elements. There PNG textures were created in Clip Studio Paint.
App Features • Data, Processing, and Sources • Code • Development Details • Optimization Details