captain-braindump
captain-braindump
Brain Dump
43 posts
A work log of a Mixed Reality final year project
Don't wanna be here? Send us removal request.
captain-braindump · 8 years ago
Text
Development 27 - The differences between 5 star markers
I’ve been trying to work out why some markers are more effective than others. This is one marker which always proves troublesome on my larger piece. Therefore I kept the original and made 4 alterations to the image, the alternatives change the amount of detail in the image and all change the image to black and white. The further left uses glow to make the edges stand out, next to this is the original, followed by a sketch (most detail), a normal black and white then a black and white with curve alterations on the furthest right. The glow and colour seem to have more tracking issues that the other 3, with the plain black and white being the easiest to find. I am not sure if this is consistent with all pictures. 
I also had a look in Unity profiler to watch the fps; everything seemed normal.  
0 notes
captain-braindump · 8 years ago
Text
1. Fix pathfinding and the physics of the players rotating as they navigate.
1. Make the AR models clearer (assets or colour should be altered).
1. Fix the orientation, size and speed of the projectiles to make them clearer.
1. Make structures react to being shot beyond being destroyed.
1. Create interview questions for user test.
2. Fix the reset button (UI stopped working after updating to Unity 5.4.1)
2. Complete the NPC attack flow (continue travelling and attacking until the castle is destroyed.
2. Fix the focus on mobile devices (the images don’t auto focus at all).
3. What makes a good marker (improve the photographic marker and do more comparisons of markers and the ability to find them).
3. Research different android components to decide the best range of devices to test.
3. Android device testing (So far the application has been tested on a motorolla and samsung both running android 6).
3. Create a menu system.
4. Create a button to exit the application
4. FPS counter (the difference between loading on the motorolla and samsung appears considerable) - just use unity profiler
4. Prompt users interaction within the application.
Project Update Video;
https://puu.sh/v1ah1/2a5d6b26c4.mp4
0 notes
captain-braindump · 8 years ago
Text
Development 26 - Mobile Focus
2. Fix the focus on mobile devices (the images don’t auto focus at all).
To assist in the recognition of images on mobile devices I implemented this code;
https://library.vuforia.com/articles/Solution/Camera-Focus-Modes
This means that mobile devices now the mobile device can focus on all images. Though the focus does go in and out somewhat which may be a little disorientating. Other options could be to allow touch focus but this would mean that no other touch-based interaction would be possible. 
I added this to the default trackable behavior. 
However, once the NPC’s have spawned the device doesn’t recognize any further markers. This means that the flow of the game does not work on mobile. 
0 notes
captain-braindump · 8 years ago
Text
Tasks - 7 Days to Demo
1. Fix pathfinding and the physics of the players rotating as they navigate.
1. Make the AR models clearer (assets or colour should be altered).
1. Fix the orientation, size and speed of the projectiles to make them clearer.
1. Make structures react to being shot beyond being destroyed.
1. Create interview questions for user test.
2. Fix the reset button (UI stopped working after updating to Unity 5.4.1)
2. Complete the NPC attack flow (continue travelling and attacking until the castle is destroyed.
2. Fix the focus on mobile devices (the images don’t auto focus at all).
3. What makes a good marker (improve the photographic marker and do more comparisons of markers and the ability to find them).
3. Research different android components to decide the best range of devices to test.
3. Android device testing (So far the application has been tested on a motorolla and samsung both running android 6).
3. Create a menu system.
4. Create a button to exit the application
4. FPS counter (the difference between loading on the motorolla and samsung appears considerable)
4. Prompt users interaction within the application.
Project Update Video;
https://puu.sh/v1ah1/2a5d6b26c4.mp4
- The game now flows from start to end, I should make some updates to the flow so that the NPC’s do not attack before the 3D model is loaded but this is now a full prototype.
0 notes
captain-braindump · 8 years ago
Text
Development 25 - Development Woes
- Everything within unity is scaled very small, this is based upon the marker size.
- My non-playable characters are gaining height to the multiple of 7 when loading into the game at realtime, this cannot be changed in the inspector. 
Restarting the project to make it lean
Reuploading all images and scaling them to X15
Does scaling the targets make them more recognisable? 
- No, I’m still having issues getting all of them so show up and continue tracking. If tracking is lost it isn’t always possible to find the objects again. 
Accidentally enabling smart terrain will prevent you from applying extended tracking despite disabling the smart terrain and deleting it from the hierachy. (Smart terrain allows for the tracking of real world items which meet the same criteria are normal tracking; https://library.vuforia.com/articles/Training/Getting-Started-with-Smart-Terrain) 
Tumblr media
It seems that the objects still don’t remain with the navmesh.
Tumblr media
0 notes
captain-braindump · 8 years ago
Text
User Testing
For the user testing I decided not to complete questionnaires but instead to watch how users tried to use the application, first freely then with guidance. This allowed me to observe their movements and allowed them to talk me through their thinking. 
It seemed that placing the real world map on the floor made it more difficult to track the markers than when the poster was on the wall. 
I need to communicate to the users that something is a target. This might be through putting them in a box....
Users enjoyed searching for targets.
Finding targets is fun to users. Though this could be more useful in another type of game. Which leads me to believe I need to prompt users along more.
Roughly half of the users attempted to interact with the game or NPC’s though touching the screen, I should work on making the mobile movement more clear and possibly add touch interaction in the future ie tapping the location players want the NPC’s to attack. 
The castle 3D cube is too big. 
Users were excited as things moved out towards them in 3D. 
Users assume that tapping on the screen will focus. 
1 note · View note
captain-braindump · 8 years ago
Text
Development 24 - Navigation Woes - Part 2
By stopping the agents from firing out of distance to targets it was clearer to see the navigation. It appears that the castle is not baked into the Navmesh and is above where the agents move too which causes them to travel in an unexpected manor. 
0 notes
captain-braindump · 8 years ago
Text
Development 23 - Navigation Woes
Presently the agents walk toward the final destination but do not complete the journey. The walk away from the target but past the previous location. According to unity documentation;
https://docs.unity3d.com/ScriptReference/AI.NavMeshAgent-destination.html
If an agent cannot reach the destination they will return to the previous point. This is not the case in my project.
0 notes
captain-braindump · 8 years ago
Text
Development 22 - Completing the attack cycle
Complete the NPC attack flow (NPC’s continue traveling and attacking until the castle is destroyed).
This is proving to be one of the greater challenges so far, this entails finding if a building which is a child of a target has been destroyed. If this is the case the code needs to know which building this is and if it is the first to go to the second. 
To make this the key logic in the game manager monosingleton needs to be rewritten while taking into consideration vuforia’s OnTrackingFound doesn’t always flow through. 
It seems the combination of destroying objects to drive agent navigation with tracking the objects is proving complex.
https://puu.sh/uOueL/2888bceaa5.mp4
0 notes
captain-braindump · 8 years ago
Text
Development 21 - Agents and Navigaton
1. Fix pathfinding and the physics of the players rotating as they navigate.
1. Make the AR models clearer (assets or colour should be altered).
1. Fix the orientation, size and speed of the projectiles to make them clearer.
1. Make structures react to being shot beyond being destroyed.
1. Create interview questions for user test.
2. Fix the reset button (UI stopped working after updating to Unity 5.4.1)
2. Complete the NPC attack flow (continue travelling and attacking until the castle is destroyed.
2. Fix the focus on mobile devices (the images don’t auto focus at all).
https://docs.unity3d.com/ScriptReference/AI.NavMeshAgent-velocity.html
Agents keep spinning and moving in an unexpected manor.
This may be because the agents are already told to navigate toward a target and adding velocity (which prevented them from colliding badly when spawning) is pushing them in other directions. 
Changing the velocity to only be added upon start did not fix this.
Removing the rigidbody  fixed the navigation and rotation, as did freezing all constraints. Though the players now enters the buildings showing collision issues. 
This is because transform simply moves the object, if I want the players to obey the laws of physics I need to move them with rigidbody physics ie velocity. 
http://answers.unity3d.com/questions/203989/rigidbody-player-goes-through-wall.html
Shooting
When realigning projectiles be careful not to alter the size.
Tumblr media
When working with projectiles if you don’t want something to move when it gets hit just destroy it on collision. 
   void OnCollisionEnter(Collision col)    {        if (col.gameObject.tag == "Arrow")        {            Destroy(col.gameObject);        }    }
Completing the flow
Using the destruction of an object to tell the monosingleton to move to the next location though the instance of a function call in the script on the building which is destroyed. However how to I put this so that the correct new target is set.
Progress Videos
This is a video demonstrating the locked X and Z rotations on the rigidbody.
This is a video demonstrating the locked x and z rotations on the agent rotations in a small swarm.
This is a video which showcases enabling the players to shoot again, which results in them shooting at each other and causing physics collisions I do not want to happen. On the plus side this demonstrates the navmesh working effectively.
0 notes
captain-braindump · 8 years ago
Text
Development 20 - Vuforia - General Game Development
https://forum.unity3d.com/threads/addforce-vs-addrelativeforce-vs-rigidbody-velocity.32808/
1. Fix pathfinding and the physics of the players rotating as they navigate.
1. Make the AR models clearer (assets or colour should be altered).
1. Fix the orientation, size and speed of the projectiles to make them clearer.
1. Make structures react to being shot beyond being destroyed.
1. Create interview questions for user test.
2. Fix the reset button (UI stopped working after updating to Unity 5.4.1)
Building Material.Color
Made the colour of the buildings reflects their health, this is clearer than having health bars and emphasizes that they aren’t 2D.
Troop Shader
Made the troops pink to make them bolder as they’re really small on device and made them a little bigger though this makes them less realistic in size compared to what they’re attacking. 
Lighting
Added a light to the scene, which had caused difficulty when attempting to hard code my own AR application as it had lit the plane I was putting the camera texture onto. In this case however, lit objects within the scene look as they should in a Unity world.
UI Buttons 
To fix the buttons which stopped working after I updated to unity 5.2.1 I had to add a standalone input module. Special thanks to unity answers here; 
http://answers.unity3d.com/questions/1071055/unity-52-buttons-onclick-function-not-running.html
Reset Button
I changed the reset button so that instead of resetting marker 1 it reloads the whole scene so that if the animation has begun and isn’t aligned it can be realigned by beginning the level again. 
https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.LoadScene.html
Application.LoadLevel("Custom/AceMarker"); // has been depreciated use
https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.LoadScene.html
using UnityEngine.SceneManagement;
SceneManager.LoadScene("Custom/AceMarker");
Moving forward
Velocity vs Add Force
I need to decide if it is better to use add force or velocity for the projectiles. I believe this is causing the players to spin despite adding look at code.
https://forum.unity3d.com/threads/addforce-vs-addrelativeforce-vs-rigidbody-velocity.32808/
Focusing the Camera
https://developer.vuforia.com/forum/unity-extension-technical-discussion/controlling-camera-focus-unity-plugin
https://library.vuforia.com/articles/Solution/Camera-Focus-Modes
Progress Video
https://puu.sh/uJ0x9/e1208e84d0.mp4
0 notes
captain-braindump · 8 years ago
Text
Development Priorities
6 days to user test
21 days to demo
1. Fix pathfinding and the physics of the players rotating as they navigate.
1. Make the AR models clearer (assets or colour should be altered).
1. Fix the orientation, size and speed of the projectiles to make them clearer.
1. Make structures react to being shot beyond being destroyed. 
1. Create interview questions for user test. 
2. Fix the reset button (UI stopped working after updating to Unity 5.4.1)
2. Complete the NPC attack flow (continue travelling and attacking until the castle is destroyed.
2. Fix the focus on mobile devices (the images don’t auto focus at all).
3. What makes a good marker (improve the photographic marker and do more comparisons of markers and the ability to find them).
3. Research different android components to decide the best range of devices to test. 
3. Android device testing (So far the application has been tested on a motorolla and samsung both running android 6).
3. Create a menu system. 
4. Create a button to exit the application
4. FPS counter (the difference between loading on the motorolla and samsung appears considerable)
4. Prompt users interaction within the application. 
4. Create a tool for eaily dropping new meshes into replace the standard 3D shapes in AR which size to the current collider size. 
0 notes
captain-braindump · 8 years ago
Text
Development 19 - Vuforia - General Game Development
Adding shoot mechanics to the players means;
- giving the players bullets to instantiate.
- giving buildings(defences) health.
- destroying the buildings when the health gets below a certain point.
- making the players only shoot once buildings have been found.
- destroying bullets that hit and miss. 
- wondering why the players spin around alot
- stopping players from shooting eachother.
Stupid Mistakes:
I should of named all my apk’s different things instead of overwriting.
I should of used real source control.
Vuforia configuration contains a number of key properties, there isn’t a clear break down of what everything does in this tab.
Reasons I hate Vuforia and android combining
Porting to android since adding multiple markers has been an issue. The device won’t pick up the markers or won’t pick up the 2nd and 3rd markers. 
This means the overall project struggles to run since the troops cannot travel from marker to marker and shoot down the buildings. 
Enabling device tracking in vuforia configuration did not help. It seems the camera is not in enough focus enough for the 2nd and 3rd markers. 
https://developer.vuforia.com/forum/unity-extension-technical-discussion/controlling-camera-focus-unity-plugin
https://library.vuforia.com/articles/Solution/Camera-Focus-Modes
Changing the AR world centre mode to device will mean that it automatically changes to this no matter how many times you revert to FIRST_TARGET.
Progress Video
What this video shows is; 
- Troops (capsules) spawning on a start point.
- The tracking of other markers being enabled.
- Once the second marker has been found the troops will begin to shoot and travel toward the marker. (Though right now the troops spin around a lot and can shoot at eachother).
- The 3D model on the second marker will eventually be destroyed as its health reaches zero. 
https://puu.sh/uImRV/f8ad1f92cc.mp4 
0 notes
captain-braindump · 8 years ago
Text
Development 18 - Vuforia - Alignment Issues
The spawned troop capsules can appear quite a distance from the start marker. This takes away the immersion that they’re part of the poster.
I could possibly give the user a button so that they can align the 3D objects with the poster such as STTS here (Vuforia PNG);
https://developer.vuforia.com/forum/digital-eyewear/alignment-issue
Issues:
The button would disable and enable the marker in Unity so that it could be found again.
Delay between moving away from marker 1 or 2 when the agents are navigating and returning. 
The gif below highlights some of the difficulties I am presently experiencing. At the beginning the application is restarted as the first marker is not being recognized. Following this, the other marker cannot be found, and when it is though the capsules navigate along the pathway they do not appear aligned with the poster. Sometimes the simulation runs very well, other times not at all. This is the same on mobile device. 
https://puu.sh/uCXd6/b071913f5a.mp4
0 notes
captain-braindump · 8 years ago
Text
Development 17- Vuforia - Bugs
Fix the rigidbody spawn.
Set the velocity on update to prevent the NPC’s from flying everywhere;
https://docs.unity3d.com/ScriptReference/Rigidbody-velocity.html
I did this on the X axis so that they align along where the grass verge would be on the map. 
If Vuforia can’t initialise = restart Unity
Dynamically set the target destination for Agents in Monosingleton
It LIVES!
But can take an obscene amount of time to find the targets, which is concerning. How long will a user fiddle with the camera distance before giving up. 
Tumblr media
If the agents don’t load into the scene this will create issues with the tracking / traveling toward targets.
Tumblr media
Other issues include the agents not being placed onto the mesh which results in unity errors and difficulty getting responses from all the markers. If the user boots into the game close enough to the start marker they will generally be okay. I’m going to try to disable all markers with exception to the first until the agents have been spawned in hope that this will ensure they are placed onto the mesh.  
0 notes
captain-braindump · 8 years ago
Text
Development 16- Vuforia - The hierarchy resolution
In the single marker demo I used the hierachy to demand when the NPC’s could move toward the target and when they couldn’t. This was difficult as making markers children of each other isn’t effective while all objects needed to speak to the NPC’s the enable and disable movement. This mean that making that some kind of manager was required.
Now a monosingleton is being used to take in the name of the trackable markers. These can then be set as the target for the navigation. While each NPC has is own script which enables and disable the movement of the object by passing down commands from the singleton. The velocity of the ridigbodies is also set to zero here. The monosingleton also instantiates the NPC’s which means that this can be edited by the designer to be a few troops or a fuller army, the same is true for the dynamic array allowing more targets to be added to the system at any time. 
Creating own markers to create strong 5 star feature tracking rather than photographs which are more representative but contain a lot of circles which does not allow for edge detection. I had to build up the markers a lot so that they are 5 star. 
Tumblr media
Issues to resolve; 
All NPC’s are spawning on top of each other.
The NPC’s aren’t spawning on top of the marker but across from it.
Work out why despite having 0 velocity the rigibodies are causing the NPC’s to fly away from eachother. 
Future Aims;
Add real 3D models.
Add cutscenes.
Add menu System.
Add interaction.
Add zooming camera.
Build for ios.
Tumblr media
0 notes
captain-braindump · 8 years ago
Text
Development 15- Vuforia - Concurrent Markers
Remaking the markers means that is is possible for all of them to be visible at once. Though this may require showing zero markers to access others. This is very tempermental.
Tumblr media
0 notes