Closed michsiu closed 1 year ago
While OpenUSD has a UsdMediaSpatialAudio schema, it does not currently ship with a runtime that consumes that data to play back audio. Similarly OpenUSD has UsdPhysics schemas for rigid body dynamics, but does not ship with a physics engine that consumes that data. I am not sure which products based off of USD support spatial audio right now-- NVIDIA Omniverse does, but needs to reconcile its audio schema with UsdMedia. Apple ARKit-based runtimes might work.
Description of Issue
I have some
USDZ files
and want to add sound to them. After following theOpen USD api docs
and usingusdzip
, the sound was added successfully but there is still no sound when I open theUSDZ file
Steps to Reproduce
USDZ
file by changing ext name tozip
and getusdc
fileaudio prim
onusdc
file throughpython
, the code is belowstage_ref = Usd.Stage.Open('1.usdc')
prim = stage_ref.DefinePrim('/audio','Xform') print(prim)
from pxr import Usd, UsdGeom, UsdMedia, Sdf, Vt
stage_ref = Usd.Stage.Open('1.usdc')
prim = stage_ref.GetPrimAtPath('/audio')
audio_prim = UsdMedia.SpatialAudio(prim)
audio_filepath_attr = audio_prim.CreateFilePathAttr("Tyrannosaur.mp3") aural_mode_attr = audio_prim.CreateAuralModeAttr("nonSpatial")
playback_mode_attr = audio_prim.CreatePlaybackModeAttr("loopFromStartToEnd")
stage_ref.Export('4_long.usdc')