Post

Replies

Boosts

Views

Activity

Reply to Exporting Point Cloud as 3D PLY Model
Hello @brandonK212 Could we apply a similar solution to this sample code - https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/streaming_depth_data_from_the_truedepth_camera? I recently posted many posts, including this one - https://developer.apple.com/forums/thread/667757 on regards how to export similar data (X,Y,Z) from the available DepthMap. Maybe u know an viable option , to achieve this?
Topic: Graphics & Games SubTopic: Metal Tags:
Nov ’20
Reply to Exporting Point Cloud as 3D PLY Model
Hello @brandonK212 I tried out your code sample, but can't get the PLY file as an output. I've pressed the save button many times, but the file does not appear in any of my File folders. My viewDidLoad looks something like this : override func viewDidLoad() {         super.viewDidLoad()             // Setup a save button                 let button = UIButton(type: .system, primaryAction: UIAction(title: "Save", handler: { (action) in                     self.renderer.savePointsToFile()                 }))                 button.translatesAutoresizingMaskIntoConstraints = false                 self.view.addSubview(button)                 NSLayoutConstraint.activate([                     button.centerXAnchor.constraint(equalTo: self.view.centerXAnchor),                     button.centerYAnchor.constraint(equalTo: self.view.centerYAnchor)                 ])         guard let device = MTLCreateSystemDefaultDevice() else {             print("Metal is not supported on this device")             return         } And i've put the savePointsToFile in the Render.swift, but it only allows me to define it as func not "private func", because of the error - savePointsToFile' is inaccessible due to 'private' protection level.     func savePointsToFile() {       guard !self.isSavingFile else { return }       self.isSavingFile = true .. I'm still figuring out Swift, would be great to hear feedback from you, or other developers, to fix this issue.
Topic: Graphics & Games SubTopic: Metal Tags:
Nov ’20