I have the exact same problem with iOS 17, it seems that changing the file ending to ".scn" will export the fully intact scene but I could not find a way to do the same with usdz
Post
Replies
Boosts
Views
Activity
Did you look at the memory consumption in the profiler in xcode? I noticed that this error is appearing as soon as 2GB of memory are used on the iPhone 14 Pro.
Occured on:
iPhone 15 Pro Max with iOS Version 17.3 and lower.
iPad Pro 11-inch 3rd gen with iPadOSVersion 17.2.
Did not occur on iOSSimulator devices.
It looks like you are having a memory leak in your app. Have you tried looking at the memory consumption in the xcode-profiler ? I noticed that this error is appearing as soon as 2GB of memory are used on the iPhone 14 Pro.
Still an issue with Xcode 15.2 with my iPhone 15 Pro Max iOS 17.3
Ok it seems like the issue was caused by the RoomCaptureView. I called roomCaptureView?.removeFromSuperview() after every finished room and when starting the next room I added it again to the view controller with roomCaptureViewConrtoller.view.insertSubview(roomCaptureView, at: 0).
It seems like this was not an issue in versions < iOS 17.4 beta but apparently you have to keep the view attached to the view controller and the multiroom works as in previous versions.
I think all you need to do is to return false in the method you described above. This will prevent ARP from postprocessing the result as far as i understand and you will be able to verify this when you look at the exported model.
The problem that will occur is that you will have to implement a custom visualization for the usd model if you want a instant preview of the scene.
I have found no documentation about it, but it seems when createing a CapturedStructure the coreModel is used to merge the CapturedRooms. If you manipulate the non-binary/readable data it will have no effect on the structure builder.
I think there is no such thing as colorized scan, if you want to mark/color the detected objects during the scan you can try to implement you own custom view instead of a RoomCaptureView. Search for it-jim and apple-roomplan-api
There is no direct way to get this information but if you need only a rough estimation you can use the floor boundary for example.
Thank you for posting your solution. What i don't understand: Did you manage to set anchors on the RoomCaptureView or did you make a custom view for that?
Additionally I noticed that when I already have scanned a room before and try to re-localize with the stored world map the previous frames are completely off like the world origin has changed.