Store texture data in USD

Hi everyone,

I’m curious if there’s a method for consolidating a USD file along with its textures into a single file, perhaps using a 2D array format for the textures.

Best regards

Hi @GiangNguyen

So this is what a USDZ file is meant for. It packages up everything inside a single uncompressed zip file while still being able to be used by USD

But I want to store it as text for future data transformation purposes. As an illustration, I am currently developing a USD viewer in JavaScript and obtaining USD data from an external source, such as a REST API. To achieve this, I require the texture data in textual format.

I don’t understand - why does the fact that you’re implementing a REST API mean you require your textures to be text encoded? Binary image data, like jpgs or pngs, are sent over http + REST apis all the time. Why does your use case require everything to be text?

1 Like

Because receiving binary image data will require additional storage and data management process.

I’ll just add that developing a system that requires USD data to be encoded in its text form runs counter to the spirit and practical reasons why people use USD, and will lead to scaling problems in the long run. Are you aware of the USD/WASM work that some members of this community have been working on?

@GiangNguyen I’m not sure your assertion that it needs to be text encoded is correct.

Would you be able to go into more detail as to why you need it to be text?

Certainly, it is not a requirement for web and REST systems. JavaScript etc are also quite capable of receiving binary encoded files.

Generally no image decoder will render a text encoding of an image without having it be transmuted to binary data first. In which case it would make more sense to transfer it as binary first.

I acknowledge that relying on textual encoding for USD data may not be the most efficient approach. However, my need for a software solution that can both visualize USD scenes in a web browser, akin to usd-viewer, and dynamically manipulate USD data during runtime, akin to Omniverse, has led me to explore various options. Unfortunately, I have yet to find a stable library that fulfills all these requirements. Therefore, I’ve opted to develop a basic implementation at a low level until more suitable solutions become available, ideally including a JavaScript USD reader library similar to those found in Python.

will lead to scaling problems in the long run.

Regarding concerns about scalability, I fully acknowledge the potential for challenges in the long term. My current focus, however, is on short-term functionality to meet my immediate needs. If you’re aware of any resources or developments that could assist me in this endeavor, I would greatly appreciate your insights.

I appreciate your response. It’s possible my initial question didn’t fully convey my intentions. I’m in the process of creating a web-based tool aimed at visualizing and editing USD scenes Multiverse-View. This tool will eventually integrate with other software I’m developing, necessitating a REST API for getting and receiving scene. As mentioned above, I’ve encountered difficulties finding suitable existing software to meet my needs. Consequently, I’ve chosen to develop a basic solution at a low level, focusing on handling flattened USD files, until a more optimal solution emerges.