You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using the ARCore iOS SDK (with the Geospatial API) to place rooftop anchors on buildings that can be up to 1,000–1,100 meters away from the user’s location. While anchors at shorter distances (e.g. 500m–900m) work fine and render properly in AR, any anchor that’s placed around or beyond ~1km from the user does not appear in the AR scene. It’s as if it gets culled or is invisible, even though the anchor creation doesn’t throw an error.
Question: Is there a known maximum distance for rooftop anchors to be rendered when using ARCore on iOS? Or is this limitation caused by ARKit’s camera culling/far-plane limit? If so, do you recommend any workaround (like adjusting the far plane, origin shifting, etc.) on iOS?
Below are more details and a snippet of how I’m creating the rooftop anchor.
Initialize a GARSession with geospatial mode enabled.
Obtain user’s location (~0,0 in local space).
Call createAnchorOnRooftop for a building coordinate that’s ~1100 meters from the user.
Observe that ARCore successfully creates the rooftop anchor (no error).
Check the AR scene in RealityKit: the anchor is not visible, even though nearer anchors show up fine.
Expected Behavior:
The rooftop anchor should appear in the AR scene at the correct position, just like anchors <1000m away.
Actual Behavior:
The rooftop anchor does not appear or is immediately culled when the distance is ~1km or more.
// Example of how we’re creating a rooftop anchor:
do {
let futureId = UUID()
pendingFutures[futureId] = try garSession.createAnchorOnRooftop(
coordinate: CLLocationCoordinate2D(latitude: targetLat, longitude: targetLon),
altitudeAboveRooftop: 0,
eastUpSouthQAnchor: eastUpSouthQTarget
) { anchor, rooftopState in
self.pendingFutures.removeValue(forKey: futureId)
guard rooftopState == .success, let anchor else {
// Some error handling
return
}
self.anchors.append(anchor)
self.anchorTypes[anchor.identifier] = .rooftop
}
} catch {
print("Error creating rooftop anchor: (error)")
}
(Let me know if there’s a better place in the SDK to adjust the max view distance or if there’s a recommended pattern for large-scale rendering in ARCore on iOS.)
The text was updated successfully, but these errors were encountered:
Yeah i thought about that, but I’m using RealityKit (ARView) instead of SceneKit (ARSCNView), so SCNCamera.zFar isn’t directly applicable. RealityKit doesn’t provide a public API for setting the camera’s far clipping plane. I started building my app based on the ARCore iOS SDK Geospatial example, which uses ARKit with RealityKit. So my only possible solution is to migrate to SceneKit?
Ah, you are correct, maybe it is possible to set the camera mode to non-AR, and add a new Perspective Camera which you have control over, http://developer.apple.com/documentation/realitykit/perspectivecamera#overview, and then make that camera automatically follow the ARView session.currentFrame.camera using updates from the frames.
Hi guys,
I’m using the ARCore iOS SDK (with the Geospatial API) to place rooftop anchors on buildings that can be up to 1,000–1,100 meters away from the user’s location. While anchors at shorter distances (e.g. 500m–900m) work fine and render properly in AR, any anchor that’s placed around or beyond ~1km from the user does not appear in the AR scene. It’s as if it gets culled or is invisible, even though the anchor creation doesn’t throw an error.
Question: Is there a known maximum distance for rooftop anchors to be rendered when using ARCore on iOS? Or is this limitation caused by ARKit’s camera culling/far-plane limit? If so, do you recommend any workaround (like adjusting the far plane, origin shifting, etc.) on iOS?
Below are more details and a snippet of how I’m creating the rooftop anchor.
Environment
iOS Device: (e.g. iPhone 13 pro, iOS 18.1.1)
ARCore iOS SDK version: (e.g. v1.47.0)
Xcode version: (e.g. 16.2)
RealityKit/ARKit for rendering
Steps to Reproduce
Expected Behavior:
The rooftop anchor should appear in the AR scene at the correct position, just like anchors <1000m away.
Actual Behavior:
The rooftop anchor does not appear or is immediately culled when the distance is ~1km or more.
// Example of how we’re creating a rooftop anchor:
do {
let futureId = UUID()
pendingFutures[futureId] = try garSession.createAnchorOnRooftop(
coordinate: CLLocationCoordinate2D(latitude: targetLat, longitude: targetLon),
altitudeAboveRooftop: 0,
eastUpSouthQAnchor: eastUpSouthQTarget
) { anchor, rooftopState in
self.pendingFutures.removeValue(forKey: futureId)
guard rooftopState == .success, let anchor else {
// Some error handling
return
}
self.anchors.append(anchor)
self.anchorTypes[anchor.identifier] = .rooftop
}
} catch {
print("Error creating rooftop anchor: (error)")
}
(Let me know if there’s a better place in the SDK to adjust the max view distance or if there’s a recommended pattern for large-scale rendering in ARCore on iOS.)
The text was updated successfully, but these errors were encountered: