Convert .reality into USDZ

Hey Everyone, this is like my first post here in the apple forum.

I need your help to understand better Reality Kit and file exports, but let me explain. I'm trying to create a little 3D Object editor, and it looks like to work pretty well using RealityViews and managing materials on the Entity. I'm currently working with all the Beta Apis and I would like to export my entity into an .usdz or a .obj file.

I've found a method that allows me to create a .Reality File

let path = FileManager.default.urls(for: .documentDirectory,
                                                                     in: .userDomainMask)[0].appendingPathComponent("model.reality")

try await self.appState.parentEntity.write(to: path)

but I now I don't know how to convert it into a .usdz or a .obj file, or otherwise any standard 3d format.

Do you have any idea on how could I do?

Thankyou so much! Have a nice day ^^

There is no native API to convert a .reality file to another model file format. Please consider filling an enhancement request via feedback assistant.

As an aside you can use MDLUtility / convertToUSDZ:writeToURL: to convert an SceneKit scene file (which can be programmatically created using SCNScene write(to:options:delegate:progressHandler:)) to a usdz, but I don't think that will help you. Calling it out in case you come across the function. The documentation doesn't specify the file format of the first argument so I want to state it doesn't take a .realityfile.

Convert .reality into USDZ
 
 
Q