RS 2.2 CLI Linux - can't export textures

Exporting a model is fine, but with textures it seems impossible. from the GUI i get “unsupported file format. try to install a codec for your format” (textures show in the gui and it actually creates an empty texture image file) and when i try to export from the CLI i get the following:

20533 0.00 0.00 4.52 #started
20533 1.00 1.49 14876.77 #completed
18841 0.00 1.49 14885.61 #started
18841 1.00 0.00 0.80 #completed
6 0.00 0.00 5.20 #started
6 0.20 1.73 7.58 #progress
Runtime Error (secondary thread): in Replace at line 121 of D:\build\OpenUSD\pxr\base\tf\safeOutputFile.cpp – Unable to determine the real path for ‘Z:\test\rs_model.usdz’: encountered dangling symbolic link
Coding Error (secondary thread): in AddFile at line 938 of D:\build\OpenUSD\pxr\usd\usd\zipFile.cpp – File is not open for writing
Coding Error (secondary thread): in AddFile at line 938 of D:\build\OpenUSD\pxr\usd\usd\zipFile.cpp – File is not open for writing
Coding Error (secondary thread): in Save at line 1004 of D:\build\OpenUSD\pxr\usd\usd\zipFile.cpp – File is not open for writing

There is obvjously nothing wrong with the output path as i can write other files such as cameras to the same directory

I see there are lots of similar posts on here but there doesnt seem to be any solution (yet?)

thanks

The CLI error is the path, not the texture format. OpenUSD is refusing to open the usdz for write:

Unable to determine the real path for ‘Z:\test\rs_model.usdz’: encountered dangling symbolic link

TfSafeOutputFile resolves the real path before it creates the zip. Realpath failed, so the zip never opens, and every AddFile after that (the textures) fails with “File is not open for writing”. A camera export can still succeed because it does not go through that usdz zip writer. Being able to create other files in the folder does not mean realpath on that .usdz path succeeds.

Z: is the problem. A subst drive, a mapped network drive, or a Wine drive letter whose target is a symlink shows up to USD as a dangling link. The D:\build\OpenUSD... frames are just the path compiled into the RealityScan binary, not a folder on your machine.

Export to a plain local directory that is not a symlink and not a subst:

  • On Windows, use something like C:\test\rs_model.usdz, and create C:\test first.
  • If this is Linux via Wine, do not use Z:. That is Wine’s unix root and it is full of symlinks. Use a path Wine maps to a real directory, for example C:\users<you>\test\rs_model.usdz.

The GUI message is a second problem. “unsupported file format, try to install a codec”, plus an empty image, means the texture writer created the file and then had no codec for the extension you picked. Set the texture format to PNG or JPEG in the export settings. An empty usdz from the CLI is the zip never opening, same as the log, not a zero-size texture.

Once the output path is a normal local file, export again. If PNG textures are still empty from the GUI only, say which extension the export dialog is set to.

You are right that changing Z: to C: made a difference for exporting usdz, but it still errors out, albeit a slightly different error:

realityscan-user@ee369bddd28d:/$ realityscan-cli -load realityscan.rsproj -exportModel “Model 2” “C:\rs_model2.usdz”
Runtime Error (secondary thread): in AddFile at line 965 of D:\build\OpenUSD\pxr\usd\usd\zipFile.cpp – Failed to map ‘C:\users\crossover\AppData\Local\Temp\RSTemp\{69222E9F-438F-4AC7-8966-124C79D159E8}\rs_model2_u1_v1_diffuse.png’:

when i have a look in the directory 'C:\users\crossover\AppData\Local\Temp\RSTemp\ it is empty.

So to summarize:
IN GUI:

usdz on Z: → model, no texture
usdz on C: → model, no texture
abc on C: → model, 0kb png file

CLI:
usdz on Z: → symlink error, no file
usdz on C: → map failure, no file
abc on C: → model, 0kb png file (rs starts up a gui even though it is cli where it says no codec)

I have also tried using exr and tiff, none of them work so it is not a codec problem. especially since it can write out the undistorted pngs without any problem