Not using Metal, but get error "Metal GPU Frame Capture Enabled" - sprite-kit

I am creating a simple SpriteKit game that uses SpriteKit, UIKit, Foundation, and nothing else in terms of frameworks.
However, every time I tun the app I got the following two errors:
Metal GPU Frame Capture Enabled
Metal API Validation Enabled
How do I un-enable the Metal frameworks and make these errors go away?

Do not worry, they are not errors just messages.

If your target links to the Metal framework (or any other framework
that uses the Metal API "SpriteKit"), Xcode automatically enables GPU Frame
Capture and Metal API Validation. Enable these options in your app’s
scheme to use the host of tools Xcode provides with Metal Frame
Capture, and to test for correct API usage with Metal API Validation.
You only disable these options when you want to test your app’s
maximum performance level.
Enabling/Disabling Frame Capture

Related

MTLCreateSystemDefaultDevice() returning nil on iPad with iOS 10.3

I am trying to do some fluid simulation with Google's Liquidfun and Metal, using an iPad running iOS 10.3. However, the initial call to MTLCreateSystemDefaultDevice() is returning nil.
I have the following console log, so I know that Metal is supported on the iPad, but I am not sure how to debug this issue.
2018-07-02 20:28:44.547645-0500 chem-lab-practical[529:464344] [DYMTLInitPlatform].
platform initialization successful 2018-07-02 20:28:44.781763-0500
chem-lab-practical[529:464294] Metal GPU Frame Capture Enabled 2018-07-02
20:28:44.783609-0500 chem-lab-practical[529:464294] Metal API Validation Enabled
(lldb)
I have not found similar questions on stack overflow and am a beginner to using Metal, so I am not sure how to begin to debug this issue.
So... I guess I wasn't looking hard enough because I've found an answer here (iOS code to identify metal support in runtime?).
According to the post,
Note that just testing for the presence of a Metal framework class doesn't help — those classes are there on any device running iOS 8 (all the way back to iPhone 4s & iPad 2), regardless of whether that device has a Metal-capable GPU.
For reference, this is a list of Metal compatible iOS devices (https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/HardwareGPUInformation/HardwareGPUInformation.html)

Is it possible to develop a virtual world that is accessible via both a PC and a virtual reality headset?

For example, if you have a virtual reality headset, you can interact with this virtual world in VR (i.e. WebVR); however, if you don't have a VR headset and/or WebVR compatibility can still access and explore this virtual world (i.e. like Runescape) and interact with characters, whether they are VR or web in the same virtual world?
The A-Frame framework handles that for you automatically, or you can roll it yourself, if you're using another framework. Either way, the different control schemes require a fair amount of thought.
You could also take a look at React360 (https://facebook.github.io/react-360/), it is a WebVR based framework from Facebook and can handle most 3D media out of the box. It performs quite well and has the advantage of progressive enhancement, i.e. if you view it from a desktop/tablet you get a 2D experience, if you are on a 3D capable device you get a full VR experience.
It's also cross platform so will run on android/iOS/Windows/MacOS/Oculus/Vive. Samples are included with it which should be enough to give you an idea of its capabilities.
Depending on the complexity of the game you are trying to develop and the graphical control required A-Frame is another option to look at.

How to Determine Metal Device VR Support

I am looking to create a macOS 10.13 application that tests for virtual reality support. What would be the best way to test a Mac for VR support, considering the CPU, GPU, and connectivity requirements?
Also, given a MTLDevice, is there a way to check for VR support using the Metal API?
I have tried to check the default system Metal device for macOS GPUFamily1_v3 support, but that does not completely answer the question of whether a device supports VR on macOS. The code below is what I use to test support for the Metal feature set.
let defaultDevice = MTLCreateSystemDefaultDevice()
print(defaultDevice?.supportsFeatureSet(.macOS_GPUFamily1_v3))
There is no such thing as "Metal VR Support". There is no special capability or GPU-level feature required to render for VR. Furthermore, there is no such thing as a "spec good enough for VR" as it relies completely on the resolution and frame rate of the particular headset used, as well as your application.
You can query the IOService layer to get GPU model and specs, but you will have to extrapolate the capabilities for yourself based on your personal requirements.

Hololens - create app on desktop

I can't figure out the wording to research the following idea.
With the Holograms app, I can set the hologram and see the other apps front window or use web browser at the same time.
How can I create an app that does not occupy the whole system but only run on the desktop with browser and others?
EDIT: I am trying to run an hologram within the shell.
https://developer.microsoft.com/en-us/windows/holographic/hololens_shell_overview
Mostly, this is for 2D apps, but the Holograms app runs 3D holograms, so is it possible to duplicate this?
3D Hololens apps do not currently support running side by side with other applications. As of the May release you are able to run multiple "flat apps" (UWP apps) side by side:
https://developer.microsoft.com/en-us/windows/holographic/release_notes_-_may_2016
Currently there has not been any announcement about running multiple 3d apps side by side. I optimistically hope that this is coming in a future OS release.
If I understand you correctly, you are interested in creating an application for the Hololens that rather than having it "appear in the world around you", would run in a Window (Desktop) that would appear in the spatial world (like Edge). If this is correct, any UWP application can run Windowed and be placed in you virtual space. You don't need a specific Hololens project for that. If however you want to pull in spatial data, you would need to wire-up the required events so that spatial data callbacks handle the incoming data. I'm not 100% sure Unity is a best fit for this problem (at least currently) since they are focusing attention on Spatial hologram applications rather than desktop UWP applications that consume spatial data.
Just to note, it is worth stating that a single 3D app (ie Unity developed) takes over the whole HoloLens device and experience. If you bloom (windows key in emulator) you can change to the UWP app view but you can't see other apps at the same time.

Google Cardboard controlling PC

When I saw the Google Cardboard for Unity, I assumed this meant that you would be able to make a Unity PC game and use your phone as a screen/controller. All I can see is it wanting me to make an android app which is all well and good, but it doesn't allow for input from the keyboard.
Is there a way to stream the Unity PC project to the device and retrieve input (i.e. Headtracking, NFC magnet)?
The problem with such a solution is latency. In VR latency is a big deal. The overall latency from input to photons reaching your eyes should be 20ms or lower. Regular games have 30-60 ms latency by themselves. Add to that the gyro latency, the phone display latency... If you want to add another 25ms or more ping to your VR experience, that's gonna be painful and may even make you sick. If you want to read more on why latency is such a big deal in VR, Michael Abrash wrote an excellend blogpost about it: post on latency
If you want to necessairly use a keyboard for navigation, consider using a bluetooth keyboard that can be used with android devices. Also keep in mind that with the current technology, especially without a dedicated headset, really dynamic vr experiences probably won't work very well and can make some people uncomfortable or sick. For a good read on designign virtual reality experiences, please refer to this guide from the Oculus Rift: http://static.oculus.com/sdk-downloads/documents/Oculus_Best_Practices_Guide.pdf
There's nothing in the Cardboard SDK for talking with a PC-hosted Unity game. You could adapt the code from the Unity Remote 4 project:
https://www.assetstore.unity3d.com/en/#!/content/18106
We are developing the app what you want except it uses GearVR instead of Cardboard. Please check the link below.
http://challengepost.com/software/airvr
Streaming from your PC to your phone's Cardboard is possible using third-party apps, such as Trinus VR (the client app on your phone) and Vireio (the streaming app on your computer). The two apps will then communicate via your home network (Wi-Fi or other) to stream the images.