Project Icarus: NASA Space Apps Challenge 2022

2023-03-30



This post has been due for a long time. Six months have passed in between; another NASA event is around the corner, and I still need to remember half the details. But what we have done should have been documented sooner or later.

The main gist of the NSAC Challenge is that you are given a variety of categories to choose from, each relating to space exploration or astronomy. Your job is to create something interesting that falls within the category and in some way uses data/resources provided by NASA. Our category was "On the way to the sun". It features the Parker Solar Probe, the first spacecraft to touch the Sun's outer atmosphere. The topic was unique, and there was much room for exploration. We went with developing an interactive journey of the solar probe, highlighting key stages of its 7-year voyage.

Launch

The solar probe was launched on 18th August 2018 aboard a Launch Alliance Delta IV Heavy Rocket. We designed the launch site, focusing heavily on the rocket and its parts. This level aims to provide some context and backstory for the solar probe. Through interaction and audiovisual elements, we showed each part's role in launching the rocket and the details of their builds.

The scene allows for the examination of the rocket from a 3D perspective. Each of the parts is individually selectable for viewing more information.

The scene concludes with the eventual take-off of the Delta IV, initiated by the player.

Setting the trajectory

The scene does a bit of backtrack and allows the participant to set the rocket's trajectory. The expected course of the spacecraft is shown as a guided trail. The scene features a HUD for the launch screen and a view of the estimated trajectory. The participant successfully launches the rocket at the right trajectory to transition into the next step.

Venus Flyby and Entering Sun's Coronal Stream

This is a two-part simulation documenting the moment the probe flies by Venus. The participant can control a free-look camera to look around space at that exact moment, taking in the grandeur of the scenario. The probe is then shown to be entering the coronal stream of the Sun, the first step towards its demise and end of the journey. Actual footage captured from the probe at this exact moment (provided by NASA) is also shown on the HUD for the participant to correlate the simulation with the actual phenomenon.

Crashing

The probe was set on its course of destruction from the first moment of its journey. In this part, the participant experiences a slow-motion simulation of the probe spiralling into the Sun. Four cameras were set up, providing different perspectives on the event. In the scene's final moments, the participant is allowed to initiate the destruction of the Parker Solar Probe and trigger the end of the spacecraft for it to move through the void for eternity.

How things went

Our team consisted of 6 people. Nabil (SUST), Irfan (SUST), Raha (SUST), Shanta (IUT), Sakib (DU), and me.

Nabil hit me up in the second week of August. Shanta, he and I have been doing programming stuff together since 11th grade. So, I was naturally in. Irfan and Nabil already had a general idea of what we will be doing, which helped a lot to cut down on the brainstorming. Raha and Sakib took on paperwork and presentation duties. Irfan would manage programming, video editing and all the project management. The rest of us would focus on most programming, as we had always done.

Irfan had already implemented the basic functionalities of the second and third levels. Nabil started working on the first scene, modelling the launch site and simulating the rocket's launch. I was assigned to finish the final level. Shanta and Irfan would divide the remaining parts between them. I remember finishing the basic prototype of my part on the first day. I coded a solar system simulation and multiple Cinemachine cameras and topped it off with shaders. It was already almost close to a finished product.

Unfortunately, it all went downhill until the day before the event. We got caught up in rules and registration confusions, I took a mini hiatus, and Shanta had his exams looming over. I got a perfect demonstration of Parkinson's Law. The work will fill up to take the entirety of the deadline. Irfan and Nabil still managed to make the preliminary video and submit it (and mad props to them for that), which qualified us for the onsite event.

The day before the event, four of us sat down in a discord call to finish all of the programming stuff because we got a heads up that we would not have much time to work on the project during the event, as we will mostly be busy with presentations and video making. I had finished my part in the meantime. So I looked into the third level, which still needed much work. Only the flyby part was implemented. We still had to do an interactive pause and the coronal stream. Irfan and I were up till 3 in the morning finishing that. I rewrote almost all levels and added the cameras from my level. This took almost all night to do. And as I thought I was finished, Irfan somehow found the actual footage of the event from NASA's wiki. I was initially reluctant, considering I was tired already, but we decided it would make a better final product. I synced the footage and the game to correctly depict what was happening on the screen. We were happy with what shaped up and went to bed to only wake up 2 hours later.

The event was scheduled to start at 8 in the morning, but it was almost 9:30 by the time we found our table and set up everything. The commotion was something else. Our table was in front of the main stage, so everyone was always announcing something and constantly buzzing and interviewing every team. It took a while to finish everything and actually get to work.

We still had to add UI to the Launch scene, highlighting different rocket parts and displaying the details. Fortunately, I had cooked up a crude version of this for the Flyby scene last night. I started integrating that into Nabil's scene. It took ~8 PM to finish up. Shanta also arrived shortly after.

And then disaster struck.

I should have said disasters because multiple things went wrong.

Merge Conflict

The good old nemesis. Our devices were not syncing properly with each push, and one commit broke something else on some other part. That was a prime example of bad code management and poor rule enforcement. The problem was - which we couldn't figure out until the next day - that our .gitignore file was set up incorrectly (which none of us noticed). We weren't committing the .meta files, so our prefabs and inspector values were not in sync. Ultimately, we decided to do all the coding on my Thinkpad and took turns coding our parts.

Physics Boogaloo

I am trying to decide what to title this. Level two (where you set the rocket's trajectory) worked perfectly when we tested it in the editor. But every time we exported a build, it would just go crazy and not work properly. The rocket was flying at insane speed and in erratic orbits. It was 1 in the morning, Raha went home for the night, and Sakib, Irfan, and Nabil were out for a quick nap. Shanta and I stayed up debugging. After dozens of log files, failed builds and wasteful hours, we found that a variable was required during the initialization of the rocket's rigid body. It only worked in the editor because it was saved in Irfan's original .meta files. But the final build has no track of that, so the rigid body goes wild. And what caused this to happen is funnier. The night before, I rewrote the third level, resulting in changes in the physics system Irfan coded. So what worked for the third level broke the second. We did a makeshift solution by hardcoding the variables in the scene and pre-simulating the entire thing, which beats the purpose of the level, but hey, if it works, it works.

I had little part in the rest of the work. We did some cool Mixed-reality prototypes, which unfortunately didn't end up in the game. Our final evaluation was based on a video we had to submit some hours prior, which came out excellent. That gave us the title of National Champions and placed us first in our division.

And in the end, I thank my teammates who worked very hard and took on the responsibilities of tasks I could never do. Nabil and Shanta were brilliant as always, continuing to be at the top of the list of the best programmers and friends I look up to. Raha did almost all of the presentation and voice-over, an area I really suck at. On the contrary, I have known Sakib to be a more "technical" guy, and yet he did really well handling the documentation, research and paperwork. But I was the most impressed with Irfan; his professionalism and calmness in stress really helped us pull through the event.