Hello,
I have a usdz model created in Maya. It's supposed to have a splashing animation associated with it, and this can be viewed in Maya and Blender, but for some reason when I export it to usdz and then import it into my Reality Composer Pro project, the animation is missing. I expect an animation library to be created on the entity when I drag it in like any other usdz with animation data, but that is not the case.
Any help would be appreciated on this issue.
USDZ
RSS for tagUSDZ is a 3D file format that shows up as AR content on a website.
Posts under USDZ tag
62 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I have a very basic usdz file from this repo
I call loadTextures() after loading the usdz via MDLAsset. Inspecting the MDLTexture object I can tell it is assigning a colorspace of linear rgb instead of srgb although the image file in the usdz is srgb.
This causes the textures to ultimately render as over saturated.
In the code I later convert the MDLTexture to MTLTexture via MTKTextureLoader but if I set the srgb option it seems to ignore it.
This significantly impacts the usefulness of Model I/O if it can't load a simple usdz texture correctly. Am I missing something?
Thanks!
I have created a simple scene in reality composer (composer not composer pro).
It contains just a cube and text item.
I convert this to usdz file and load it into a Arkit swift app.
Since ios 18/xcode 16 - the "text" element is not displayed at all.
The cube is displayed, anchors correctly and can be moved etc....
The output from usdchecker
➜ Desktop usdchecker GKTUHR1.6.3.usdz -v --arkit
Opening GKTUHR1.6.3.usdz
Checking layer <GKTUHR1.6.3.usdz>.
Checking package <GKTUHR1.6.3.usdz>
Checking prim </Root>.
Checking prim </Root/Scenes>.
Checking prim </Root/Scenes/Scene>.
Checking prim </Root/Scenes/Scene/Gravity>.
Checking prim </Root/Scenes/Scene/sceneGroundPlane>.
Checking prim </Root/Scenes/Scene/sceneGroundPlane/physicsMaterial>.
Checking prim </Root/Scenes/Scene/Children>.
Checking prim </Root/Scenes/Scene/Children/hello>.
Checking prim </Root/Scenes/Scene/Children/hello/Generated>.
Checking prim </Root/Scenes/Scene/Children/hello/Generated/Text>.
Checking prim </Root/Scenes/Scene/Children/hello/Generated/Text/Material>.
Checking prim </Root/Scenes/Scene/Children/hello/Generated/Text/Material/PBRShader>.
Checking shader </Root/Scenes/Scene/Children/hello/Generated/Text/Material/PBRShader>.
Checking prim </Root/Scenes/Scene/Children/hello/Children>.
Checking prim </Root/Scenes/Scene/Children/Box>.
Checking prim </Root/Scenes/Scene/Children/Box/Generated>.
Checking prim </Root/Scenes/Scene/Children/Box/Generated/Mesh0>.
Checking prim </Root/Scenes/Scene/Children/Box/Generated/Mesh0/Mesh0>.
Checking prim </Root/Scenes/Scene/Children/Box/Generated/Mesh0/Material>.
Checking prim </Root/Scenes/Scene/Children/Box/Generated/Mesh0/Material/PBRShader>.
Checking shader </Root/Scenes/Scene/Children/Box/Generated/Mesh0/Material/PBRShader>.
Checking prim </Root/Scenes/Scene/Children/Box/Children>.
Checking prim </Root/Scenes/Scene/Children/Box/PhysicsMaterial_Box>.
Found material bindings but no MaterialBindingAPI applied on the prim </Root/Scenes/Scene/sceneGroundPlane>. (fails 'MaterialBindingAPIAppliedChecker')
Found material bindings but no MaterialBindingAPI applied on the prim </Root/Scenes/Scene/Children/hello/Generated/Text>. (fails 'MaterialBindingAPIAppliedChecker')
Found material bindings but no MaterialBindingAPI applied on the prim </Root/Scenes/Scene/Children/Box>. (fails 'MaterialBindingAPIAppliedChecker')
Found material bindings but no MaterialBindingAPI applied on the prim </Root/Scenes/Scene/Children/Box/Generated/Mesh0>. (fails 'MaterialBindingAPIAppliedChecker')
Failed!
If I put an alpha image texture on a model created in Blender and run it on
RCP or visionOS, the rendering between the front and back due to alpha will result in an unintended rendering. Details are below.
I expor ted a USDC file of a Blender-created cylindrical object wit h a PNG (wit h alpha) texture applied to t he inside, and
t hen impor ted it into Reality Composer Pro.
When multiple objects t hat make extensive use of transparent textures are placed in front of and behind each ot her,
t he following behaviors were obser ved in t he transparent areas
・The transparent areas do not become transparent
・The transparent areas become transparent toget her wit h t he image behind t hem
the order of t he images becomes incorrect
Best regards.
Hi,
since RealityKit 4 now supports Blend Shapes I was wondering if there are any workflow or tooling recommendations to bake/export them into a USDZ.
Are Blender or Cinema4D capable to do that out of the box? Should we look into NVIDIA omniverse (https://docs.omniverse.nvidia.com/connect/latest/blender/manual.htm)
So far this topic seems very sparsely documented and I would appreciate any hints. Thank you!
We have a native iOS app that supports the upload and display of USDZ files. It has been working great since beta (late 2022) and live launch (late 2023) until now. But recently we had reports from some users on Max model phones (14 + 15 Pro Max) at least. When they launch tap and launch a 3D file the Quick Look player is triggered. So far so good. But for affected users the controls along the top of the player - X (close) AR | Object (toggle) and share button - are moving too high up the phone screen and getting stuck (untappable) behind the phone's top status bar (time, camera bug, connection, battery).
This means that when they open a USDZ file in AR or 3D view they have to hard-close the app to get out of it again. This doesn't happen when they open a USDZ file from Files, Dropbox etc on their phone (which also uses the Quick Look player). The controls only move up and get stuck when launching a USDZ from within our app.
I'm at a loss to figure out what might be causing this on some phones and not all others. And why only when opening a USDZ file from our app! So far we have replicated this issue on a single iphone 14 Pro Max and a 15Pro Max, both running iOS18+
We have tested on other 15Pro Max's on same OS, and Pros, normal iPhones, Minis and are not experiencing the issue. You would think that a USDZ file is a USDZ file and that your iPhone knows what to do with it and open it in the Quick Look player regardless of where you open the file from. Why would the navigation items be moving if you open the USDZ file from within our app, and why only for some select users?
We will continue to troubleshoot and test but I wanted to throw this out to the community in case anyone had experienced this or if anyone had any theories that would expedite our testing. Your thoughts are most appeciated!
Here is a video showing the expected (correct) behaviour: https://www.dropbox.com/scl/fi/0sp8s4opaf2m4gukkcbrk/How-opening-a-USDZ-should-behave_correct-behaviour.MP4?rlkey=tzzau9x91mwox66gsgguryhep&st=qiykmne9&dl=0 and a screenSHOT attached below of what is happening on one of the affected user's iPhone 15Pro Max.
In my VisionPro app, I'm facing a problem with loading USDZ models from a RealityKitBundle package, created using Reality Composer Pro.
It was working fine until I added more models to the package. As I added more models with large textures in the project, the app started to show them with texturing problems.
So, when I load the models from the RealityView using Entity(named:in), the mesh loads correctly, but all black, with no textures, as below:
However, when I load the same USDZ directly from the main bundle, using ModelEntity(named:in), it loads fine.
I know that large textures can cause memory issues, but when talking about one single model, I know that it's not enough to cause a memory overflow in the VisionPro. This USDZ model is about 40MB with something around 800MB of texture memory (from the RealityComposerPro Statistic tab).
I've built experiences in VisionPro with much heavier models, and they do present the same texture issues, but only after there's more than 3 huge models enabled in the Reality scene. But that's not the case. The un-textured model appears right from the beginning, so it seems to me that's not a runtime issue in the device, but rather some issue in the packaging process from RealityComposerPro to XCode to the Device, am I correct?
I'm also using a simple Mac Mini with M2 but only 8MB of RAM. Maybe that's the issue?
As I still want to use RealityComposerPro to build more dev-friendly and interesting applications, I'd really appreciate some guidance here!
Thanks in advance!
I'm developing a VisionOS app and I'm trying to load a ModelEntity from a USDZ file which is inside my custom RealityKit package called R2UVisionOficial. But it keeps giving me an resourceNotFound error.
import RealityKit
import R2UVisionOficial
import ARKit
/* more code */
do {
let newEntity: Entity
//...
// Loads entity from USDZ inside package
newEntity = try await ModelEntity(named: "Salas", in: r2UVisionOficialBundle)
//...
return newEntity
} catch {
print("wtManager >>> **** FAILED to load entity:", error.localizedDescription)
throw error
}
I'm sure I have the Salas.usdz file in the root folder of my package and that I'm using the correct paths. However I keep getting the error:
Failed to find resource with name "Salas" in bundle
It's funny because when I try to load a USDA (scenes) from the same packages, it works fine. So I guess there's something to do with ModelEntity or USDZ files.
Can you please help me?
P.S. This issue is similar to https://developer.apple.com/forums/thread/746842?answerId=780415022#780415022
Apple's own USDZ files from their website does not display properly both in OPReview and in Keynote when imported. It displays properly, however, in Reality Converter bit with this error:
"Invalid USD shader node in USD file
Shader nodes must have “id” as the implementationSource, with id values that begin with “Usd”. Also, shader inputs with connections must each have a single, valid connection source."
I tried importing other models from external sources and they work without any issue at all.
Is there any potential fix or workaround this?
Thanks in advance.
Hello everyone, is it possible to embed a USDZ file (Roomplan) in an HTML5 website and view it in 3D? Or do I need to convert the USDZ file into a GLTF file?
When I load some usdz file , it crash 100%, Why ?
It crash in simulate , but not crash in Vision Pro
-[MTLDebugDevice newBufferWithBytes:length:options:]:723: failed assertion `Buffer Validation
newBufferWith*:length 0x100fff80 must not exceed 256 MB.
Hello!
I'm trying to play an animation with a toggle button. When the button is toggled the animation either plays forward from the first frame (.speed = 1) OR plays backward from the last frame (.speed = -1), so if the button is toggled when the animation is only halfway through, it 'jumps' to the first or last frame. The animation is 120 frames, and I want the position in playback to be preserved when the button is toggled - so the animation reverses or continues forward from whatever frame the animation was currently on.
Any tips on implementation? Thanks!
import RealityKit
import RealityKitContent
struct ModelView: View {
var isPlaying: Bool
@State private var scene: Entity? = nil
@State private var unboxAnimationResource: AnimationResource? = nil
var body: some View {
RealityView { content in
// Specify the name of the Entity you want
scene = try? await Entity(named: "TestAsset", in: realityKitContentBundle)
scene!.generateCollisionShapes(recursive: true)
scene!.components.set(InputTargetComponent())
content.add(scene!)
} .installGestures()
.onChange(of: isPlaying) {
if (isPlaying){
var playerDefinition = scene!.availableAnimations[0].definition
playerDefinition.speed = 1
playerDefinition.repeatMode = .none
playerDefinition.trimDuration = 0
let playerAnimation = try! AnimationResource.generate(with: playerDefinition)
scene!.playAnimation(playerAnimation)
} else {
var playerDefinition = scene!.availableAnimations[0].definition
playerDefinition.speed = -1
playerDefinition.repeatMode = .none
playerDefinition.trimDuration = 0
let playerAnimation = try! AnimationResource.generate(with: playerDefinition)
scene!.playAnimation(playerAnimation)
}
}
}
}
Thanks!
Hi everyone,
I'm looking for a way to convert an FBX file to USDZ directly within my iOS app. I'm aware of Reality Converter and the Python USDZ converter tool, but I haven't been able to find any documentation on how to do this directly within the app (assuming the user can upload their own file). Any guidance on how to achieve this would be greatly appreciated.
I've heard about Model I/O and SceneKit, but I haven't found much information on using them for this purpose either.
Thanks!
I am creating a 3D model from multiple images using the photogrammetry session. Now, when the session generates an OBJ file and I measure the distance between two points, the distance is displayed sporadically in different units. Sometimes it's meters, then centimeters, or another unit altogether. How can I tell the photogrammetry session to always create the model in millimeters?
I have design a 3D object and exported it as a USDZ. I also 3D printed said object. I want to use the object as a 3D trigger for an AR experience I am building. My question is: is there a process that would let me take the 3D .usdz file and convert it to a .arobject or a .objcap medium/low density point cloud to use as an AR trigger. Because I do have the 3D print of the object I did use the "scan" option when setting up my scene but the "resolution"/fidelity seems really low, and the results I get are just mediocre.
I would love to take my 3D USDZ that I already have and use it to generate a file that can be used as a 3D trigger. is this possible, or is there a process to do this. I am able to take the 3D that I scan in Reality Composer (which is exported as a .objcap file), send it to reality converter on my Mac and make a USDZ from it. I am looking for a way to go the other way .USDZ > .objcap or .arobject.
I am trying to make a experience that mimic projection mapping but in AR. I have a 3D object I built and textured in substance painter. I also printed this object in a base gray color. I want to use the 3D print of the object as an AR trigger that would start a scene placing/overlaying/projection mapping the textured 3D model over the gray 3D printed model. Ideally the mapped 3D model would be spatial attached to the 3D print and move with it when the object is handled.
I have various USDZ files in my visionOS app. Loading the USDZ files works quite well. I only have problems with the positioning of the 3D model. For example, I have a USDZ file that is displayed directly above me. I can't move the model or perform any other actions on it. If I sit on a chair or stand up again, the 3D model automatically moves with me. This is my source code for loading the USDZ files:
struct ImmersiveView: View {
@State var modelName: String
@State private var loadedModel = Entity()
var body: some View {
RealityView { content in
if let usdModel = try? await Entity(named: modelName) {
print("====> \(modelName) : \(usdModel) <====")
let bounds = usdModel.visualBounds(relativeTo: nil).extents
usdModel.scale = SIMD3<Float>(1.0, 1.0, 1.0)
usdModel.position = SIMD3<Float>(0.0, 0.0, 0.0)
usdModel.components.set(CollisionComponent(shapes: [.generateBox(size: bounds)]))
usdModel.components.set(HoverEffectComponent())
usdModel.components.set(InputTargetComponent())
loadedModel = usdModel
content.add(usdModel)
}
}
}
}
I only want the 3D models from the USDZ files to be displayed later, and later on, to be able to move them via gestures. Moving the models is step 2. First, I need to make sure the models are displayed correctly. What have I forgotten or done wrong?
I have a plane with a texture that was made in Blender & then exported using the Reality Converter from a USDC to a USDZ.
The translucency looks 100% translucent in RCP but it looks a bit like glass with some reflection in a Reality Kit scene in visionOS.
Is there a material setting that I need to change?
This question is about USD animations playing correctly in macOS Preview but not with RealityKit on visionOS.
I have a USD file created with 3D Studio Max that contains mesh-based smoke animation:
https://drive.google.com/file/d/1L7Jophgvw0u0USSv-_0fPGuCuJtapmzo/view
(5.6 MB)
Apple's macOS 14.5 Preview app is able to play the animation correctly:
However, when a visionOS app uses RealityKit to load that same USD file in visionOS 2.0 beta 4, built with 16.0 beta 3 (16A5202i), and Entity/playAnimation is called, the animation does not play as expected:
This same app is able to successfully play animation of a hierarchy of solid objects read from a different USD file.
When I inspect the RealityKit entities loaded from the USD file, the ground plane entity is a ModelEntity, as expected, but the smoke entity type is Entity, with no associated geometry.
Why is it that macOS Preview can play the animation in the file, but RealityKit cannot?
Thank you for considering this question.
When I run my visionOS App, RealityKitContent Report an error:
Tool terminated by signal 'Segmentation fault: 11'
And it points to a USDZ model I imported, but in the scene, my model can be displayed normally and there is no damage. Why does an error occur? How can I check and repair it?
I noticed that with the 4th betas of iOS 18 and visionOS 2, some USDZ models' texture mapping looks completely broken. The issue occurs only with a device, not with the Simulator. It's a regression, the models look fine with iOS 17.5.1 and visionOS 1.2.
The issue occurs if I load a model as an Entity in a RealityView iOS or visionOS, or in a SwiftUI 3DModel view on visionOS.
Has anyone seen this too? Is there a workaround?
I filed a bug report with a minimal example project, it's FB14473756.
Screenshot on Vision Pro device:
Screenshot on Vision Pro Simulator: