SCN to USDZ

Hello guys,

How can I export a Scenekit file scene, to USDZ?
Thanks!

Replies

Ideally, SceneKit can be easily exporter as USDZ, maybe a simple export tool to do this will happen, as XCode is slowly becoming like 3D software in itself (?)


With SceneKit, if I am not wrong, you can export or convert it as Collada DAE, and then you can use 3D software like Blender to then export it as OBJ then finally usdz_converter it into USDZ.


Anyhow, logically SceneKit itself is something that should happen and generated inside iOS devices, so I think eventually "export to USDZ" becoming native for every iOS apps.

Need a solution inside Xcode...

Follow Yojimbo's advice.


You will need to convert the Collada (.dae) or Alembic (.abc) files into a USDZ file using usdz_converter, this is part of Xcode command line tools and is currently the only way to convert.


Make sure you have Xcode 10 Beta installed, and select it using

sudo xcode-select -s <PathToXcode10>


Then, run

xcrun usdz_converter <InputFile> <OutputFile>


If you have only the Scenekit archive (.scn) you can export it from Xcode by opening the file, and choosing File > Export... and saving it as a Collada first.

I'm trying to do this and am getting the error:


usdz_converter cannot process input asset format of 'dae'.


I'm just testing on a simple cube.dae file. It was exported out of Maya and seems fine via Finder, Preview, etc. However, running:


xcrun usdz_converter cube.dae cube.usdz


gives me:


asset_validation: error: /Users/jj/Applications/Xcode-beta.app/Contents/Developer/usr/bin/usdz_converter cannot process input asset format of 'dae'.


Any suggestions as to why it would be failing on the format it's supposed to use? Any help would be appreciated. Cheers,


J^2

Use Blender to import the DAE, then export it out as OBJ, Alembic, those are file types currently supported by XCode USDZ Converter.


However, you can also use Python USD and use USD workflow to generate USDA files that you can also convert to USDZ.


Even simpler is to use gltf2usd python module to help the conversion. I am using Blender 3D to do GLTF export, which then later converted into USDZ.

In Xcode, click on your .scn file, then go to File -> Export -> choose "Universal Scene Description Package"

Then, make sure to import the new .usdz into your project

I may be diverting the topic "SCN to USDZ" somewhat but I performed the above action (using Xcode [15.3 beta 2] to read .scn and export .usdz) on one of my, admittedly, complex .scn files. The scene in question is entirely line segments (closed loops - actually world coastlines). The exported .usdz model bears no similarity to the .scn file -- it's just over one kilobyte, and viewed in Xcode it does open, but is "empty." I know RealityKit doesn't provide for a ".line" primitive in meshes and wonder if .usdz is similarly constrained (it seems unlikely to me, but maybe Xcode doesn't support that structure either). The .scn file is large (1.1MB) but renders instantly in QuickLook .. could it be too large to be converted (again unlikely).

I'm no expert in 3D technologies and could be missing something obvious, but what the Xcode "conversion" delivers is unexpected. I'm bringing this here as I continue to explore conversions in the hope of a suggestion or two, OR being told what I'm attempting to do is not possible (and I can stop wasting time)?