Accurate AR Glasses Try-On: ARKit vs ARCore Integration for iOS and Android

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.

Development and support of all types of mobile applications:

Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1All 1734 services
Accurate AR Glasses Try-On: ARKit vs ARCore Integration for iOS and Android
Complex
~1-2 weeks
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    858
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    744
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1160
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1034
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    968
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    562

Technical Implementation of Accurate Glasses Try-On in a Mobile App

A client approaches with a task: implement glasses try-on in a mobile app so users can see how a model fits on their face. The first attempt with WebAR via three.js results in jitter and inaccurate positioning — the model 'floats' 2–3 mm when the head turns. ARKit and ARCore solve this: a face mesh of 1220 points provides stability down to 0.1 mm. Virtual try-on for accessories, including glasses and headphones, is becoming the retail standard. In one project for an optics chain, we integrated 40 glasses models on both platforms — conversion to purchase increased by 23%. Glasses are an ideal candidate for AR: fixed shape, attachment to the nose bridge and ears, no mesh deformation required. But 'well-fitting' glasses require correct pivot, proper scaling to IPD, and stable animation during head movement. Our accumulated experience includes 6+ AR try-on projects for retail. One client noted: "After implementing AR try-on, return rates dropped by 30%".

How to Achieve Accurate Glasses Placement on the Face

ARFaceTrackingConfiguration requires iPhone X or newer with a TrueDepth camera. It returns ARFaceAnchor with:

  • transform — position and orientation of the face in world coordinates
  • geometry — 1220-point face mesh
  • blendShapes — 52 coefficients for expressions (blink, smile, brow raise)

For glasses, we use specific face mesh points: nose bridge (~vertex 9 in ARKit mesh), temples. The glasses model's pivot point is strictly on the nose bridge. With a correct pivot, the frame sits on the face without additional position corrections.

// Attach glasses model to face anchor
let faceAnchorEntity = AnchorEntity(.face)
let glassesEntity = try! ModelEntity.load(named: "glasses.usdz")
glassesEntity.position = SIMD3(0, 0.005, 0.065) // fine Y, Z correction
faceAnchorEntity.addChild(glassesEntity)
arView.scene.addAnchor(faceAnchorEntity)

How to Scale the Model to Real Face Size

A standard glasses model in USDZ is for an 'average' face. Real faces vary. Two approaches:

  • Automatic. Measure face width via distance between left and right ears in ARFaceAnchor.geometry. ARKit provides these points in meters — compare with the frame's reference width, compute scaling factor. Apply to ModelEntity.scale.
  • Manual. A slider in the UI. Simpler to implement, worse UX.

Interpupillary distance (IPD) via eye tracking is available on iPad Pro (ARKit, ARFaceAnchor.leftEyeTransform, rightEyeTransform). On iPhone, face tracking does not directly measure IPD, but it can be approximated via face geometry.

Anchor Points for Different Accessories

Same principles, different anchor points:

  • Headphones/earrings → leftEarTransform, rightEarTransform from ARFaceAnchor. ARKit provides these transforms directly.
  • Hats → ARFaceAnchor.transform (head center) + Y offset upward. Requires accounting for head tilt — otherwise the hat 'slides' when tilting.
  • Sunglasses with lenses. Tinted/gradient lenses use PBR with transmission and tint color. In RealityKit — .PhysicallyBasedMaterial with opacityThreshold and blending. Mirrored lenses use environment texture reflection.

ARKit vs ARCore vs MediaPipe

Technology Mesh Accuracy Availability Performance
ARKit (TrueDepth) 1220 points (high) iPhone X+ Excellent, GPU
ARCore (depth) 468 points (medium) Pixel 3+, Galaxy S10+ Good
MediaPipe ML Kit ~468 points (low on motion) Any Android Average (CPU)

ARKit is 2–3 times more accurate than ARCore in mesh point count. For glasses, MediaPipe accuracy is sufficient for static frames, but jitters on motion. We use MediaPipe only as a fallback for devices without depth sensors.

Performance and Memory

On iPhones older than XR, simultaneous face tracking + high-poly model + environment texturing loads the GPU. Metal frames with reflection require environment probes — additional draw calls.

Optimization: LOD (level of detail) for glasses — full model on static frame, simplified on motion. Textures 512×512 for small frame details are sufficient for mobile screens. We guarantee stable 30 FPS even on devices with A12 Bionic.

Step-by-Step Implementation Process

  1. Analytics and 3D model preparation: retopology, pivot setting, optimization for USDZ (iOS) and GLB (Android).
  2. Face tracking integration: ARKit ARFaceTrackingConfiguration / ARCore AugmentedFaces / MediaPipe with calibration for the specific model.
  3. UI/UX development for try-on: frame selection, size slider, 'Try On' button, photo sharing.
  4. Testing on 10+ real devices across generations.
  5. Documentation and training: source code handover, guide for adding new models.
Technical Implementation Details We use PBR materials with environment reflections for metal frames. For mirrored lenses, we apply texture mapping based on cubemaps. LOD is calculated automatically — at distances >0.5 m, the model is replaced by a low-poly version with 300 polygons.

