ARKitEnvironmentMapper alternatives and similar libraries
Based on the "ARKit" category.
Alternatively, view ARKitEnvironmentMapper alternatives based on common mentions on social networks and blogs.
-
ARKit-CoreLocation
Combines the high accuracy of AR with the scale of GPS data. -
iOS 11 by Examples
๐จ๐ปโ๐ป Examples of new iOS 11 APIs -
ARVideoKit
Capture & record ARKit videos ๐น, photos ๐, Live Photos ๐, and GIFs ๐. -
SmileToUnlock
This library uses ARKit Face Tracking in order to catch user's smile. -
Virtual Objects
ARKit - Place virtual objects using ARKit. -
Placenote
PlacenoteSDK Sample app in native iOS using ARKit, written primarily in Swift -
ARHeadsetKit
Using $5 Google Cardboard to replicate HoloLens -
FaceTrigger
Easily use ARKit to detect facial gestures. FaceTrigger is a simple to use class that hides the details of using ARKit's ARSCNView to recognize facial gestures via ARFaceAnchor.BlendShapeLocations
InfluxDB - Power Real-Time Data Analytics at Scale
Do you think we are missing an alternative of ARKitEnvironmentMapper or a related project?
README
ARKitEnvironmentMapper
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Installation
ARKitEnvironmentMapper is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'ARKitEnvironmentMapper'
Usage
To initialize with a base environment map with an image asset named, for example, "room", use the following code:
let environmentMapper = ARKitEnvironmentMapper(withImageName: "room")
Note that the input image has to have a 2:1 aspect ratio.
Alternatively, you can initialize it with a height and a color:
let environmentMapper = ARKitEnvironmentMapper(withMapHeight: 512, withDefaultColor: .red)
To start the mapping process, call the startMapping()
method. You should call this method a couple of seconds after running your ARSession
in order not to get wrong mappings on your environment map.
To stop the mapping process, simply call stopMapping()
.
To update the environment map with the current feed of the camera, you can use the following code in your class implementing ARSessionDelegate
:
func session(_ session: ARSession, didUpdate frame: ARFrame) {
environmentMapper.updateMap(withFrame: frame)
}
You can call updateMap(withFrame:)
in didUpdate
regardless of the preferred FPS, as it is not executed every frame. Its frequency is bound by the value ARKitEnvironmentMapper.Options.updatesPerSecond
and the default value is 10 updates per second.
After mapping the environment for a while you can get the current generated environment map and set it as the environment map of your ARSCNView
with the following code:
sceneView.scene.lightingEnvironment.contents = environmentMapper.currentEnvironmentMap(as: .cgImage)
Note: The ideal way to set this should be to use .mtlTexture
as input to bypass any image conversion and memory operation overhead. However, due to an Apple bug, setting a MTLTexture
as the environment map currently has no effect. If you think this is not an Apple bug and you do have a solution, please don't hesitate to send a pull request.
Output
Below is a sample output ARKitEnvironmentMapper
generates when initialized with a base environment map:
=>
Here is another sample output when initialized with a white background in the same environment:
Author
Halil Ibrahim KayimSoftware Engineer @ Surreal |
---|
License
ARKitEnvironmentMapper is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the ARKitEnvironmentMapper README section above
are relevant to that project's source code only.