u/Water-Cookiesin r/swift • Recommends
macOS: Create your first 3D model from real-world objects (Photogrammetry framework)
#realitykit#photogrammetry#usdz
3.2K subscribers • 8 videos on Hallway
Beginner. No background in the topic needed.
18K views5 years ago1 recommendation
Graphics and audioMobile developmentSwiftRendering
How to generate 3D USDZ models from real-world photos using Apple's Photogrammetry API in Swift and RealityKit.
** The framework has changed since this video was published. --sampleOverlap is no longer a valid parameter, so it needs to be removed from the main call. Simply remove the line "-l", "normal", from the project (you'll see it on my project in this video on line 234 in main.swift. Once you delete it, the project should build/run fine. ** In this Swift macOS tutorial I’ll show you how to EASILY create your own 3D models out of real-world objects using RealityKit and the Photogrammetry API released at WWDC21. This is an incredibly easy process, albeit time-consuming due to both having to take a bunch of pictures, and for Xcode to build out your .usdz file. The final result is a 3D model that can be used in ARKit, or potentially games as well. I tested building these models out with an M1 chip MacBook Pro and an Intel-based T2 chip MacBook Pro. This Xcode tutorial is for Xcode beginners, intermediate, and advanced users. The Xcode project used in this tutorial was created and copyrighted by Apple Copyright © 2021 Apple Inc, and downloaded from the link below. Apple’s downloadable playground: developer.apple.com/documentation/realitykit/creating_a_phot… Apple’s 3D models keynote: developer.apple.com/videos/play/wwdc2021/10076/ Apple’s There are a few requirements when considering doing this: 1. You need to be on macOS Monterey 12.0 beta or later 2. You need to have Xcode 13 beta or later installed 3. You need to have a decent spec’d Mac (preferably an M1, as they complete the process ~4x as fast as an Intel-based Mac) 4. You need a camera or phone to take pictures of your model; I used an iPhone XR 5. You need a model that doesn’t have too many reflective surfaces 6. You need to put your model on a dark, neutral background that doesn’t have texture 7. Preferably use a lazy-suzan while taking photos, and some kind of arm to keep your camera steady Two different MacBook Pros were tested for build speed of the .usdz file: 1. 2019 16” MBP, 2.6 GHz 6-Core Intel Core i7, 16 GB 2667 MHz DDR4, AMD Radeon Pro 5300M 4 GB 2. 2020 M1 13” MBP, 16 GB RAM Intel speeds at detail levels: - .preview: 12m 18s - .reduced: 24m 22s - .medium: 40m 6s - .full: DID NOT WORK, ERROR & CRASH M1 speeds at detail levels: - .preview: 4m 52s - .reduced: 11m 10s - .medium: 11m 17s - .full: DID NOT WORK, ERROR & CRASH If you'd like to support my work to help me improve video quality and bring more content, please consider donating to my PayPal: paypal.com/paypalme/SwiftGoose Thank you for watching! Huge thank you to the channels below for helping me get started! Uncreated Light Press youtube.com/channel/UCcNI7mR_Nzulq0THjdrzlag and Mr. Macintosh youtube.com/channel/UC7FRPWLwRlhORhFHHywfqAg and The Apple Ninja youtube.com/c/AppleNinjaWhat people say. Recommended as an easy-to-follow guide to Apple's Photogrammetry API introduced at WWDC21.
u/Water-Cookiesin r/swift • Recommends