Coder Social home page Coder Social logo

usdconverter's Introduction

USDConverter

A USDZ-to-OBJ converter powered by Model I/O

NOTE: This tool was developed out of a need to use static USDZ models in Blender. (see below for a matching import addon)
Now that Blender directly supports importing USD* files, I'm stopping work on this.
The last update, v1.7, fixes a crash bug. Beyond that, barring some unforeseen changes to either Model I/O or the USD specs, this tool should keep working forever.

Usage

  1. Download the latest source code archive and compile the project.
  2. Move the usdconv binary somewhere into your PATH or into the same directory as the USDZ files you want to convert.
  3. Execute it from the terminal like this:
usdconv model1.usdz

You can also convert multiple files in one go by simply specifying more files:

usdconv model1.usdz model2.usdz model3.usdz

Options

-v, --version           Show the version number and exit.
--png                   Convert all texture formats to PNG.
--force                 Try to force conversion, even if the input format is unsupported.
--include-garbage       Keep initial files generated by Model I/O.
-h, --help              Show help information.

With no options specified, running usdconv model.usdz will output these files and directories:

  • model.obj
  • model.mtl
  • model/(a bunch of textures in various formats)

The --include-garbage and --force options are mainly for debugging:

  • Specifying --include-garbage will keep the unfiltered files generated by the Model I/O framework around. They usually aren't all that useful as they lack the extended PBR attributes this tool generates.
  • --force has no practical value outside of debugging. It'll attempt to force input files to load, with no guarantees of success. Rule of thumb is if a file can't be loaded normally, this won't work either.

Using Blender?

Check out my alternate OBJ importer with support for the additional PBR MTL directives added by this tool: io_scene_obj_modelio

usdconverter's People

Contributors

samusaranx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

usdconverter's Issues

Use more secure access

let deduplicatedMatName = materialCountDict.filter({
                  return $0.value.map({
                    Substring($0.name) // Swift wants a Substring for some reason
                  }).contains(matName)
                })[0].key.name

to

let deduplicatedMatName = materialCountDict.filter({
                  return $0.value.map({
                    Substring($0.name) // Swift wants a Substring for some reason
                  }).contains(matName)
                }).first?.key.name

Not work in macOS Ventura and Monterey

Hi:
I download the latest version, It work find in MacOS: Sonoma, but not work in previous MacOS: Ventura and Monterey, OBJ's MTL file content has some problem. but previous USDConverter version work fine in Ventura and Monterey.

Thanks for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.