Heya
I need help SOS from you guys.
I need to process a number of USDZ files (scan data and textures)
I need to update the geometry in USDZ, like scale, orient and transform.
I need to save back (or create) a new USDZ file.
However, when in Houdini I couldn`t update the original USDZ, I created a new one. But all material texture file references from the USDZ are still referring to the same USDZ, and the new USDZ contains the original USDZ file also.
I managed to create a baker from USDZ, and it would work with the original USDZ, but apparently the multiple nesting doesn't work.
So what I need to solve is to update the geometry in the original USDZ file...
Could you help me?
Thanks in advance!
SOS help needed USD geometry update
525 4 1- szmatefy
- Member
- 141 posts
- Joined: Dec. 2015
- Offline
- antc
- Member
- 273 posts
- Joined: Nov. 2013
- Offline
Lops doesn't really let you modify input files as you would only be able to cook the lop network a single time. You probably want to sublayer the root layer of the original usdz file and add your transform data in a new (stronger) layer that would become the new root layer.
Because usdz files are just regular zip files I think I'd be inclined to unzip, add a new root layer as described above and then create a new archive. Reading the usdzip documentation [openusd.org] it seems that usdzip --asset <your_layer> should take care of copying any referenced files (including png, jpeg and exr texture files) into the archive and update all occurrences or the corresponding asset paths. Kind of all theory though as I don't have an any experience with usdz!
Because usdz files are just regular zip files I think I'd be inclined to unzip, add a new root layer as described above and then create a new archive. Reading the usdzip documentation [openusd.org] it seems that usdzip --asset <your_layer> should take care of copying any referenced files (including png, jpeg and exr texture files) into the archive and update all occurrences or the corresponding asset paths. Kind of all theory though as I don't have an any experience with usdz!
Edited by antc - March 3, 2024 18:47:57
- szmatefy
- Member
- 141 posts
- Joined: Dec. 2015
- Offline
- antc
- Member
- 273 posts
- Joined: Nov. 2013
- Offline
szmatefythis works for me.
How can I set a relative filepath in a wrangle?
s@inputs:file = "some/relative/path/texture.png";
Note that the path is relative to the layer, not the current working directory.
I downloaded this model [developer.apple.com] and after unzipping, the relative texture paths were correct and needed no adjustment. Maybe try that model and see if it works for you. It seems that usdzip always packs dependent assets into a directory named '0', and the root layer is in that directly as well. Therefore a relative path like '0/texture.png' should resolve ok.
Edited by antc - March 4, 2024 21:52:03
- szmatefy
- Member
- 141 posts
- Joined: Dec. 2015
- Offline
-
- Quick Links