GitHub Improbable Blank SpatialOS Setup

In order to begin transitioning WunderKammer into something scalable, new, clean, and dissertation expectation ready it requires a different setup. From here on out as I re-build this tool from the ground up I will be incorporating data-oriented design concepts following entity component system (ECS) language and harnessing a back-end support system by Improbable services. If you’re not familiar with Improbable, I highly encourage you to read up on their SpatialOS environment. I am not planning on getting into ECS concepts and/or data-oriented design in this post, this is more or less on how I am setting up my local testing and version control environment.

The Setup

At this moment in time I am utilizing home equipment to get this up and running and decided to mimic how a lab setup will be at work. I am utilizing two machines. A Windows 10 PC for Unity and a Ubuntu 20.041 LTS machine to host the build. Traditionally this is done via the same machine you’re building the deployment on and/or hooking it to the SpatialOS cloud service. At the moment for local deployments Improbable only allows “one machine” to host the world. When it comes to the ‘workers’, a local deployment does support multiple workers; if you deploy to the cloud you can utilize multiple machines to host the world environment. This means that for the time-being a local deployment model for the world is rather restricted to that one’s machines resources. In almost all cases the setup I am doing is overkill for the average user/developer and I suggest you just stick with the information Improbable provides.

Windows 10 Machine

Currently my Windows 10 machine is running the latest 2020 version of Unity (2020.1.14f1) and I am following the documentation from SpatialOS on the Blank Project Setup and using the documentation information for a Unity environment.

I am not making any changes to the Unity setup other than confirming all of the normal Unity Update information as the Unity version Improbable uses on the Blank project hosted on GitHub is 2020.1.2. Upon opening the project for the first time I just go through the normal documentation to ‘Build all the workers’, this successfully completes in about 3 minutes and I’m now going to attempt to deploy this locally.

Local Deployment and Version Control Setup

In order to deploy locally I am following the local deployment documentation provided by Improbable and setting the Blank Project project in Unity 2020.1.14f1 on my Windows 10 Machine. To easily share the repository between my machines I am using GitHub and made some modifications to the GIT LFS attributes and updated the *.gitattributes:

*.meta text eol=lf
*.prefab text eol=lf
*.asset text eol=lf
*.asmdef text eol=lf
*.sh text eol=lf
*.a filter=lfs diff=lfs merge=lfs -text

I then went ahead removed one line from the Unity /workers/unity/.gitignore: remove /build. Traditionally you wouldn’t want to do this, but I’m planning on building via the Windows machine and then running on the Linux machine and this seemed logical but will increase the amount of misc. files that are updated which can be problematic if you’re working with multiple people. In this context for the moment it’s just me! Here is the current Unity project specific *.gitignore:

# Unity generated files
/UIElementsSchema
/[Ll]ibrary/
/[Tt]emp/
/Logs/
/UserSettings/
/ProjectSettings/UnityConnectSettings.asset
/*.csproj
/*.sln

# Build artifacts - commented out!
#/build/

# SpatialOS Generated Files
/Assets/Generated/Source.meta
/Assets/Generated/Source/**/*.*
/Assets/Generated/Editor.meta
/Assets/Generated/Editor/**/*.*

# OLD Plugins folder
/Assets/Plugins/Improbable/
/Assets/Plugins/Improbable.meta

# Jetbrains
/Assets/Plugins/Editor/Jetbrains
/Assets/Plugins/Editor/Jetbrains.meta

/Packages/packages-lock.json

From here I am able to successfully build on the Windows PC and see the updates across version control on the linux machine – when I run both builds across Improbable SpatialOS CLI I get the same error:

error: schema path does not exist.

This is expected because when you first load up the blank project template this is literally the true definition of blank aka missing the schema reference. Following their documentation I whipped up a schema reference in Unity’s editor and rebuilt all workers.

Tried the CLI command again:

spatial local launch --runtime_version 14.5.4

error: No Input files well it might help to have a schema file? Going to just generate a folder under the schema folder called root/schema/wkbasic and drop in a random schema file I found from the FPS project and modify a few things to match my folder structure.

