View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Vídeos

Abrir menu Fechar menu
  • Coleções
  • Todos os vídeos
  • Sobre

Mais vídeos

  • Sobre
  • Código
  • Bring your world into augmented reality

    Follow along as we demonstrate how you can use Object Capture and RealityKit to bring real-world objects into an augmented reality game. We'll show you how to capture detailed items using the Object Capture framework, add them to a RealityKit project in Xcode, apply stylized shaders and animations, and use them as part of an AR experience. We'll also share best practices when working with ARKit, RealityKit, and Object Capture.

    To get the most out of this session, we recommend first watching "Dive into RealityKit 2" and "Create 3D models with Object Capture" from WWDC21.

    Recursos

    • Using object capture assets in RealityKit
    • Creating a photogrammetry command-line app
    • Capturing photographs for RealityKit Object Capture
    • Capturing photographs for RealityKit Object Capture
    • Building an immersive experience with RealityKit
    • RealityKit
      • Vídeo HD
      • Vídeo SD

    Vídeos relacionados

    WWDC22

    • Discover ARKit 6
    • WWDC22 Day 1 recap

    WWDC21

    • Create 3D models with Object Capture
    • Dive into RealityKit 2
    • Explore advanced rendering with RealityKit 2
  • Buscar neste vídeo...
    • 6:20 - HighRes capturing

      if let hiResCaptureVideoFormat = ARWorldTrackingConfiguration.recommendedVideoFormatForHighResolutionFrameCapturing {
          // Assign the video format that supports hi-res capturing.
      config.videoFormat = hiResCaptureVideoFormat
      }
      // Run the session.
      session.run(config)
      
      session.captureHighResolutionFrame { (frame, error) in
         if let frame = frame {
            // save frame.capturedImage 
            // …   
         }
      }
    • 17:00 - Chessboard animation

      // Board Animation
      class Chessboard: Entity {
          func playAnimation() {
              checkers
                  .forEach { entity in
                      let currentTransform = entity.transform
              // Move checker square 10cm up
                      entity.transform.translation += SIMD3<Float>(0, 0.1, 0)
                      entity.move(to: currentTransform,
                          relativeTo: entity.parent,
                          duration: BoardGame.startupAnimationDuration)
                  }
              
              // Play built-in animation for board border
              border.availableAnimations.forEach {
                  border.playAnimation($0)
              }
          }
      }
    • 18:00 - select chess piece

      // Select chess piece
      class ChessViewport: ARView {
          @objc
          func handleTap(sender: UITapGestureRecognizer) {
              guard let ray = ray(through: sender.location(in: self)) else { return }
      
              // No piece is selected yet, we want to select one
              guard let raycastResult = scene.raycast(origin: ray.origin,
                                                      direction: ray.direction,
                                                      length: 5,
                                                      query: .nearest,
                                                      mask: .piece).first,
                    let piece = raycastResult.entity.parentChessPiece else {
                  return
              }
              boardGame.select(piece)
              gameManager.selectedPiece = piece
          }
      }
    • 21:16 - capture geometry modifier

      // Capture Geometry Modifier
      class ChessPiece: Entity, HasChessPiece {
          var capturedProgress: Float
              get {
                  (pieceEntity?.model?.materials.first as? CustomMaterial)?.custom.value[0] ?? 0
              }
              set {
                  pieceEntity?.modifyMaterials { material in
                      guard var customMaterial = material as? CustomMaterial else {
                          return material
                      }
                      customMaterial.custom.value = SIMD4<Float>(newValue, 0, 0, 0)
                      return customMaterial
                  }
              }
          }
      }
    • 23:00 - highlight potential moves using bloom

      // Checker animation to show potential moves
      void checkerSurface(realitykit::surface_parameters params,
                          float amplitude,
                          bool isBlack = false)
      {
          // ...
          bool isPossibleMove = params.uniforms().custom_parameter()[0];
          if (isPossibleMove) {
              const float a = amplitude * sin(params.uniforms().time() * M_PI_F) + amplitude;
              params.surface().set_emissive_color(half3(a));
              if (isBlack) {
                  params.surface().set_base_color(half3(a));
              }
          }
      }
    • 23:20 - Import MetalPerformanceShaders

      import MetalPerformanceShaders
      
      class ChessViewport: ARView {
          init(gameManager: GameManager) {
              /// ...
              renderCallbacks.postProcess = postEffectBloom
          }
      
          func postEffectBloom(context: ARView.PostProcessContext) {
              let brightness = MPSImageThresholdToZero(device: context.device,
                                                       thresholdValue: 0.85,
                                                       linearGrayColorTransform: nil)
              brightness.encode(commandBuffer: context.commandBuffer,
                                sourceTexture: context.sourceColorTexture,
                                destinationTexture: bloomTexture!)
              /// ...
          }
      }

Developer Footer

  • Vídeos
  • WWDC22
  • Bring your world into augmented reality
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines