title: How to create a .usdz animation?
body: <p>You can now convert 3D models to <code>.usdz</code> files (uncompressed zip archive) using Apple's command line tool bundled with Xcode 10 beta.</p>
  
  <p>Example code to convert an <code>.obj</code> file to <code>.usdz</code>:</p>
  
  <pre><code>xcrun usdz_converter magnifying_glass.obj -g frame magnifying_glass.usdz 
  -color_map gold-basecolor.png -normal_map gold-normal.png
  -roughness_map gold-roughness.png -metallic_map gold-metallic.png
  </code></pre>
  
  <p>The following input 3D file types are supported:</p>
  
  <ul>
  <li>OBJ file</li>
  <li>Single-frame Alembic (ABC) file</li>
  <li>USD file either .usda (ascii) or .usdc (binary) </li>
  </ul>
  
  <p>It's my understanding the OBJ file does not support animation natively.</p>
  
  <p>A single-frame Alembic file won't support animation either as its a single-frame. </p>
  
  <p>So I'm guessing you need to use usda file which link to a sequence of single-frame Alembic or single-frame OBJ files to generate animations.</p>
  
  <p>Is there any Publicly Available documentation on how to go about this?</p>
  
  <p>A usda file can use payload files to reference single-frame meshes. The example below references a Treasure Chest single-frame alembic file geometry.</p>
  
  <pre><code>#usda 1.0
  
  def "Chest_Base" (
       references = [ @./Chest.abc@&lt;/Chest_Base&gt; ])
  {
  
  }
  </code></pre>
  
  <p>But I haven't found any concrete way of linking a sequence of <code>.obj</code> or single-framed alembic <code>.abc</code> files together to create say a 10-second animation.</p>
  
  <p>Any help or hint would be greatly appreciated.</p>
  
  <p><strong>Edit 30th June:</strong></p>
  
  <p>I’ve now managed to animate a USDZ file. I’ve got a <a href="http://www.fusionar.app" rel="noreferrer">live demo</a> here of a rotating gears and helicopter. </p>
  
  <p>Basically, I needed to download the usd pipeline from github and build it on my mac. You can get good instructions on how to do that from <a href="https://github.com/TimvanScherpenzeel/gltf-to-usdz" rel="noreferrer">here</a></p>
  
  <p>Be warn set aside at least a couple of hours, the build itself takes about an hour. </p>
  
  <p>After that i ran the <a href="https://graphics.pixar.com/usd/docs/567231471.html" rel="noreferrer">animated tutorial example</a> in the usd pipeline bundle. Step5.usda (ascii usd file) has an animation example which I followed to create my own animations using rotations. </p>
  
  <p>Running this usdz command will create a simple animation of a spining top if you create the Step5.usda file following the pixar tutorial at the link above.</p>
  
  <pre><code>xcrun usdz_convertor Step5.usda animationTest.usdz
  </code></pre>
  
  <p><strong>Edit 10th July 2018:</strong></p>
  
  <p>usdz also supports alembic assets (with animations).</p>
  
  <p>I have now managed to get a simple animation working in usdz (using the alembic file format). However, a bone animation on a character I tried didn't work.</p>
  
  <p>I exported Alembic assets with both the Blender &amp; Modo Alembic exporters... same results. </p>
  
  <p>UV materials were also not mapping correctly to the mesh. Something wrong with the uv scaling &amp; mapping... materials come out fragmented. At this stage I don't know if this is a bug, or whether I'm not doing something wrong here. There is some discussion about this uv mapping issue on the <a href="https://forums.developer.apple.com/thread/105166" rel="noreferrer">Apple forum</a></p>
  
  <p><strong>Edit 8th Sept 2018:</strong></p>
  
  <p>This is a rapidly evolving area and I'm sure more ways to tackle usdz animation creation will appear over time. However, at present the best &amp; least costly way (open source) to make transform, bone, blend-shape or morph animations usdz files is using a command-line tool hosted on GitHub called <a href="https://github.com/kcoley/gltf2usd" rel="noreferrer">glTF2usd</a>. </p>
  
  <p>The tool can convert a glTF animation file into a usda file (the intermediary file type) for creating the usdz file. It should also support direct usdz creation shortly, negating the need to use Apples usdz_converter command line tool to go from usda -> usdz.</p>
  
  <p>Only currently supports 1 animation group. Some bugs still exists regarding rotations, --use-euler-rotation handle can be used to help with smoother rotations. </p>
  
  <p>I've been posting usdz animations I have been creating with the tool to an online usdz gallery <a href="http://www.fusionar.app" rel="noreferrer">www.fusionar.app</a></p>