package wkbasic;

type Vector3Int {
    int32 x = 1;
    int32 y = 2;
    int32 z = 3;
}

I saved and pushed my changes up to see if I can CLI this on the Linux machine.
While attempting to do this I was ssh’ing into this machine from the Windows machine and had some time-out problems with Improbable trying to login via the Linux machine, looks like I failed to have some SpatialOS/Improbable user login settings on the Linux machine so I had to go direct to my machine and pull up a terminal there.

Windows Powershell SSH into my Linux Machine response after trying to launch locally.

I ended up with the same error on both Linux and my Windows machine after improbable successfully authenticated services.

Windows Powershell SpatialOS CLI error response after launching locally on Windows machine

Further reading suggests that my original problem might have nothing to do with the schema properties but instead looks like I am trying to start spatialOS without the correct CLI information. At this moment in time I believe I am missing CLI commands to specify Unity launch directions. If I use Unity’s Editor and start a local deployment via Unity I get no issues and everything runs as it should. I do believe at this moment in time I am missing some various commands that tells SpatialOS this is a local ‘Unity GDK deployment’. I am going to pause here and talk with our Improbable contacts to confirm. Will post an update as I get more information from them. Just to clarify: my settings above work if I launch from the Unity Editor, the project works fine – again confirming that I am a noob on the CLI commands!

The Backstory

WunderKammer: a rogue project that manifested itself within me and how the cabinet of curiosities came to be… this is the first post… the backstory to how I came to find myself through a project and how my “non-traditional” rise within academics has been. I am going to cover how I managed to finish two degrees, gearing towards the present and a very final degree, and the strive towards actually finishing a project and what I can only coin: the battle of the attention deficit academic.

(20-25 minute read)

Note: I’ve had the PhDFuzz domain for six years and I am finally ready to use it…$857.77 later I finally write this post. 🤔

Upon my successful PhD application in the summer of 2014 I thought it would be smart for me to setup a way for me to have a way to write through my progress – more like a journal perhaps than the degree writing, a way to share my story in hope to possibly help anyone else out there because trust me, if I can almost make it, so can you! I became more active on Twitter and decided PhDFuzz.com needed to be my domain blab of a reflection into the online academic abyss. Long history of us Fuzz’s running about online and decided the collective group needed a PhD one. We’ve got a semi-professional gamer Fuzz, a mod, level world builder, and model building Fuzz, a professional runner Fuzz, a banker Fuzz, and this Fuzz.

Early College Years

In 2014 I was right off the heels of finishing a 12 year higher education jog/sprint: finishing my undergrad and a masters. Dual major in Marketing and Statistics and then a masters of engineering in modeling & simulation. Myself, like many others circa 2008 took one look at the world “…dark and full of terror…” said f-that and went back to school. I had barely survived my first two years as an undergraduate student 2002-2004. Got in a bunch of trouble with my fraternity, on my own doing nearly got booted out of school for poor grades, and thankfully by the grace of my family and some university faculty support managed to maintain one foot in the university while also realizing I wasn’t ready.

Like a lot of kids coming out of a competitive area like nova, I had excelled at managing tests and assignments but no real retainment, no fundamental concept of ‘this is how you learn‘. I was a primed grenade 💣 ready to implode upon any stress testing. I scored so well on my SAT’s but lacked the super high GPA that Virginia Tech wait listed me telling me something like

…your test scores suggest you can excel but your grades tell us you don’t rise to the challenge or the test scores were a fluke…

Virginia Tech College Admission Representative

I did a year at community college, got the grades up and was told to give it one more year, said nope I want the experience now and applied elsewhere. I stepped into a university that took me as I was and immediately was expected to manage my own learning process, they weren’t spoon-feeding me practice tests, and the party scene was everywhere… the pin was pulled! At the end of my second year I had managed to alienate all of my friends, gone through some level of drinking withdrawal…twice… and was going through what I now know was a mild period of a small depression. Grenade went 💥

I was a mess. 😬