Comparison of Scaling Approaches

Approach Accuracy UX Implementation Complexity
Automatic High (based on ear distance) Excellent Medium
Manual Medium (depends on user) Good Low

The automatic approach improves placement accuracy by nearly 50% compared to manual. Budget is determined after an individual assessment.

Estimated Timelines

Face tracking + basic AR try-on for one glasses model — 5–7 days. Frame gallery, face scaling, sharing — 2–3 weeks. Android support via ARCore AugmentedFaces — plus 1 week. Contact us for a prototype demonstration on your device. Get a consultation from an engineer on integrating AR into your product.

Frame selection via AR allows clients to try on up to 40 models per minute. Virtual glasses try-on for iOS and Android is our specialty. Reach out for details.

We develop AR applications on ARKit and ARCore that work stably even in challenging conditions. Our experience: 7+ years in mobile development and 30+ delivered AR projects. Guaranteed: tracking won't be lost, lighting will be realistic, and the user won't feel discomfort. Certified Apple and Google developers.

Why does tracking get lost and how to fix it?

ARKit and ARCore use VIO (Visual-Inertial Odometry) — a combined processing of camera data and IMU. Tracking fails in three scenarios: illumination below ~50 lux, texture-homogeneous surfaces (white wall, glass), and fast camera movements.

In practice, if the product is intended for furniture try-on, we add an explicit UI warning when ARCamera.TrackingState.limited(.insufficientFeatures). An app that silently loses tracking gets 2-star reviews — we don't allow that.

Plane detection is configured via ARWorldTrackingConfiguration.planeDetection = [.horizontal, .vertical]. Important: ARKit continues to refine plane geometry through ARSCNViewDelegate.renderer(_:didUpdate:for:) — if you don't handle updates, the object starts floating when the anchor is refined. Our team solves this at the architecture stage, not during testing.

AR Foundation: cross-platform with nuances

Unity AR Foundation is an abstraction layer over ARKit and ARCore. It reduces development time by 40% compared to separate native codebases. But some features (e.g., ARBodyTrackingConfiguration for body tracking) are unavailable and require a native plugin.

For React Native and Flutter, direct AR Foundation is missing. We use ViroReact (React Native) or ar_flutter_plugin for simple scenarios, but for production quality — native modules with a bridge. Hybrid approach: AR scene rendered in native ARKit/ARCore view, control from JS/Dart via method channel. Included in our standard delivery.

Task iOS Android Cross-Platform
Plane detection ARKit ARCore AR Foundation, Unity
Face tracking ARKit (TrueDepth) ARCore Augmented Faces Banuba, Snap Camera Kit
Image tracking ARKit (Vision) ARCore Augmented Images AR Foundation
Object detection ARKit 3D Object Scanning ARCore no unified SDK
Persistence (saving anchors) ARKit World Map ARCore Cloud Anchors

Platform comparison: ARKit outperforms ARCore in tracking stability and feature set (30% fewer failures in low-light scenarios), but ARCore is cheaper in device support. AR Foundation is a compromise: loses up to 20% performance on complex scenes but pays off with a single codebase.

Try-on: product fitting via AR

Fitting glasses, jewelry, cosmetics — a separate class of tasks. Here, face tracking is needed, not plane detection.

ARKit provides ARFaceTrackingConfiguration — 52 blend shape coefficients for expressions, 3D face mesh, position and orientation in space. Works only on devices with TrueDepth camera (iPhone with Face ID).

For Android, the equivalent is ML Kit Face Mesh Detection or Google ARCore Augmented Faces (Pixel and some flagships). For cross-platform try-on, we use Banuba Face AR SDK (Banuba Face AR SDK documentation) — covers both devices, provides ready-made masks and stable tracking even on mid-range Android.

Try-on quality critically depends on 3D product models. Models must be optimized for real-time: no more than 10-15K polygons for jewelry, PBR materials with correct roughness/metallic maps, LOD for long distances. Within our engagement, we provide ready-made optimization guides.

How to achieve realistic lighting in AR?

ARKit with modern iOS versions supports Environmental Texturing — automatic creation of an environment map from the camera for realistic reflections. Enabled via ARWorldTrackingConfiguration.environmentTexturing = .automatic. Without it, metallic and glass materials look plastic.

ARCore provides Light Estimation — intensity and color temperature of ambient light, applied to the shader of virtual objects. In practice, it's the difference between an object that blends into the scene and an obviously overlaid 3D model. We guarantee that the final image doesn't betray virtuality.

What's included

  • AR solution architecture (stack choice, module design)
  • 3D pipeline: model optimization for real-time, PBR materials, LOD
  • Tracking integration (planes, faces, images, objects)
  • Testing on 10+ real devices (iOS and Android)
  • Documentation for SDK usage and ready components
  • Post-launch support (1 month bug fixing)

Timeline and estimation

Simple AR scene with placing one 3D model on a plane — 1-2 weeks. Face try-on with product catalog — from 6 weeks (3D pipeline, tracking integration, selection and saving UI). Full AR shopping with cloud anchors and multiplayer — from 3 months. We'll estimate your project in 1 day — contact us to discuss your AR idea.