Syoyo Fujita 59730db074 Update README.
Update build script.
2020-04-15 14:08:53 +09:00
2020-04-02 00:30:59 +09:00
2020-04-09 16:48:43 +09:00
2020-04-15 14:08:53 +09:00
2020-04-04 18:18:32 +09:00
2020-04-12 21:59:16 +09:00
2020-04-02 01:34:04 +09:00
2020-01-08 22:05:24 +09:00
2020-04-15 14:08:53 +09:00
2020-04-15 14:08:53 +09:00

Tiny USDZ loader

TinyUSDZ is dependency-free(depends only on C++ STL. Yes, you don't need USD library!) USDZ loader library written in C++11.

Requirements

  • C++11

USDZ file format

USDZ is a uncompressed zip file. USDZ contains usdc(binary) and resources(e.g. image file)

Build

Integrate to your app

Recomended way is simply copy src and include folder to your app, and add *.cc files to your app's build system.

Compiler defines

  • TINYUSDZ_USE_OPENSUBDIV : Use OpenSubviv for subdivision surface(to get smooth mesh from USD(Z) primitive).

CMake

cmake build is still provided, but not recommended

$ mkdir build
$ cd build
$ cmake ..
$ make

CMake build options

  • TINYUSDZ_BUILD_TESTS : Build tests
  • TINYUSDZ_BUILD_EXAMPLES : Build examples(note that not all examples in examples folder are built)
  • TINYUSDZ_WITH_OPENSUBDIV : Use OpenSubviv to tessellate subdivision surface.
  • TINYUSDZ_WITH_AUDIO : Support loading audio(mp3 and wav).
  • TINYUSDZ_WITH_EXR : Support loading EXR format HDR texture.

Build with OpenSubdiv

Recommended way is to run scripts/clone_osd.sh to clone OpenSubdiv-aarch64 repo to deps/OpenSudiv, then run scripts/bootstrap-cmake-linux-with-osd.sh .

Meson

Meson build is provided for testing compilation.

$ meson builddir
$ cd builddir
$ ninja

Examples

See examples directory.

Data format

Primitive

  • visibility
  • position(FLOAT3 only)

TODO

  • USDA(USD Ascii) support
    • Write our own USDA parser with PEG.
  • Animation
    • Skinning(usdSkel)
    • Blend shapes
      • In-between blend shapes
  • Audio play support
    • Play audio using SoLoud or miniaudio(or Oboe for Android)
    • wav(dr_wav)
    • mp3(dr_mp3)
    • m4a?
  • Android example
  • iOS example?
  • CPU raytracer viewer
  • Viewer with Vulkan API.
  • Replace OpenSubdiv with our own subdiv library or embree3's one.
  • Read USD data with bounded memory size. This feature is especially useful for mobile platform(e.g. in terms of security, memory consumption, etc)
  • USDZ saver
  • Support Nested USDZ
  • UDIM texture support
  • Support big endian

Fuzzing test

See tests/fuzzer/

License

TinyUSDZ is licensed under MIT license.

Third party licenses

Description
Tiny, dependency-free USDZ/USDA/USDC library written in C++14
Readme 114 MiB
Languages
C++ 64.1%
JavaScript 15.5%
C 8.8%
Python 3.7%
CMake 1.5%
Other 6.2%