Phase 1 Due Sunday 2/11 at 8:59pm Chicago time
Phase 2 Due Sunday 4/7 at 8:59pm
Chicago time
Over a decade ago we worked with the Adler
Planetarium on a visualization of the constellations, but one
that allowed the user to move away from the earth and see how
the constellations involved stars at very different distances
from us, and keep flying even further away through the stars of
the Milky Way.
This CAVE2 project is an enhancement of this idea
including not only the 88 official IAU constellations from 1930
but also those of other cultures.
Getting started with Unity for CAVE2
It will use our CAVE2 Unity Template as a starting point.
download unity hub from https://unity.com/unity-hub
then from within unity hub install Unity 2019.2.11 by going to installs
- install editor - archive - download archives - and now in a
browser choose Unity 2019.X - 2019.2.11 and click on unity hub
to have Unity Hub install that version of Unity.
you should then grab the CAVE2 unity template from https://github.com/uic-evl/omicron-unity/releases/tag/v3.12.3
where you can download
and unzip omicron-unity-v3.12.3.zip and unzip it. You can then
add the omicron-unity directory to Unity Hub.
drag Assets / module-omicron / CAVE2 / Scenes / cube world
example into the hierarchy
in the top Omicron menu select Configure for CAVE2 Simulator
the press play and you should have a sample VR environment
running in unity on your laptop that you can also configure to
run in CAVE2
WASD move the CAVE through the virtual space
QE turn the CAVE within the virtual space
RF raise and lower the CAVE within the virtual space
IJKL move the user within the CAVE (and even out of the CAVE if
you move too far)
U and O rotate the user within the CAVE
Another good place to look are the notes from CS 427
creative coding -
https://www.evl.uic.edu/datsoupi/2023_CC/schedule.html in
particular week 6 and week 8.
While CS 428 made use of a combination of
models and code, this class project will be primarily code
based.
Unity can launch a variety of external editors for
working with code - a good multi-platform one is Microsoft's
Visual Studio Code - https://code.visualstudio.com/ Unity's
preferences allow you to set an external editor under External
Tools.
Personally, when creating applications with Unity I like to have
a fair number of separate accessible backups. Time Machine on
the mac is really nice for this, and there are similar programs
on Windows and Linux, but if I am being really careful, once I
get a part of my project working, I quit Unity and make a backup
copy of the entire project directory before moving on to the
next part. Its really easy to make one simple change somewhere
that breaks the entire project and its often much faster to just
go back to a prior version of the code than to hunt down the
problem. I make these kinds of regular backups every 30 minutes,
to an hour or two once I have gotten to the point that I have
something worth keeping. I highly suggest investing in a big USB
drive and just keeping lots of backups until you are sure you
don't need them.
The athyg_26_reduced_m10 dataset is 69 MB decompressed and has
all stars out to 100 light years + all stars to mag +10.
Removing unnecessary columns reduces the dataset to 27 MB.
You will need the following columns:
HIP - hipparcos #
- needed to link to the other datasets
DIST - distance
from sol in parsecs - could be useful to do an initial
cutoff
X0, Y0, Z0 - 3D
position relative to Sol at 0, 0, 0 in parsecs
ABSMAG - absolute
magnitude (brightness) of the star - to get brightness
MAG - relative
magnitude (brightness) of the star as seen from Earth - if
we want to see mag from earth perspective
VX VY VZ - the
velocity of the star relative to sol in km per second
SPECT - spectral
class of the star - to get the size and color of the star
Note that the SPECT column has some lines with commas in them
that may cause trouble for your parser. All you really need from
this column is the first letter OBAFGKM.
You should also remove any rows with missing X, Y, Z or spectral
type as those will be necessary to add the star to the scene.
Wikipedia has information on colors and sizes at
https://en.wikipedia.org/wiki/Stellar_classification that you
should use to set the color and sizes of the stars
It will likely be more useful to convert the velocity to parsecs
per year (1 km/sec = 1.02269 E-6 pc/year)
Initially sol should be positioned 1 meter above the floor in
center of CAVE.
Initially stars
with a negative declination should be lower than sol and stars
with a positive declination should be above sol to put the north
star near the zenith. This means you will need to adjust what X,
Y, Z map to in the CAVE.
Initially a parsec should map to a foot in CAVE2.
It is really really important to keep the frame rate
interactive, at least 30 fps in CAVE2 so you will likely only be
able to use a subset of the data. A good starting point is all
stars within 25 light years and everything with a hipparcos #.
You will likely want an easy way to change the number of stars
shown as you move from testing in the simulator to testing in
the CAVE. You should try and show as many stars as possible
while keeping the frame rate up.
Once you have the stars, then you can move onto the
constellations
constellationship.fab
gives the star pairs based on their hipparcos #s to draw the
constellations
constellation_names.eng.fab
give the full constellation names that will be useful for
menus
You should make sure that all of the stars with a
hipparcos # in Stellarium are loaded into your application.
Initially the user should see all of the 88 modern constellations.
You can use lines to link the stars into the constellations but make
sure you pick a nice color for the constellations and not the
default pink / magenta.
The user should be able to
start time moving and see how the currently visible constellations
(and preferably all the other visible stars) will change over time
using the VX, VY, and VZ values for each star. Note that you
should pick an appropriate time scale factor to make this change
visible, maybe 1,000 years per second. There should also be a
display in the space showing how much time has elapsed.
Pick one constellation and add additional
educational information into your application about that
constellation that the user can bring up. This could include
visuals or voice over. It could discuss the constellation from
a scientific, historic, cultural point of view.
The user should be able to re-color the dataset
from OBAFGKM to a usable color scheme based on the number of
known planets in the system. The user should be able to bring
up information to explain this color scheme within the
application.
Interaction
The user should be
able to use the CAVE wand to do various things in the
application:
- fly in any direction, and rotate (roll, pitch, and yaw) in
any direction using one of the hand controllers. The
standard CAVE flight mode should work for this and that
should be the default. As the user moves in the CAVE or
flies the CAVE through the dataset the virtual world should
tell the user how far they are away from Sol in parsecs.
Note that in particular 'walk mode' is a bad idea when there
is no floor.
- bring up a menu of at least 5 other sets of constellations
to choose from and have those displayed instead, or display
no constellations. Allowing the user to choose from more
constellations is better.
- start and stop time to see the evolution of the
constellations (and all visible star locations) over time -
by default this should move forward in time, but could also
be backward in time.
- bring up additional information on at least one
constellation.
- change the color scheme from stellar type to number of
known planets in the system
- reset the
location and orientation and time back to the starting
point.
- change the scale mapping of parsecs to feet to increase or
decrease the distances between the stars
Everything should be very smooth and look very
classy
There should be an appropriate, and not at all
annoying, music file playing on loop in the background. The user
should be able to easily swap out that file for another of their
choice.
Any lines and text should look very nice.
You should create an initial information panel about your
application.
Roughly the point break down on the project implementation
will be:
25% for core
functionality for Phase 1
25% for core functionality for Phase 2
25% for the
constellations
10% for the exoplanet data
15% for interaction and general classiness
Much of the work on this project is going to be
optimizing the application to look good while running at greater
than 30 frames per second in stereo in CAVE2, so its important
to get a version working in the simulator and then CAVE2 quickly
to have enough time to iterate on the optimizations. You can
also do some debugging on an HMD like the Quest and through the
CAVE2 simulator, but the different platforms have different
graphics capabilities, and CAVE2 runs on a cluster, so its
important to test on CAVE2 regularly. I will be holding office
hours in the main EVL lab so people can test on CAVE2.
We will have three class periods devoted
to project testing in CAVE2. Each person will have a
guaranteed 10 minute time slot for testing during class time
based on the final presentation order. People presenting on
4/9 and 4/11 can test on 3/28, people presenting on 4/16 and
4/18 can test on 4/2 and people presenting on 4/23 and 4/25
can test on 4/4. Additional time will be available during
office hours after class as usual.
Some suggestions:
you can add text based data files to the assets folder and
then load them in as TextAssets
spheres have far too many polygons to use for the stars.
cubes have fewer polygons and should be fast enough for
prototyping but you will want to move towards billboards or
shaders by the final version to get a high enough frame rate
with good visual quality.
the CAVE2PlayerController has a CAVE2 Wand Navigator
(Script) that has a Navigation Mode / Nav Mode setting where
you can set the default navigation mode to avoid falling
through space
the CAVE2-PlayerController / CAVE2-CameraController / Main
Camera has a set of Camera settings that can be useful to
change the background.
if you want to test on a quest headset you need to make
sure that Project Settings / Graphics Android / Always
included Shaders includes "Unlit / Texture" or any lines
that you try to draw will not appear in the headset.
Please include your name as part of the unity Project Name
so we do not have 20 projects with the same name when we try
to launch them in CAVE2. You can change the project name in
Unity by going to File / Build Settings / Player Settings
and changing the Product Name near the top of the list. Feel
free to change the Company name and Version number as you
wish.
The nearest star system to our sun,
Alpha Centauri, is useful to see if you have the default
scale right and 'up' in the correct direction. With a
Hipparcos # of 71683 Rigil Kentaurus is part of a trinary
system that will be a little over 1 foot (1/3 meter) away
from the sun, and with a declination of -60 it will be
below our sun when your simulation starts. As it is the
same spectral class as the sun it should be the same color
and size. Since there are two other stars in the system
(one similar to the sun, and a red dwarf) you will likely
see some overlaps when you include all 3.
Notes on deploying the CAVE2 version
set the name of your project in
Build Settings / Player Settings / Product Name to CS 528
your name so it will be easy to find in the launcher when
we have 21 versions of the project to sort through.
In the Build Settings make sure the
Development Build checkbox is NOT checked
If you are uploading to GitHub then
we can download the code from there. If you are bringing
your code on a portable drive then:
Delete the Library and Temp
folders
Zip your project directory to
avoid some issues with mac / windows / linux
compatibility.
bring
your zip file on a Windows compatible USB-A connected
thumb stick or drive (i.e. in exfat format)
There are two
deadlines for the project.
For the first deadline you should have a version of your
application running in the Unity CAVE2 simulator that loads and
display the stars and allows the user to navigate through the
stars at high frame rate and shows at least one known
constellation. This will make sure everyone is making progress
on the project and has the basics of loading and displaying the
data worked out so there is time to add in and refine the
remaining features before the second deadline.
Create a GitHub repository and upload all of your source code
and data files there. Its a good idea to then re-download this
repository and make sure that your code compiles and runs in a
stock version of Unity 2019.2.11. Create a web page with your
name along with a link to this repository and any instructions
necessary to get your code running. This web page should also
include a link to a 1-minute video showing your application
running in the unity CAVE2 simulator that shows off all of its
features. Email the location of this web page to andy before the
deadline.
To
turn in your final project you should set up a web page with
several pages describing your work, including the well-commented
source code and required files on
GitHub to be able to compile and run your program,
and some photographs and screen captures showing what your
application looks like when its running. You should then email
andy with the location of this website before the deadline. It
would probably be a good idea to put a backup copy of the web
page at a second website just in case I can't get to the first
one.
These web pages should include:
1 page on how to use
your application and the things you can do with it.
1 page on the data
you used including where you got it, what you did to
pre-process it.
1 page with links to
the source code on GitHub and all instructions necessary to
install and run it.
1 page on what
interesting things you found developing and using your
application.
1 page on the
various optimizations you needed to do to make the application
work in real-time
all of which should have plenty of screenshots or
photographs with meaningful captions.
Be sure to document any external libraries or tools that you
make use of - give credit where credit is due.
You should also create a 2-3 minute YouTube video in
CAVE2 and/or using screen
capture showing your application running and feature the video
prominently on your project web page. The video should be
narrated and rehearsed to show off the important features of
your project.
Remember that this website may be useful to you
later on when you are looking for a job and want to show off the
projects you have done.
When you send andy the
location of your webpage you should also email a scaled down
version of your favorite photo that is 1920 pixels wide by 1080
pixels tall in jpg format named p.<your_last_name>.jpg. This
image will be used on the class web pages along with the link to
your project web page.
Each student will also give a short
demonstration about your project in-class and answer some
questions about your work. Be sure to practice your presentation
so you finish within the allotted time so everyone has equal
time to present.
last revision 3/28/2024
added notes on making it easier to move the project over to
CAVE2
2/25/2024 - added additional information on CAVE2 testing times
2/10/2024 - added some notes about alpha centauri to help test
the initial scale and orientation of the simulation
1/23/2024 - corrected the text re the version of the CAVE2 unity
template