USDZ is a 3D file format that shows up as AR content on a website.

USDZ Documentation

Posts under USDZ tag

77 Posts
Sort by:
Post not yet marked as solved
1 Replies
47 Views
Hi all, I have a requirement about converting usdz to iges file in swift app, I searched on google but didn't find any support library in this. do you know a library that supports this? Thanks all.
Posted
by
Post not yet marked as solved
0 Replies
83 Views
I am trying to configure the materials of a downloaded USDZ file and then save it in the Documents folder as a new USDZ file. Currently, I am using the ModelEntity class but I have two problems: I should modify the materials by using their names, but this class just seems that I can access the list of materials and eventually replace them but without knowing their name; I have no idea how to save it in the local Documents folder as a new USDZ file in order to pass the URL to the AR QuickLook controller to display the modified file in AR. Probably I should change my approach by using other classes. Could anyone give me some advice on how to proceed to achieve my goal? I would really appreciate any help.
Posted
by
Post marked as solved
1 Replies
140 Views
I’m trying to use QuickLook AR to show a 3D ThreeJS model in AR on iOS. Exporting my 3D object to USDZ using the Three USDZ exporter works fine. When opening the USDZ file in XCode everything seems to be fine. Though, when opening the USDZ in QuickLook AR, the 3D model is flying above the ground, on my camera’s Y level. The camera PoV is positioned exactly in the middle of the X and Z axis of the 3D model and at the bottom of the Y level. I have another problem with opening the USDZ in QuickLook AR, which is; When opening the USDZ in QuickLook AR, the model is invisible at first. Then when I scale the model down to < 10%, the model becomes visible, though it does not scale in size at all. Also, the “Model” tab in QuickLook does not even show the 3D model. When switching between the “Model” and “AR” tabs, the model flies by really quick. For reference, I’ve added my USDZ model below. What I’m trying to accomplish is to position the 3D model in front of me, and for the 3D model to acknowledge the world shown by the camera. The 3D model should stick to walls, or at least the floor to begin with. Button click code: newScene.add(sceneRef) const pivot = new THREE.Object3D() newScene.add(pivot) pivot.add(sceneRef) // position the object on the pivot, so that it appears 5 meters // in front of the user. pivot.position.z = -50 const yaxis = new THREE.Vector3(0, 1, 0) const zaxis = new THREE.Vector3(0, 0, 1) const direction = zaxis.clone() // Apply the camera's quaternion onto the unit vector of one of the axes // of our desired rotation plane (the z axis of the xz plane, in this case). direction.applyQuaternion(cameraRef.quaternion) // Project the direction vector onto the y axis to get the y component // of the direction. const ycomponent = yaxis .clone() .multiplyScalar(direction.dot(yaxis)) // Subtract the y component from the direction vector so that we are // left with the x and z components. direction.sub(ycomponent) // Normalize the direction into a unit vector again. direction.normalize() // Set the pivot's quaternion to the rotation required to get from the z axis // to the xz component of the camera's direction. pivot.quaternion.setFromUnitVectors(zaxis, direction) // Finally, set the pivot's position as well, so that it follows the camera. newScene.getWorldPosition(cameraRef.position) newScene.updateMatrixWorld(true) iosExporter.parse(newScene).then((result) => { saveUSDZString(result, 'scene.usdz') }) saveUSDZString function: function saveString(text: any, filename: any) { save(new Blob([text], { type: 'application/json' }), filename) } save function: function save(blob: any, filename: any) { link.href = URL.createObjectURL(blob) link.download = filename link.rel = 'ar' let img = document.createElement('img') img.alt = 'hi' img.src = 'https://google.com/img' link.appendChild(img) link.click() } USDZ Model: https://wetransfer.com/downloads/2d2d2e840f9f964e036cd6077094c33220220630095321/a7f94b9f2bc730fead9107bf133e175220220630095338/193b81?utm_campaign=WT_email_tracking&utm_content=general&utm_medium=download_button&utm_source=notify_recipient_email
Posted
by
Post not yet marked as solved
0 Replies
43 Views
Hello I am trying to figure out what I am doing wrong. I am trying to import audio into the .usdz file, followed the "usdzaudioimport -h" with the params, and I am getting this   "Error: unexpected parameter -auralMode for argument --audio" ?? I removed it( then getting the you need parameters), used only one parameter still getting unexpected parameter or for auralMode or playbackMode!? downloaded the latest 3 times, reinstall/verified Python version and installation, the PATH, etc... It is driving nuts, being the first time I use this tool. I am hoping someone smarter than me can "slap me behind the head" and point out the obvious that I cannot see!! LOL Here is my command, any hint and things to try will be more than welcome. Thank you very much! here the command I used and the result: % usdzaudioimport /Users/macuser/Documents/griffon_v2.usdz /Users/macuser/Documents/griffon_v2b.usdz --audio /Users/macuser/Documents/CH-146_Griffon_webAr.mp3 -auralMode spatial -playbackMode onceFromStart usdzaudioimport 0.01   Error: unexpected parameter -auralMode for argument --audio For more information, run "usdzaudioimport -h"
Posted
by
Post not yet marked as solved
2 Replies
144 Views
I select usdz file and add reference node with file url. let scene = SCNScene() let refNode = SCNReferenceNode(url: usdzPath) refNode?.position = SCNVector3(0, -0.1, -0.25) refNode?.load() refNode?.scale = SCNVector3(0.01, 0.01, 0.01) scene.rootNode.addChildNode(refNode!) sceneView.scene = scene sceneView.delegate = self sceneView.autoenablesDefaultLighting = true sceneView!.allowsCameraControl = true Its works for me. I show the 3D object. But i want to change usdz file texture in swift. how can i it?
Posted
by
Post not yet marked as solved
0 Replies
132 Views
Using Reality Composer [within Xcode]... I've built an .rcproject file with 25 scenes containing Behaviors w/Triggers + Actions to change scenes, one after another. When exported as a .reality file, it does run successfully through all 25 scenes. ❓However... when exported as a .usdz file via "Export: Project" (not "Export: Current Scene"), it only runs the 1st scene, as though the rest of the scenes do not exist. The Trigger to change to the 2nd scene does nothing. ✅ Btw I do have "Enable USDZ export" checked (which is not on by default) in the Preferences for Reality Composer. ✨Thank you✨ I'd greatly appreciate any troubleshooting tips❗️
Posted
by
Post not yet marked as solved
0 Replies
112 Views
Hi, I looked through whole internet searching for some way to compress USDZ files for AR (Quick Look). I see there is some old blog post about Draco compression for USD - https://opensource.googleblog.com/2019/11/google-and-pixar-add-draco-compression.html . Does anyone know if Quick Look supports USDZ files with Draco compression? I haven't found any mention of it in the official documentations :/ Or maybe there is some other way?
Posted
by
Post not yet marked as solved
0 Replies
161 Views
Hello USD team, Thanks for the great demo USD and Hydra/Storm demo! Is it possible to build an app with USD Hydra/Storm -> SwiftUI interactions? Ex: a car configurator that has: a car as a USD file animations desired on the USD file. SwiftUI button to opens the doors, another button to play a sound, etc? everything rendered in Hydra/Storm. as the demo app Thanks.
Posted
by
Post not yet marked as solved
1 Replies
128 Views
Hello, I have a problem with converting GlTF to USDZ using usdzconverter. After converting, the resulted USDZ file has a displaced axis of rotation, when the original axis is placed in the center of the object. I've attached two screenshots, in the first one axis is correct (the file was converted with a third-party service) and in another one it's not (usdzconverter was used) Is there a way to fix it somehow? Thanks, Mikola
Posted
by
Post not yet marked as solved
0 Replies
117 Views
I use Entity.loadAsync to load the USDZ. The camera is stuck for a moment when loading the model. var cancellable: AnyCancellable? = nil     cancellable = Entity.loadAsync(contentsOf: Bundle.main.url(forResource: "vyygabbj_afr", withExtension: "usdz")!)       .sink(receiveCompletion: { error in         DispatchQueue.main.async {          cancellable?.cancel()          cancellable = nil         }       }, receiveValue: { [weak self] ey in         guard let self = self else { return }         self.modelEy = ModelEntity()         self.modelEy.addChild(ey)         self.rootAnchor.addChild(self.modelEy)         ey.availableAnimations.forEach {           ey.playAnimation($0.repeat())         }         DispatchQueue.main.async {           cancellable?.cancel()           cancellable = nil         }     })
Posted
by
Post not yet marked as solved
0 Replies
133 Views
Hi - I'm a founder at an AR SaaS company that relies on the USDZ conversion tools to deliver quicklooks to our Apple device users. I was wondering if there was a changelog for the 0.64 to 0.65 update that I could access (whether publicly, or under NDA) as our content pipeline has baked in a lot of the old 0.64 quirks, issues and unsupported USD features that we discovered (things like avoiding multi-UV material mapping, or how to ensure GLTF texture transforms come through). If we knew the specific changes made - whether bugs fixed, or additional USD features supported - it would make upgrading much smoother and more predictable. Is there anyone I can contact to get a list like that?
Posted
by
Post not yet marked as solved
0 Replies
164 Views
I want to crop the usdz model in runtime. I use ModelIO for this. Before: [https://i.stack.imgur.com/yDXXF.jpg) After: [https://i.stack.imgur.com/m9ryg.jpg) First of all, get file from bundle let url = URL(fileURLWithPath: file) } else { print("Object not found in Bundle") } And then I need to access asset let asset = MDLAsset(url: url) What should I do after this step? How am I supposed to use SCNGeometrySource and SCNGeometryElement or MDLVoxelArray classes?
Posted
by
Post marked as solved
1 Replies
224 Views
How can I crop a 3D model as seen in the photos? Should I use MetalKit or can I handle it with sceneKit and modelIO? I couldn't find any code examples on this topic. Can you share the code snippet Before: [https://i.stack.imgur.com/yDXXF.jpg) After: [https://i.stack.imgur.com/m9ryg.jpg)
Posted
by
Post not yet marked as solved
3 Replies
301 Views
Hello, My problem is that I would like to have the first screen (the screen right before entering AR) removed from the AR Quick look. I want it to where when I open the USDZ, it goes straight into AR, and not show the screen before it, similar to how Apple does it when you want to view their iPhone 13 pro in AR.
Posted
by
Post not yet marked as solved
0 Replies
155 Views
Is there any way to download apple product models in .usdz directly from apple website?
Posted
by
Post not yet marked as solved
1 Replies
266 Views
Hi, I'm using the provided CaptureSample together with HelloPhotogrammetry to create a 3D model. Although I am making sure that there are depth images within the folder (TIF) - after building the model, the model size is tiny. How can I make sure that the model is built in the real world size? or - how can i resize the model to real world size? Thanks.
Posted
by
Post not yet marked as solved
1 Replies
203 Views
I am using scene.write(to:"dirpath\name.usdz") to get usdz export functionality into my app (universal, macOS & iOS). My problem is, it ceases to work after the first use, quitting & restarting the app is the only way to re-enable it. I have tried reusing the same scene, and instantiating a new scene (both ways with the exact same node structure), same results every time: first invocation writes a file of ~14MB, any calls after that write 1.5-2k of garbage. I use a unique filename for each write, and check to make sure it doesn't already exist. Any ideas?
Posted
by
Post not yet marked as solved
2 Replies
342 Views
I want to remove unnecessary materials or textures in order to reduce the size of the USDZ model I have. How can I manipulate this model with swift? or, I can try any advice to reduce the size of the USDZ model
Posted
by