스트리밍은 대부분의 브라우저와
Developer 앱에서 사용할 수 있습니다.
-
visionOS의 물체 추적 기능 살펴보기
visionOS 앱에서 물체 추적을 사용하여 현실 세계의 객체를 가상 앵커로 바꾸는 방법을 확인해 보세요. 물체 추적을 통해 공간 경험을 만드는 방법을 처음부터 끝까지 자세히 공유합니다. Create ML에서 머신 러닝을 통해 참조 객체를 만들고 Reality Composer Pro, RealityKit 또는 ARKit API에서 대상 객체와 관련된 콘텐츠를 추가하는 방법을 확인해 보세요.
챕터
- 0:00 - Introduction
- 5:07 - Create reference object
- 9:28 - Anchor virtual content
리소스
관련 비디오
WWDC24
- ARKit으로 향상된 공간 컴퓨팅 경험 제작하기
- Create ML의 새로운 기능
- Reality Composer Pro에서 대화식 3D 콘텐츠 만들기
- RealityKit으로 공간 드로잉 앱 빌드하기
WWDC23
-
다운로드Array
-
-
13:55 - Coaching UI - display object USDZ preview
// Display object USDZ struct ImmersiveView: View { @State var globeAnchor: Entity? = nil var body: some View { RealityView { content in // Load the reference object with ARKit API let refObjURL = Bundle.main.url(forResource: "globe", withExtension: ".referenceobject") let refObject = try? await ReferenceObject(from: refObjURL!) // Load the model entity with USDZ path extracted from reference object let globePreviewEntity = try? await Entity.init(contentsOf: (refObject?.usdzFile)!) // Set opacity to 0.5 and add to scene globePreviewEntity!.components.set(OpacityComponent(opacity: 0.5)) content.add(globePreviewEntity!) } } }
-
14:13 - Coaching UI - check anchor state
// Check anchor state struct ImmersiveView: View { @State var globeAnchor: Entity? = nil var body: some View { RealityView { content in if let scene = try? await Entity(named: "Immersive", in: realityKitContentBundle) { globeAnchor = scene.findEntity(named: "GlobeAnchor") content.add(scene) } let updateSub = content.subscribe(to: SceneEvents.AnchoredStateChanged.self) { event in if let anchor = globeAnchor, event.anchor == anchor { if event.isAnchored { // Object anchor found, trigger transition animation } else { // Object anchor not found, display coaching UI } } } } } }
-
14:31 - Coaching UI - Transform space with SpatialSession
// Transform space struct ImmersiveView: View { @State var globeAnchor: Entity? = nil var body: some View { RealityView { content in // Setup anchor transform space for object and world anchor let trackingSession = SpatialTrackingSession() let config = SpatialTrackingSession.Configuration(tracking: [.object, .world]) if let result = await trackingSession.run(config) { if result.anchor.contains(.object) { // Tracking not authorized, adjust experience accordingly } } // Get tracked object's world transform, identity if tracking not authorized let objectTransform = globeAnchor?.transformMatrix(relativeTo: nil) // Implement animation ... } } }
-
-
찾고 계신 콘텐츠가 있나요? 위에 주제를 입력하고 원하는 내용을 바로 검색해 보세요.
쿼리를 제출하는 중에 오류가 발생했습니다. 인터넷 연결을 확인하고 다시 시도해 주세요.