Skip to content

Instantly share code, notes, and snippets.

@yosun
Last active February 4, 2024 01:53
Show Gist options
  • Save yosun/b63c442ba39eea7b0c9d54f9f355729c to your computer and use it in GitHub Desktop.
Save yosun/b63c442ba39eea7b0c9d54f9f355729c to your computer and use it in GitHub Desktop.
usdz cheatsheet

Notes on https://developer.apple.com/videos/play/wwdc2019/602/

USDZ archive

USDZ is an archive consisting of scene files (usda, usdc, usd) and textures (png/jpg)

  • usda: human readable file (A)
  • usdc: binary computer file (C)
  • usd: both?

apple usd helper python scripts

usdzconvert

usdzconvert filename.gltf (.fbx) usdzconvert -h for all command line options usdzconvert filename.obj -diffuseColor d.png -normal n.png -metallic m.png -roughness r.png

usdcat

plaintext rep of model

usdtree

usdtree - high level tree of model

usdchecker

usdchecker filename.usdz --arkit - checks asset

usda file structure

  • metadata
  • primitives
  • call access hierarchy

usda file structure

mesh

mesh

  • point3f[] points, int[] faceVertexCounts, int[] faceVertexIndices, normal3f[] normals
  • per face attribute interpolation: uniform

uv

  • UV float2[] primvars:st indexed mesh attributes
  • UV faceVarying: per-face per-vertex attributes
  • subdivisionScheme = "none" to render as polygon and not subdiv surface

materials

UsdPreviewSurface

Workflows

  • Metallic-roughness
  • Specular-roughness

metallic- example

usd materials

shader node graph

  • UsdPreviewSurface - Main Node
  • UsdUVTexture - texture sampler
  • UsdPrimvarReader - mesh attribute reader
  • UsdTransform2D - UV transform

Example

Image from Gyazo Image from Gyazo

Example 2

Image from Gyazo Image from Gyazo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment