New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SpatialUnderstanding HoloToolkit module - first time checkin #187
Conversation
This module builds on top of the spatial mapping component, analyzing the environment and supporting queries like - what is floor, ceiling, and much more. This module exposes the analysis techniques used in Conker and Fragments.
public Cursor AppCursor; | ||
|
||
// Properties | ||
public string SpaceQueryDescription |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: I wonder if you can get away with public string SpaceQueryDescription { get; set; }
Unless you really need objectPlacementDescription = "";
Just played around a bunch with this - tool cool! My whole team is very excited to have this! |
This is amazing! Thank you! I am trying to save the UnderstandingCustomMesh to a file and reload it during the game in order to use for collision so I don't have to rescan every time the game is played. I do this after finalization. It works like a charm... kind of. Problem is, even after waiting for ScanStates.Done, when I pull the mesh filters to save the meshes, it is not the finalized, closed mesh. I am certain that all meshes being pulled by:
are being saved. Any thoughts on how I can pull the entire, finalized, closed mesh from UnderstandingCustomMesh? |
I figured out the problem. I was assuming that when the scan state is done, then mesh finalization was complete. I then realized that at this is set at the end of SpatialUnderstanding.Update_Scan() and is set immediately after the start of the final import coroutine. Rather than having it depend on the state, I simply retrieved the mesh upon exiting the room scan and it works beautifully. Right now my class only supports saving one room but it can easily be expanded. Thanks again for a great tool! |
This may not have been due to these changes, but the first time I tried importing this branch into a Unity project I got 14 errors that all said the same thing:
Again, it may not be due to this branch but I wanted to at least report it and see if anyone else experienced the same thing. I cleared the error messages, closed the project and opened it again and I haven't seen any errors since. But I also tried to look up that error and didn't find anything helpful. |
Also, looking at the inspector in your demo scene (Main) the camera is missing two scripts. The first missing script is right after Gaze Manager and it has three inspector properties:
The second missing script does not have any inspector properties, but it's the last one in the behavior list for Main Camera. |
@JeffPack can you share the code you're using for saving the entire SpatialUnderstanding mesh? And can you explain a bit more about when you're triggering the save? I would like to use the scan of my living room in the Unity editor at design time. Thanks man! |
## SETUP | ||
1. Import the HoloToolkit into the project | ||
2. Open the Scenes\Main level | ||
3. Build for HoloLens |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know "Build for HoloLens" step should technically cover this, but you might want to add "Don't forget to turn on the SpatialPerception capability under Player settings." I created a new Unity project, used the HoloToolkit menu item to apply project settings, then imported your scene. When I first ran it on the device it took a minute or two before dawned on me why it wouldn't progress beyond the "Scan your play space" message. Doh!
Oh, and I just wanted to say that this is going to be phenomenally helpful for everyone. Thank you so much for taking the time to contribute this @jevertt! |
I've experienced the same thing as @thebanjomatic. I also noticed that if I walked too far away from the place where I first started scanning, when I returned to that place later it wouldn't resume scanning in that area. The whole area was just blank and no matter how much looking around I did it would never resume again in that area. |
Wow @JeffPack! Thank you so much for sharing all of that in detail! I think we should be sensitive to this thread though, since it's dedicated to the actual pull request we're all excited about. I'm thinking there's probably a better place to post all that info than directly inline here. What I'm going to do is open up a new "Issue" and ask for help saving the mesh. Would you be so kind as to remove that content above and post it in response to my issue? Then we can mark the issue resolved. Here's a link to the issue: #188 |
public class SpatialUnderstanding : Singleton<SpatialUnderstanding> | ||
{ | ||
// Consts | ||
public const float ScanSearchDistance = 8.0f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since SpatialUnderstanding.cs is not sample code and is part of the actual toolkit, shouldn't ScanSearchDistance be an inspector variable instead of a constant?
…emoved \ProjectSettings Keeping it consistent with the other examples, per Neeraj's request
Merging this code now so everyone can benefit from 'master'. |
This module builds on top of the spatial mapping component, analyzing the environment and supporting queries like - what is floor, ceiling, and much more. This module exposes the analysis techniques used in Conker and Fragments.