-
Create 3D models with Object Capture
Object Capture provides a quick and easy way to create lifelike 3D models of real-world objects using just a few images. Learn how you can get started and bring your assets to life with Photogrammetry for macOS. And discover best practices with object selection and image capture to help you achieve the highest-quality results.
Ressources
- Creating a photogrammetry command-line app
- Capturing photographs for RealityKit Object Capture
- Creating 3D objects from photographs
- Capturing photographs for RealityKit Object Capture
- PhotogrammetrySample
- PhotogrammetrySession
- Explore the RealityKit Developer Forums
Vidéos connexes
WWDC22
WWDC21
-
Rechercher dans cette vidéo…
-
-
6:56 - Creating a PhotogrammetrySession with a folder of images
import RealityKit let inputFolderUrl = URL(fileURLWithPath: "/tmp/Sneakers/", isDirectory: true) let session = try! PhotogrammetrySession(input: inputFolderUrl, configuration: PhotogrammetrySession.Configuration()) -
9:26 - Creating the async message stream dispatcher
// Create an async message stream dispatcher task Task { do { for try await output in session.outputs { switch output { case .requestProgress(let request, let fraction): print("Request progress: \(fraction)") case .requestComplete(let request, let result): if case .modelFile(let url) = result { print("Request result output at \(url).") } case .requestError(let request, let error): print("Error: \(request) error=\(error)") case .processingComplete: print("Completed!") handleComplete() default: // Or handle other messages... break } } } catch { print("Fatal session error! \(error)") } } -
13:44 - Calling process on two models simultaneously
try! session.process(requests: [ .modelFile("/tmp/Outputs/model-reduced.usdz", detail: .reduced), .modelFile("/tmp/Outputs/model-medium.usdz", detail: .medium) ])
-