HOME THE GAME MEDIA ABOUT US DOWNLOAD

THE GAME

StellAR is about creating your own stellar system which you can view in AR.
This includes creating and customizing your own planets and to set them out in the star system on unique orbits.

×

Overview

Create your own stellar system in AR

Description
StellAR is about creating your own stellar system which you can view in AR.

This includes creating and customizing your own planets and to set them out in the star system on unique orbits. In the customization the user can choose between making a solid or a gas planet. The user can then change the look and size of the planets.

In the stellar system part the user gets to try to set a stable orbit for a planet. But there is also the option of just goofing around and making planets crash into each other. It's possible to save multiple star systems and also to change the gravity settings for different orbit speeds.

In summary StellAR is about creating your own star system with custom planets and experimenting with different orbits for the planets.

Motivations
  • Space is exciting and learning about it is fun!
  • We wanted to learn about AR, physical simulations, 3D-modelling in blender, procedural generation in Unity
  • The project could make people more interested in space and physics

Goals
  • Creating a working simulation of a solar system that allows for user input and interaction
  • Creating a project and group structure that allows for efficient and productive work
  • Create a fun experience

Obstacles & Lessons learned
The biggest obstacle we had was that we didn’t figure out data persistence between scenes and sessions until very late in the process, which meant that we didn’t have a real start to finish-game loop until the data persistence worked. And had we started working on data persistence much earlier, we wouldn't have know what data would have to be saved.

Another obstacle was of course the one presented by Covid-19 which meant that almost all collaboration had to be done remotely.

One of the lessons we learned in the process was that better device hardware such as camera and processor makes a better AR experience in the case of tracking.

×

Technology

Technologies and frameworks used for Stellar

UNITY3D

Unity3D is a game engine where the user can create custom games 2D and 3D games. It’s relatively easy to use and enables advanced graphic and interaction programming.

AR-FOUNDATION

AR-Foundation is a toolkit for developing AR-applications for ios and android simultaneously as it wraps both the platform specific libraries ARKit and ARCore respectively. An alternative would have been using Vuforia, but we wanted to learn a new technology as some of us had briefly used Vuforia in another course.

SHADERGRAPH

Shadergraph was picked over traditional shader-programing directly in code as we did not have much experience with the latter and Shadergraph gives a more direct visual feedback on what you are doing. It proved to be great for creating procedural materials.

BLENDER

Blender is primarily a 3D modelling software which was used in the project to a limited degree. Since the meshes for the planets were all created procedurally, or based on a basic sphere, the only use we had for premade 3D-objects in the demo were the asteroids.

×

Challenges

Challenges we've encounterd and overcame during the course of the project

AR-TRACKING
During the project we noticed that the AR-tracking provided with ARCore and ARKit is not always the most accurate. We built our app around markerless tracking, thinking that it would be better for a portable experience to not have some arbitrary peripheral. We used the built in feature-point and plane tracking of the AR-toolkits wrapped by ARFoundation. We noticed that reflective surfaces, such as large screens, can be detrimental to the spatial tracking. There were also issues with how much hardware affected the tracking, as we noticed that phones with more advanced cameras usually performed better tracking-wise.

GEOMETRY OF PLANET MESH
Finding a good way of representing a sphere with triangles is not completely trivial. We started out using a cube which we deformed into a sphere by setting every point to unit distance from the center. This option gave us a lot of freedom when it came to how detailed we wanted our sphere to be. Simply increasing the number of vertices in every face of the cube we got a finer division. This approach does however give some weird visual artifacts and prominent seems where the cube faces meet.
In the end we ended up with a solution built upon the Ico Sphere. We start out with an icosahedron where every vertex is unit length from the center. We can then divide every triangle into three new triangles and thus increase the detail and make the shape more sphere-like. This approach gives us less control of the resolution since we can only increase the number of triangles three fold every time. We did however get rid of the artifacting from the previous method and overall it looked a lot better.

SERIALIZATION AND PERSISTANCE
To serialize and create custom data structures to be able to save scene and game object data was fairly straightforward. We converted the data to JSON files which we stored locally on the users device. However, we had some trouble with loading the data correctly since the aesthetic data and physics data were separated. This made it important to load the correct match of aesthetic and physics data to a planet. It also required us to load the data in a specific order and to clean up the scene between loading star systems.