I spent the summer 2004 with my grandfather working off the debt he had saved me from. All of my bad decisions came to a head that spring and the only way out was to bare my truth. My grandfather gave me two options: that I could come to him as legal council or as my grandfather. So I took the option as legal council because I was in a bit of a pickle 🥒 and I made a deal. By the end of the summer I utilized self-isolation with a mixture of old school Flippo bootstrap mentality and set my sights on a new me. At the end of the summer I came to hate azalea bushes and was ready to refocus on life choices. My grandfather gave me such a privileged opportunity – like a lot of my family had. For the most part, up until that summer, I had skated by in life. Not knowing then what I know now – that my privilege granted me a hundred restarts more than the next. That for most, what I did in my first two years of school would have been grounds for others to be banished, yet here I am coming back. I look back on that time period a lot and realize new things each time. I wouldn’t be where I am today without it, and I wouldn’t be here today without the privilege that came with it.

That fall semester was hard but I managed. I learned the true cost of stepping outside the majority of the privilege that I have. I came back to the university and picked up three jobs, Walgreens, over-night floor crew for the sports arena, and bar-backing at small college bar. I managed to enroll part-time with a focus more on finding my own way on my own dime and for the next decade I slowly discovered myself with the help of a few key people along the way. I couldn’t maintain the three jobs for long but it was a valuable lesson as it showed me what I didn’t want to do with my life and it set my sights on finishing the undergraduate degree… only problem I liked to socialize and enjoyed the party scene. One of those three jobs was at a college bar… the other two jobs went away as I was able to generate more money in tips than the other jobs combined. The decade of the bar had begun.

The Bar and Restaurant Years

I was able to pay my bills and support myself but still had a hard time managing personal relationships and was working through my own self-reflection of what I wanted within a life that had a lot of promises and a lot of unchecked privilege. This took about 4 years and a few questionable decisions. I learned so much from working and running bars but it came at a cost as most things do. I made some great decisions and equally made some dumb ones and looking back I do know that I was lucky. Thankfully I never touched anything hard – booze was my only drug of choice and I stayed clear of the other party drugs. You didn’t have to look far but it was all around. I was lucky because I crossed paths with someone else who was on their own journey and we were both there at the exact time we needed each other to be there. I for sure was the early winner in this relationship as she saved me! She’s the reason I left the bar industry to get my life back on track – just a few years behind the curve 😆.

We both worked together and those days/nights were always just the best 🥰, we talk about them and we do miss the days where the flow of working and serving people just clicked. I was a speed bartender and lived for the nights that were busy because it was such a natural rush and my first sort of experience with the ‘flow’ concept. Sometime soon after I met my love I finally did course correct somewhere around 2008-2009 and started taking more classes and upon finally finishing my undergraduate degree in the fall of 2011 I enrolled right into a masters program with university support – I left the bar scene and gave it a solid year full in on my masters. I encountered my first typical “academic research professor” and came to learn the student meat grinder model of university academic life… I took my insane work hours from the bar industry and now just applied them to university life… another mistake I made that I now only realize later in life. I must have been running 90-100 hour weeks for a good part of the last 7-8 years and to me it was the status quo, it’s what all the successful people do… right? 😐

Later College Years

Now what was on my side was I just spent the better part of a decade dealing with customer service 24/7 and I recognized all of the cons I had become so adapt at dealing. The academic model had it’s cross-overs. At the time my adviser had a funded project and the moment I pushed back he cut me loose – there was always another student to stand in line and be yelled at – just like there was always another young bartender ready to be hired. I almost left right there on the spot. I left the bar industry to get away from people like this all to encounter them again – that type-A get in line or get out of the way. I thought academics was different, I thought it was a community of people all trying to help each other, towards a higher calling…don’t get me wrong those awesome people do exist… I just hadn’t gotten to know them yet! I was a fool for thinking that type-A personalities wouldn’t find their ways into academics, hell quite the truth it’s full of them, but I also realized that there was something else much more darker within the academic model…

When it comes to researchers utilizing students: for the most part it’s a two-sided scam. The good students know this scam and they go in with a narrow focus and only aim to get that one thing until they can get on to the next part of their life. Others have no idea and either burn out and/or fumble through it by lucking out and finding a good advisor. On the professor side they know the work will be mediocre but in most cases they have funding money they legally have to spend and it’s generally never enough to cover the full needs of whatever underfunded project they are on, so they offset that cost by getting students to fill-in and it becomes a numbers game. Where who knows the true odds, but let’s say it aligns with average masters/PhD graduation rates so roughly 50% of the time the students work out, the other half get ground up and spit out. I cannot repeat this enough – find an advisor that works for your best interests. I immediately recognized the game that was a foot because it’s what happens in most small businesses – you justify good work as sub-par because you cannot afford the good work and you need to maintain that status quo to pay the bills. You reward just enough to keep them around but not enough to let them fully know their value and if all else fails there’s always someone else to fill the ranks and you start that process over again. I found out really quickly that even in this situation I was yet again in a privileged spot.

I was an American citizen in a graduate degree program post 2008. Agencies and the government were throwing money at institutions and researchers that channeled funds towards American citizens in programs – this is a great thing and a lot of citizens don’t take advantage of this. I was the minority within the program and if not the college, most colleges of engineering have a majority of international students. Yet even for me and my privilege, a year in and my adviser drops me because I pushed back. I found out later that my adviser left the program due to some other feathers he ruffled – at the time I was furious and wanted answers. I spoke with a wonderful faculty member who was serving as the department chair and he talked me out of flat out quitting but I made a compromise to myself. My chair in light of how I was treated made a generous offer to fund me the rest of my masters, but I denied it. Told him to politely pass it to a student that really needed it. That I wasn’t going to be on anyone’s payroll because that’s how they own you. The moment you’re paid they got you. If you’re an international student – man I feel for you. The abuse is real, not only are you in a new country, but you’re underpaid, overexerted, constantly being reminded that your funding can be pulled, constantly dealing with the ‘other’ part of this country, and that there are a thousand ‘other’ students ready to take your position. I watched professor after professor yell at their international students because they knew they could, because they held the power, and the moment someone tried to pull that shit on me, I used my privilege and told them to f-off. Valuable life lesson learned here because that decision cost me roughly an additional $70-80k in student loans 🙄 would do it again if I had to without blinking an eye. I spent the rest of 2011-2014 randomly doing consultant work for the same restaurants I left and also fully covering my own masters program on federal student loans.

At this time I got to know a great professor within my department and he said he could cover my PhD if I was interested. He was one of the good ones – so I swallowed my pride and went all in on the education for the second time… this time I became addicted. Traded the alcohol for ‘research’ and was fully absorbed into a wonderful area of being on the fringe of capabilities and expectations. For someone like me this is a drug within a drug and I found my place of where I wanted to be. I wanted to teach and give others opportunities that I was fortunate enough to have – but take what I had experienced and make the changes needed. Within three years I finished my class requirements, passed my candidacy exam, and was all but dissertation rolling into the fall of 2017 with a plan to finish by 2018… then came a job opportunity.

I had a chance to get to know some amazing people through my first few years of my PhD program. Really got close to a few fellow students – watched as they went on to finish their degrees, find their significant others, start families, it really was the best part of my entire long winded educational route. I also had a chance to get to know some of the previous alumni of the department who had gone on to other academic think tanks and to those that were working over at an applied research center called the Virginia Modeling Analysis Simulation Center (VMASC). I was in talks with them on aligning a post-doc position after the 2018 expected graduation. Sometime over the summer of 2017 they reached out to me and asked if I would come over earlier – while I was still finishing my PhD. I was initially shocked because I didn’t even think that was an option. So I applied for a job opening they had. This was yet again a wonderful opportunity and given the other 100 chances I’ve had and I really thought about it this time. I talked with my advisor and he said it would be a good opportunity for me to take up as it would financially help and align my research interests. He said the hardest part with this decision would be to finalize and prioritize my degree. He was 100% right 🤣.

VMASC Years

