Object Capture

RSS for tag

Turn photos from your iPhone or iPad into high‑quality 3D models that are optimized for AR using the new Object Capture API on macOS Monterey.

Posts under Object Capture tag

105 Posts

Post

Replies

Boosts

Views

Activity

Assertion failed after calling session.startDetecting() - Xcode 15.0 beta1 (15A5160n)
I followed the instruction in this session and tried to write a demo with Object Capture API. But there's a MTLDebugRenderCommandEncoder assertion fails every time I call session.startDetecting(), just after the bounding box shows up. The error shows: -[MTLDebugRenderCommandEncoder validateCommonDrawErrors:]:5780: failed assertion `Draw Errors Validation Fragment Function(fsRealityPbr): the offset into the buffer clippingConstants that is bound at buffer index 8 must be a multiple of 256 but was set to 128. and my code is pretty simple: var body: some View { ZStack { ObjectCaptureView(session: session) if case .initializing = session.state { Button { session.start(imagesDirectory: getDocumentsDir().appendingPathComponent("Images/"), configuration: configuration) // 💥 } label: { Text("Prepare") } } else if case .ready = session.state { Button { session.startDetecting() } label: { Text("Continue") } } else if case .detecting = session.state { Button { session.startCapturing() } label: { Text("Start Capture") } } } } I'm wondering if anyone else is facing the same problem or if there's an error on my side?
6
1
2.4k
Jun ’23
How will it work with a turntable?
Hello, I am really excited about the new Object Capture API for iOS. In the WWDC23 demo video, the user was rotating around the object. My question is does this API support taking photos from a fixed position (like on a tripod) and having a turntable to rotate the object? Another question, if the user has already taken some photos with depth and gravity, can the Object Capture use these images to construct the 3D model instead of taking new ones? Thank you.
1
0
1.2k
Jun ’23
Black Screen with the text "Move iPad to start"
After getting around some issues we finally got "something" to run. But we have 2 issues now getDocumentsDir() is not found on scope. I guess this function was only shown on the video, but not really implemented globally, now looking through some "eskimo" code I found docDir implementation. Which doesn't work either in this case. Because session.start() never runs, all I have is a Black Screen with an animation saying "Move iPad to start". QUESTION: A) How can I force this to work? I'm hoping to get capture the images to later process at a Mac. So I don't think I need the "checkpoint" part of configuration. Since getDocumentsDir() or docDir are not working, B) is there anyway to just select whatever folder we can, maybe hardcode it? Here is my code: import Foundation import RealityKit import SwiftUI // import Firebase struct CaptureView: View { let docDir = try! FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true) var body: some View { ZStack { // Make the entire background black. Color.black.edgesIgnoringSafeArea(.all) if #available(iOS 17.0, *) { var session = ObjectCaptureSession() var configuration = ObjectCaptureSession.Configuration() // configuration.checkpointDirectory = getDocumentsDir().appendingPathComponent("Snapshots/") // session.start(imagesDirectory: docDir.appendingPathComponent("Images/"), configuration: configuration) ObjectCaptureView(session: session) } else { Text("Unsupported iOS 17 View") } } .environment(\.colorScheme, .dark) } }
1
0
839
Jun ’23
Problem with testing Object Capture for iOS
Hey! I'm trying to add this line to my project: var session = ObjectCaptureSession() But it automatically says "Cannot find 'ObjectCaptureSession' in scope" I cannot get this error to go away, so I haven't continued trying the snippets provided on your video. Is there anything else I need to install or configure before this is ready? I'm importing: import RealityKit import SwiftUI import Firebase In your video you mentioned that there is a sample code, but I can only find the snippets rather than a project. It's fine if there is no sample code, just that on the video you mentioned it, so it's confusing to not have the code, when it's mentioned so much on the video. Xcode 15- Beta iOS17 Sim installed MacOS Ventura 13.3.1 a
4
0
1.4k
Jun ’23
Assertion failed after calling session.startDetecting() - Xcode 15.0 beta1 (15A5160n)
I followed the instruction in this session and tried to write a demo with Object Capture API. But there's a MTLDebugRenderCommandEncoder assertion fails every time I call session.startDetecting(), just after the bounding box shows up. The error shows: -[MTLDebugRenderCommandEncoder validateCommonDrawErrors:]:5780: failed assertion `Draw Errors Validation Fragment Function(fsRealityPbr): the offset into the buffer clippingConstants that is bound at buffer index 8 must be a multiple of 256 but was set to 128. and my code is pretty simple: var body: some View { ZStack { ObjectCaptureView(session: session) if case .initializing = session.state { Button { session.start(imagesDirectory: getDocumentsDir().appendingPathComponent("Images/"), configuration: configuration) // 💥 } label: { Text("Prepare") } } else if case .ready = session.state { Button { session.startDetecting() } label: { Text("Continue") } } else if case .detecting = session.state { Button { session.startCapturing() } label: { Text("Start Capture") } } } } I'm wondering if anyone else is facing the same problem or if there's an error on my side?
Replies
6
Boosts
1
Views
2.4k
Activity
Jun ’23
How will it work with a turntable?
Hello, I am really excited about the new Object Capture API for iOS. In the WWDC23 demo video, the user was rotating around the object. My question is does this API support taking photos from a fixed position (like on a tripod) and having a turntable to rotate the object? Another question, if the user has already taken some photos with depth and gravity, can the Object Capture use these images to construct the 3D model instead of taking new ones? Thank you.
Replies
1
Boosts
0
Views
1.2k
Activity
Jun ’23
Black Screen with the text "Move iPad to start"
After getting around some issues we finally got "something" to run. But we have 2 issues now getDocumentsDir() is not found on scope. I guess this function was only shown on the video, but not really implemented globally, now looking through some "eskimo" code I found docDir implementation. Which doesn't work either in this case. Because session.start() never runs, all I have is a Black Screen with an animation saying "Move iPad to start". QUESTION: A) How can I force this to work? I'm hoping to get capture the images to later process at a Mac. So I don't think I need the "checkpoint" part of configuration. Since getDocumentsDir() or docDir are not working, B) is there anyway to just select whatever folder we can, maybe hardcode it? Here is my code: import Foundation import RealityKit import SwiftUI // import Firebase struct CaptureView: View { let docDir = try! FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true) var body: some View { ZStack { // Make the entire background black. Color.black.edgesIgnoringSafeArea(.all) if #available(iOS 17.0, *) { var session = ObjectCaptureSession() var configuration = ObjectCaptureSession.Configuration() // configuration.checkpointDirectory = getDocumentsDir().appendingPathComponent("Snapshots/") // session.start(imagesDirectory: docDir.appendingPathComponent("Images/"), configuration: configuration) ObjectCaptureView(session: session) } else { Text("Unsupported iOS 17 View") } } .environment(\.colorScheme, .dark) } }
Replies
1
Boosts
0
Views
839
Activity
Jun ’23
Problem with testing Object Capture for iOS
Hey! I'm trying to add this line to my project: var session = ObjectCaptureSession() But it automatically says "Cannot find 'ObjectCaptureSession' in scope" I cannot get this error to go away, so I haven't continued trying the snippets provided on your video. Is there anything else I need to install or configure before this is ready? I'm importing: import RealityKit import SwiftUI import Firebase In your video you mentioned that there is a sample code, but I can only find the snippets rather than a project. It's fine if there is no sample code, just that on the video you mentioned it, so it's confusing to not have the code, when it's mentioned so much on the video. Xcode 15- Beta iOS17 Sim installed MacOS Ventura 13.3.1 a
Replies
4
Boosts
0
Views
1.4k
Activity
Jun ’23
Object Capture for iOS can i send to the Robotic Operating System as Point Cloud
Object Capture for iOS can i send to the Robotic Operating System as Point Cloud
Replies
0
Boosts
0
Views
701
Activity
Jun ’23