NEWTONIAN GRAVITY SIMULATION
The two major approaches on how to create gravity in Unity are force based and acceleration based. In the force based method forces are applied to objects in a scene in accordance to the Newtonian gravity equation. Then the Unity physics engine automatically calculates the velocity and next position of the objects. In contrast, in the acceleration based methods the acceleration is calculated in accordance with the Newtonian gravity equation. This approach also decouples the calculations from the built-in physics engine. This means that the position and velocity calculations of the objects have to be scripted manually. After experimenting with both methods we decided to go with the acceleration based method. This is because we had problems with the trajectory calculations with the force based method. When the trajectory is calculated the simulation is paused and the trajectory simulation starts in order to predict how a planet would move in the starsystem given the initial velocity and position which is decided by the user. With the force based method the planets did not move exactly with their trajectories, but with the acceleration based method we got more control of the calculations which in the end resulted in a better trajectory. A great source of inspiration was: Sebastian Lague - Coding Adventure

GAS PLANET STORM
The banding and swirling noise of the gas planets was easy enough to implement in Shadergraph using various generated noise and UV-mapping-tricks. The storms proved to be more challenging. For aesthetic purposes the ideal storm would affect the swirling noise in the bands on the material. This was put to the wayside as it would have required something along the lines of a fluid simulation which, even though it would have been possible to do, might have affected the performance on less advanced phones. Instead, a method using a simple oval texture that was manipulated with various UV-mapping nodes provided a convincing simili to a storm. This method was based on what reddit user jamqdlaty presents here https://www.reddit.com/r/Unity3D/comments/hiljpk/gas_giant_shader_shadergraph/ after a discussion with them through the forum.

×

Related Work

Inspiration from previous projects

AR Solar System, Arthur Arzumanyan, 2017

This app gives the user an AR-representation of OUR solar-system, with both marker and markerless tracking. We want to similarly display a stellar system in AR in our project but have also included an aspect of USER customization of the solar system and physical simulations of the system. In Stellar you are in more involved interactive experience: Your'e not only a spectator, you are also the creator.

Universe Sandbox, Giant Army, 2011

Universe sandbox is a newtonian physics simulation of celestial objects and bodies that a player can control by placing out objects like planets, suns and black holes and watch how they interact. We want to do similar things with the stellar systems that the user will be able to create in our project.

BeBeam

BeBeam is an AR experience that lets the user place out virtual prisms in physical space, leading a beam of light from a source to a target. It is related to our project in the sense that it involves using the same kind of technology that we are interested in, more specifically how it tracks virtual objects in physical space.

MEDIA

ABOUT US

×

Linda Cnattingius

lindacn@kth.se

Responsibilities

  • Customized textures and shaders for solid planets and sun
  • Particle system generation
  • User Interface design with customized sprites and UI System
  • Interactions for planet customization
  • Shake detection for randomization
  • Triangle slider for color customization
×

Carl Calado Zettergren

carzet@kth.se

Responsibilities

  • Initial AR-Scene management and implementation in Unity3d using ARFoundation
  • Data-gathering about exoplanets and stellar systems
  • Customizable and multi-instantiatable procedural texture/material for gas planets using Shadergraph
  • UI for gas planet customization
×

Platon Woxler

platon@kth.se

Responsibilities

  • Procedural mesh generation and manipulation
  • User interaction for mesh deformation & Planet Creation
×

Jesper Englund

jeengl@kth.se

Responsibilities

  • Procedural mesh generation and manipulation
  • Data management - Serialization of assets and saving planet data between scenes and game sessions
  • Sound design
  • Animations - Explosions and UI
  • 3D modelling - Asteroids
×

Jussi Kangas

JussiKangas@kth.se

Responsibilities

  • Created the Newtonian gravity simulation, planet trajectory simulation and options for gravity settings
  • Interactions related to the gravity simulation (trajectory, planet rotation) in the AR-scene
  • Serialization of assets and primarily saving the physics data between scenes and game sessions
-->