I started working with VMASC the fall of 2017. Single best job I’ve ever had and equally it was like giving the addict the key to the secret stash. Not only was I hooked, but I had an equivalent of an IV at this point on full drip. I was exposed to so many amazing researchers and amazing opportunities on a daily basis that it was at first so overwhelming I didn’t even realize what was happening to me. I was working like crazy before and now I was making attempts to run anywhere between 14-18 hours a day 7 days a week… in one month I think I managed something like 500-550 hours… that’s roughly 25% of a year of ‘normal’ work in a month… Just a few weeks ago I was looking through an old hard drive that had my first year of project folders and was amazed at how much just raw programming development work I did that first year at VMASC. Just stupid amounts of things I built, helped build, ideas I crafted and created, researchers I met, presentations I went to or gave, conference trips, research lunches, project management meetings, weekend community outreach efforts, it was all the time, go-go-go-go… late night conversations about life and purpose and discussions about helping those around us. I was incredibly grateful for the life lessons I was exposed to that first year and into my second year I started to identify that I was full tilt developing incredibly unhealthy lifestyle patterns. At the very same time my significant other was on her own deep dive back into looking into PhD programs. She was working non-stop as well so we were both in the deep ends and it seemed okay…

Coming into the end of 2018 people started to understand I had limits as I was showing some cracks but I wouldn’t yield… those around me knew I was close to falling apart and they tried to keep the research away from the research drug addict but I heard about a project that just screamed extended reality and I had to be part of it… it was the first time I was told no and I had a mini internal fight with my fellow people. I backed down as I had learned that they were looking out for me. The project hit a wall and the people they had went with didn’t understand the needs of the external researchers and I found myself in a meeting that would course align me and my PhD. I didn’t know it yet – but I found my first white whale. The calling had been answered and I was about to embark on a new sort of unknown project… yet at the same time such a simple known idea would emerge.

Project Ambitions

I was clueless when it came to narrative modeling. As I was listening to these two researchers explain their concepts and what they needed I kept seeing in my head a systems dynamic model but they kept insisting that they were looking ‘between the states’. In all of my background and work what they were talking about was more or less the main differences between discrete event concepts and continuous simulation concepts and I kept thinking of Paul Fishwick and his work. To me this wasn’t a problem but more or less we were speaking the same truths just using different language. We finally started to work towards a unified concept where I saw the opportunities for enhancing a spatial based conceptual modeling concept and they got a tool that allowed them to track and build these situational influence models.

Some papers came out of it and I got really close to having something almost working… then the project officially ended and we sort of went our ways except I couldn’t stop thinking about the implications. We had recently hired another individual who shared a similar backstory to myself – he had been around the world but more or less found his way back to his roots of wanting to pursue higher education, he and I set forth on making attempts to find something challenging within this project. He came across the term WunderKammer and thus is owed the credit for the name – but the concept is rather simple.

Provide a way to maintain state by user defined action. Take concepts from version control and embed a memento-pattern into the software design, put the entire thing to a spatial coordinate system including scale, and then allow the user to define their own definition of time. A sort of node-graph visual programming structure meets animation states and versioning and state delta changes but in extended reality.

“WunderKammer is a system of systems that are layered together to allow for interactive synchronization of information over time and space. The tool utilizes real-time game-engine technology to be one of the first extended reality conceptual modeling tools built that follows best practices of information visualization and equally has created a novel user interactive input solution to nested/containerized objects in a 3D volumetric space.”

John Shull, University Disclosure Process 2020

Allow mixed media and different structures to be brought in and managed and then allow for visual nesting of objects. If you know anything of 3D visualization this is a sort of fun nightmare scenario. We can only manage so much interactive information within space and perspective. Traditional visualization has a ton of caveats when dealing with 3D. In most circumstances these caveats are because of fixed perspective and when you account for a full 3D system like in VR where you can traverse the space you can overcome some of these known problems but you generally create new problems. It still remains that nesting and forward/backward culling challenges arise at every opportunity. Especially when you’re connecting nodes together and there could be an assumed ‘forward/back’ position which then defines right/left and in some cases this might not be the case because you’re behind the model and now right is left and left is right… yes I know what I just wrote and I know it’s confusing this was most of my 2019.

A spatial journey to what it means to be an object and a container simultaneously. Now everything is a container and oh my it’s just another fucking container are common phrases we echo to each other.

This project because it was an internally funded effort had to go a certain route to continue to work on it after the project was officially over. I recently went through a university disclosure process and am now able to discuss this work within some constructs. The hardest part of this project is the fact that it needed to be the only thing I was focused on but it wasn’t… like the year before it I was burning hours at an insane rate and unable to fully focus in on one major effort – the disease that is within the sort of middle tier of applied academic research. In smaller centers they generally have the time to work towards something because it doesn’t take much from a funded stand-point to keep the lights on, at the bigger centers they generally have more money than they know what to do with and are setup to provide various levels of support for various efforts, somewhere in the middle you’re getting yanked in both directions and generally understaffed to support it all but you always pick-up the phone when it rings… that’s all I will say about that as those who know, you know what I mean.

So in my off hours of work I was enhancing the thing I didn’t get time to finish. Roughly 6 months after the project I hit a major milestone and was able to demonstrate a visual and user driven method to easily visualize nested containers and interaction between the nesting all within a very simple user experience from any direction. The opening sequence to this website is linked to a unlisted YouTube video of me rambling through one late night stepping through this tool at this sort of working moment. Still a few smaller bugs (local vs world coordinate problems) but for the majority of what the original project set out to do got to this point of nested objects was accomplished, just a few months after the fact and on my own time and dime yet again…

So is the project finished? Ha! Far from it! I am making this effort the cornerstone of my PhD so I cannot give away too much but I will be writing more about it here on this blog. Thank you for making it this far as I feel it’s important to try and give some personal reflection on how work crosses paths with daily life and sort of social norms. I know that a lot of my language and statements in such posts can always come back to ‘haunt me’ but it’s my side of the truth I want to bare to let those out there who might be in a similar situation know that not everyone get’s to where they think they should be and some do. I was asked a question last week in a virtual presentation to high school students on what people with my job “do”. At the end one of the students asked me this question:

Was this the dream job you wanted when you were in high school?

2020 High School Student Anonymous Question

I had to think for a few seconds because I know it’s what others would call a “dream job”. I see it as a privileged job. My answer was more or less this job was an outcome of right and wrong decisions and privileged thinking. When I was 15 I had recognized a calling by making a mod to Half-Life called Day of Defeat. Don’t worry I wasn’t on the final team – during my senior year in high school I put down the computer mod community and tried to focus on school… some of the other kids got picked up and Valve made a push to release it. One of those moments looking back where timing didn’t pan out… or maybe it did? 😉

Guess I didn’t realize then that it would take me roughly 19 years to get back to what I had discovered then. I didn’t know then that really there was a job where I could apply those skills outside of making video games. That I had to go through my own personal trials to figure out what was right in front of me the whole time was a privilege and that now my job is to make this so anyone else can obtain it and to find how to draw what the line of ‘finished’ looks like for me.

In my case, this whole process has privilege wrapped all around it – now I have worked really hard to balance that out and justify my work but I understand that I wouldn’t be where I am without privilege and wouldn’t be able to maintain where I am without the hard work – yet at this moment in time I have to use my privilege to sort of steady the fight to finish these projects and make every attempt I can to avoid taking on more responsibility and work – not because I don’t want to, but because it will be doing a disservice to the current efforts. That as much as I enjoy shiny object syndrome, I also have to realize that the toughest route isn’t the one less traveled, it’s the one where you finish. Regardless of what path you find yourself on – make the strives and self-sacrifices to dedicate to the art of finishing without compromising your self worth and your time. The additional hours I put in early on were unfair to those around me – I was in a privileged spot to even have the time to do that and thus have come to identify my own erroneous ways and look towards utilizing this space to write about it. Hopefully the following posts will be more concise and to the point and less ramble… one can hope 😄.