Create parametric 3D room scans with RoomPlan

RSS for tag

Discuss the WWDC22 Session Create parametric 3D room scans with RoomPlan

Posts under wwdc2022-10127 tag

33 Posts

Post

Replies

Boosts

Views

Activity

Could not locate file 'default-binaryarchive.metallib' in bundle.
I am running the RoomPlan Demo app and keep getting the above error and when I try to find someplace to get the archive in the Metal Libraries my searches come up blank. There are no files that show up in a search that contain such identifiers. A number of messages are displayed about "deprecated" interfaces also. Is it normal to send out demo apps that are hobbled in this way?
5
0
3.7k
Mar ’24
RoomPlan struggles to identify doors and windows. How to fix that?
Here is the current code I am using for it. When scanning my room, it is not identifying any door. And there are 2. Am I missing anything? import UIKit import RoomPlan import ARKit import RealityKit class RoomPlanViewController: UIViewController, RoomCaptureViewDelegate, UIViewControllerTransitioningDelegate { @IBOutlet weak var doneButton: UIButton! @IBOutlet weak var exportButton: UIButton! @IBOutlet weak var statusLabel: UILabel! var roomCaptureView: RoomCaptureView! let customDismissal = CustomSlideDownDismissal() var finalResults: CapturedRoom? override func viewDidLoad() { super.viewDidLoad() roomCaptureView = RoomCaptureView(frame: view.bounds) roomCaptureView.delegate = self view.insertSubview(roomCaptureView, at: 0) exportButton.isHidden = true statusLabel.isHidden = true self.transitioningDelegate = self } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) roomCaptureView?.captureSession.run(configuration: RoomCaptureSession.Configuration()) } @IBAction func Back(_ sender: Any) { roomCaptureView?.captureSession.stop() self.dismiss(animated: true, completion: nil) } @IBAction func doneButtonPressed(_ sender: UIButton) { roomCaptureView?.captureSession.stop() doneButton.isHidden = true exportButton.isHidden = false } func captureView(didPresent: CapturedRoom, error: Error?) { statusLabel.isHidden = false statusLabel.text = error == nil ? "The scan was successfully completed" : "An error occurred during the scan: \(String(describing: error))" finalResults = didPresent print("DOOR HERE") print(finalResults?.doors.count as Any) exportButton.isHidden = false statusLabel.isHidden = false } @IBAction func exportButtonPressed(_ sender: UIButton) { let filename = "Room.usdz" let destinationURL = FileManager.default.temporaryDirectory.appending(path: filename) do { try finalResults?.export(to: destinationURL) let activityController = UIActivityViewController(activityItems: [destinationURL], applicationActivities: nil) }
1
0
1.2k
May ’23
RoomPlan `RoomCaptureSession.arSession` doesn't provide scene depth (Lidar information)
Hello, The RoomCaptureSession seems to be initialized differently when it is access through the RoomCaptureView compared to when it is created directly. In the second case, the captureSession.arSession doesn't collect Lidar depth map. roomCaptureView.captureSession.run(RoomCaptureSession.Configuration()) print(roomCaptureView.captureSession.arSession.currentFrame?.sceneDepth != nil) // prints true let captureSession = RoomCaptureSession() captureSession.run(RoomCaptureSession.Configuration()) print(captureSession.arSession.currentFrame?.sceneDepth != nil) // prints false What solution do I have? I need my own custom Visualizer
0
0
942
Apr ’23
RoomPlan API
I am using RoomPlan API in my application. Working fine for small apartments but when I am trying to scan a bigger apartment which takes more time greater than 15 minutes the API automatically stopped and finished the scan even though part of the apartment is still pending scanning. I need the original structure like a point cloud in 3D, the USDZ model has a white mesh structure. Is there any way to get a real 3D view from RoomPlan API or USDZ model. How I can change the colour of scanning lines. I am getting RSFloorPlan class value when scanning finished. How I can get this Floor Plan, I mean I need its 2d structure as we what we are scanning. Thanks! Ramneet Singh (iOS developer)
2
1
2.5k
Apr ’23
Difference between RoomPlan and ARKit plane and mesh classification
Hello, ARKit already have ways to identify walls, doors, chairs and other objects: ARMeshClassification ARPlaneAnchor.Classification Here there seems to say that RoomPlan is powered by a distinct (although similar) algorithms and AI model than ARKit scene understanding. Is it correct? I was wondering what was exactly the point of designing a new algorithm from scratch and also which of them present better performance and more reliable results? Why are two different methods designed for the same purpose integrated in the framework?
0
0
926
Apr ’23
Differences between WWDC Video and Sample Application
Why are there differences between the Sample application in the download and the code presented in the video? Specifically there are different Imports. I noticed that when I made references to some of the AR functions in. change I made it would not compile clean until I added an import of the ARKit and the Reality Kit even though both are in the RoomPlan import. Does the scope of definitinons get limited to that of the Imported symbols?
0
0
692
Mar ’23
why does RoomCaptureSessionDelegate.captureSession did end with raw data?
Hello, In RoomPlan, all the functions captureSession() use a CapturedRoom as parameter except when we complete a session where raw data( CapturedRoomData) is passed as parameter (RoomCaptureSessionDelegate documentation) My question is: Why is that? What can be done with the raw data apart from converting it to a CapturedRoom? Why aren't we directly provided with a CapturedRoom instead of raw data at this point? Why do we receive a CapturedRoomData at the end of the session but a CapturedRoom during the scan? func captureSession(RoomCaptureSession, didUpdatewith: CapturedRoom) func captureSession(RoomCaptureSession, didEndWith: CapturedRoomData) // RAW DATA I am thinking that maybe I missed some important point. Thanks!
0
0
829
Mar ’23
Recreating RoomPlan from CapturedRoom.walls with SceneKit
I am trying to use RoomPlan to create a rendering of a room without any objects inside. To do this I'm taking the list of walls given by CapturedRoom.walls and creating a series of SCNNodes using the information given. This way I can modify the room at-will in the app. However, the walls are showing up in random places? Not sure where I am going wrong: //roomScan is a CapturedRoom object, scene is an SCNScene for i in 0...(roomScan.walls.endIndex-1) { //Generate new wall geometry let scannedWall = roomScan.walls[i] let length = scannedWall.dimensions.x let width = 0.2 let height = scannedWall.dimensions.y let newWall = SCNBox( width: CGFloat(width), height: CGFloat(height), length: CGFloat(length), chamferRadius: 0 ) newWall.firstMaterial?.diffuse.contents = UIColor.white newWall.firstMaterial?.transparency = 0.5 //Generate new SCNNode let newNode = SCNNode(geometry: newWall) newNode.simdTransform = scannedWall.transform scene.rootNode.addChildNode(newNode) }
2
0
1.6k
Oct ’22
Could not locate file 'default-binaryarchive.metallib' in bundle.
I am running the RoomPlan Demo app and keep getting the above error and when I try to find someplace to get the archive in the Metal Libraries my searches come up blank. There are no files that show up in a search that contain such identifiers. A number of messages are displayed about "deprecated" interfaces also. Is it normal to send out demo apps that are hobbled in this way?
Replies
5
Boosts
0
Views
3.7k
Activity
Mar ’24
RoomPlan struggles to identify doors and windows. How to fix that?
Here is the current code I am using for it. When scanning my room, it is not identifying any door. And there are 2. Am I missing anything? import UIKit import RoomPlan import ARKit import RealityKit class RoomPlanViewController: UIViewController, RoomCaptureViewDelegate, UIViewControllerTransitioningDelegate { @IBOutlet weak var doneButton: UIButton! @IBOutlet weak var exportButton: UIButton! @IBOutlet weak var statusLabel: UILabel! var roomCaptureView: RoomCaptureView! let customDismissal = CustomSlideDownDismissal() var finalResults: CapturedRoom? override func viewDidLoad() { super.viewDidLoad() roomCaptureView = RoomCaptureView(frame: view.bounds) roomCaptureView.delegate = self view.insertSubview(roomCaptureView, at: 0) exportButton.isHidden = true statusLabel.isHidden = true self.transitioningDelegate = self } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) roomCaptureView?.captureSession.run(configuration: RoomCaptureSession.Configuration()) } @IBAction func Back(_ sender: Any) { roomCaptureView?.captureSession.stop() self.dismiss(animated: true, completion: nil) } @IBAction func doneButtonPressed(_ sender: UIButton) { roomCaptureView?.captureSession.stop() doneButton.isHidden = true exportButton.isHidden = false } func captureView(didPresent: CapturedRoom, error: Error?) { statusLabel.isHidden = false statusLabel.text = error == nil ? "The scan was successfully completed" : "An error occurred during the scan: \(String(describing: error))" finalResults = didPresent print("DOOR HERE") print(finalResults?.doors.count as Any) exportButton.isHidden = false statusLabel.isHidden = false } @IBAction func exportButtonPressed(_ sender: UIButton) { let filename = "Room.usdz" let destinationURL = FileManager.default.temporaryDirectory.appending(path: filename) do { try finalResults?.export(to: destinationURL) let activityController = UIActivityViewController(activityItems: [destinationURL], applicationActivities: nil) }
Replies
1
Boosts
0
Views
1.2k
Activity
May ’23
RoomPlan `RoomCaptureSession.arSession` doesn't provide scene depth (Lidar information)
Hello, The RoomCaptureSession seems to be initialized differently when it is access through the RoomCaptureView compared to when it is created directly. In the second case, the captureSession.arSession doesn't collect Lidar depth map. roomCaptureView.captureSession.run(RoomCaptureSession.Configuration()) print(roomCaptureView.captureSession.arSession.currentFrame?.sceneDepth != nil) // prints true let captureSession = RoomCaptureSession() captureSession.run(RoomCaptureSession.Configuration()) print(captureSession.arSession.currentFrame?.sceneDepth != nil) // prints false What solution do I have? I need my own custom Visualizer
Replies
0
Boosts
0
Views
942
Activity
Apr ’23
RoomPlan API
I am using RoomPlan API in my application. Working fine for small apartments but when I am trying to scan a bigger apartment which takes more time greater than 15 minutes the API automatically stopped and finished the scan even though part of the apartment is still pending scanning. I need the original structure like a point cloud in 3D, the USDZ model has a white mesh structure. Is there any way to get a real 3D view from RoomPlan API or USDZ model. How I can change the colour of scanning lines. I am getting RSFloorPlan class value when scanning finished. How I can get this Floor Plan, I mean I need its 2d structure as we what we are scanning. Thanks! Ramneet Singh (iOS developer)
Replies
2
Boosts
1
Views
2.5k
Activity
Apr ’23
Difference between RoomPlan and ARKit plane and mesh classification
Hello, ARKit already have ways to identify walls, doors, chairs and other objects: ARMeshClassification ARPlaneAnchor.Classification Here there seems to say that RoomPlan is powered by a distinct (although similar) algorithms and AI model than ARKit scene understanding. Is it correct? I was wondering what was exactly the point of designing a new algorithm from scratch and also which of them present better performance and more reliable results? Why are two different methods designed for the same purpose integrated in the framework?
Replies
0
Boosts
0
Views
926
Activity
Apr ’23
Differences between WWDC Video and Sample Application
Why are there differences between the Sample application in the download and the code presented in the video? Specifically there are different Imports. I noticed that when I made references to some of the AR functions in. change I made it would not compile clean until I added an import of the ARKit and the Reality Kit even though both are in the RoomPlan import. Does the scope of definitinons get limited to that of the Imported symbols?
Replies
0
Boosts
0
Views
692
Activity
Mar ’23
why does RoomCaptureSessionDelegate.captureSession did end with raw data?
Hello, In RoomPlan, all the functions captureSession() use a CapturedRoom as parameter except when we complete a session where raw data( CapturedRoomData) is passed as parameter (RoomCaptureSessionDelegate documentation) My question is: Why is that? What can be done with the raw data apart from converting it to a CapturedRoom? Why aren't we directly provided with a CapturedRoom instead of raw data at this point? Why do we receive a CapturedRoomData at the end of the session but a CapturedRoom during the scan? func captureSession(RoomCaptureSession, didUpdatewith: CapturedRoom) func captureSession(RoomCaptureSession, didEndWith: CapturedRoomData) // RAW DATA I am thinking that maybe I missed some important point. Thanks!
Replies
0
Boosts
0
Views
829
Activity
Mar ’23
Recreating RoomPlan from CapturedRoom.walls with SceneKit
I am trying to use RoomPlan to create a rendering of a room without any objects inside. To do this I'm taking the list of walls given by CapturedRoom.walls and creating a series of SCNNodes using the information given. This way I can modify the room at-will in the app. However, the walls are showing up in random places? Not sure where I am going wrong: //roomScan is a CapturedRoom object, scene is an SCNScene for i in 0...(roomScan.walls.endIndex-1) { //Generate new wall geometry let scannedWall = roomScan.walls[i] let length = scannedWall.dimensions.x let width = 0.2 let height = scannedWall.dimensions.y let newWall = SCNBox( width: CGFloat(width), height: CGFloat(height), length: CGFloat(length), chamferRadius: 0 ) newWall.firstMaterial?.diffuse.contents = UIColor.white newWall.firstMaterial?.transparency = 0.5 //Generate new SCNNode let newNode = SCNNode(geometry: newWall) newNode.simdTransform = scannedWall.transform scene.rootNode.addChildNode(newNode) }
Replies
2
Boosts
0
Views
1.6k
Activity
Oct ’22