Reality Composer Pro

RSS for tag

Prototype and produce content for AR experiences using Reality Composer Pro.

Learn More

Posts under Reality Composer Pro subtopic

Post

Replies

Boosts

Views

Activity

MeshInstancesComponent vs. manual merging
For Vision Pro's tiled GPU, how does MeshInstancesComponent compare to manually merging meshes for draw-call reduction? Does it collapse draw calls similarly while still allowing per-instance transform and material variation? Deciding whether to re-architect a heavy interior scene around it instead of hand-merging in Maya.
1
0
26
1d
RCP3 Tutorials
RCP 3 adds a lot of artist-facing surface: lightmaps, Animation Graph, Script Graph. Are step-by-step, artist-oriented tutorials planned beyond the API reference docs? A guided onboarding path would help 3D artists adopt these features much faster.
2
2
60
1d
Draw order between model sort groups
I’m familiar with using ModelSortGroupComponent to control draw order, but how does RealityKit determine the draw order between model sort groups? How can I enforce a specific draw order between two model sort groups that require different depth pass modes and therefore can't be combined into a single model sort group? Are there model bounding box tricks I can safely rely on?
1
0
76
1d
Camera/Player Start
On visionOS the user's viewpoint isn't directly movable, so we currently invert world movement to simulate locomotion — translating the scene root rather than the camera. With RCP 3 / RealityKit this year, is there a supported way to define or animate a starting viewpoint — a "player start" transform — for an immersive scene, or is world-relative transform still the only sanctioned approach?
2
1
41
1d
How can an in-ImmersiveSpace menu behave like a regular 2D window in visionOS?
I’m building a visionOS app with an ImmersiveSpace, and I want to show a menu or control panel inside that immersive space. The menu would be created as part of the app’s immersive content, for example as a SwiftUI attachment in a RealityView, or as a custom RealityKit entity with UI-like content. What I would like is for this in-space menu to behave more like a regular visionOS 2D window: The user can move the menu naturally. While the menu is being moved, it automatically adjusts its orientation to face the user. It maintains a comfortable apparent size or distance while being repositioned. It avoids awkward angles or unreadable placement. It feels similar to the system-managed behavior of regular 2D windows. My question is: is there a supported way to give an in-ImmersiveSpace menu the same placement and movement behavior as a normal 2D window? More specifically: Is there a built-in component or API that provides window-like movement, billboard-facing behavior, comfortable distance handling, or automatic scaling for custom panels inside an immersive space? If not, is the recommended approach to implement this behavior manually in RealityKit, for example by tracking the user’s head position and updating the panel’s transform? If manual implementation is required, are there recommended comfort guidelines for menu distance, scale, rotation limits, and movement behavior in immersive spaces? Alternatively, is the recommended design to use a regular 2D window or utility panel outside the immersive content, rather than trying to recreate window behavior inside the ImmersiveSpace?
1
0
54
1d
Interactive Surfaces
I have been building a visionOS app that converts anaglyphs and SBS to 3D experiences, and my current approach has been hamstrung by my dependency on a shader graph which separates imagery into right and left eye. It works very well, but ultimately is just a material. The way I have implemented this so far is with VNC to show a 3d Blender window and browser experiences. Ideally, I'd be able to have interactivity in both that didn't depend on an attached computer. Is there any way to accomplish that?
0
0
43
1d
RCP Assistant provenance
For the Reality Composer Pro Assistant that generates 3D objects and materials: what's the commercial-use and licensing status of generated assets in shipped apps, and what data underpins the model? Alternatively, am I able to upload an original image and use that for 3D generation?
0
4
23
1d
Creation of 3d Assets and Inclusion in RCP3 for use in Package called by visionOS App
Currently, I have a very basic entity in RCP that I call in my app's immersive view based on an included Package. I'm trying to get a much better 3d asset to use in my app instead. I've been afraid to put much effort into learning Blender to create and export an USDx asset for import into RCP3 (it's a whole world of learning itself...). I may be able to start using agents like Codex tied into Blender to see if I can more quickly create a 3d asset. I tried using the new AI assistant in RCP3 and it seems like I could create a 3d entity, but I'm not sure it will be the level of detail I want. Any high-level advice for the workflow (nowadays with AI agents) to create a desirable 3d asset, get it into RCP3, and then into Xcode?
0
0
45
1d
How to make an animation stop at the last frame after playing with xcode+RCP
This is my animation playback method, there are two issues. 1.How to make the animation stop until the last frame after playing once when isLoop=false? When I specify the name of an animClipName animation clip, I cannot play the corresponding animation name. How do I set it up? The animation structure is shown in the figure. PlayAnim(animEntityName: "Book",animClipName: "Open",isLoop: false) private func PlayAnim(animEntityName: String,animClipName: String? = nil,isLoop:Bool = true,transitionDuration: Double = 0.5){ guard let XR = XR else { return } guard let entity = XR.findEntity(named: animEntityName) else { return } let availableAnims = entity.availableAnimations let targetAnimResource: AnimationResource? if let clipName = animClipName { targetAnimResource = availableAnims.first(where: { $0.name == clipName }) } else { targetAnimResource = availableAnims.first } guard let animClip = targetAnimResource else { return } let anim = animClip.repeat(count: isLoop ? 0 : 1) entity.playAnimation(anim,transitionDuration: transitionDuration) }
0
0
187
1w
Xcode fails to compile Blender-exported USDZ in .rkassets with misleading "permission" error — Xcode 26.3
The error: When building a RealityKitContent package that contains a USDZ file exported from Blender, Xcode throws the following error: error: [xrsimulator] Exception thrown during compile: Cannot get rkassets content for path .../RealityKitContent.rkassets because 'The file "RealityKitContent.rkassets" couldn't be opened because you don't have permission to view it.' error: Tool exited with code 1 The error message mentions "permission" — but permissions are not the issue. This appears to be a misleading error from realitytool masking a USD validation failure. What I've ruled out File permissions — all files are -rw-r--r--, user has Read & Write on the folder Extended attributes / quarantine flag — other files with the same @ flag work fine Corrupted archive — unzip -t confirms the USDZ is valid (board.usdc + textures) Stale build cache — deleted DerivedData and com.apple.DeveloperTools cache, no change Key observations The same file builds successfully on my colleague's machine running identical Xcode 26.3 - MacOS 26.3 Other USDZ files in the same .rkassets bundle (downloaded from Sketchfab, or created in Reality Composer Pro) compile without any issue. Only USDZ files exported directly from Blender are affected. When the file is placed in Bundle.main and loaded via Entity(named:in:.main), it works perfectly — no errors Reality Converter flags the file with two errors: UsdGeomPointInstancers not allowed, and root layer must be .usdc with no external dependencies The confusing part: the same file compiles fine on an identical Xcode 26.3 setup and importing method. This suggests either a machine-specific difference in Xcode's validation behavior, or a cached .reality bundle on my colleague's machine that isn't being recompiled. Current workaround: Loading from Bundle.main instead of the RealityKitContent package bypasses realitytool entirely and works, but loses Reality Composer Pro integration: if let entity = try? await Entity(named: "test", in: Bundle.main)
1
0
1.6k
Mar ’26
Can video reflections in immersive space work with VideoMaterial, or is AVPlayerViewController with dockingRegion required?
Hi Apple Developer Forums, I'm developing a visionOS video streaming app that uses a custom immersive cinema experience with RealityKit. I have a question about enabling video reflections in an immersive environment. My Current Implementation I'm using VideoMaterial with AVPlayer to display video on a ModelEntity plane in an immersive space: // Create screen mesh let screenMesh = MeshResource.generatePlane( width: VideoTheater.screenWidth, height: VideoTheater.screenHeight, cornerRadius: 0.0 ) let screenEntity = ModelEntity(mesh: screenMesh) // Apply VideoMaterial with AVPlayer screenEntity.model?.materials = [VideoMaterial(avPlayer: player)] The video renders correctly in the immersive space, but I don't see any video reflections on surrounding surfaces. Apple's Documentation Approach According to the documentation at https://developer.apple.com/documentation/visionos/enabling-vid eo-reflections-in-an-immersive-environment, the recommended approach uses: AVPlayerViewController for video playback dockingRegion modifier to specify where the video should appear The system automatically handles reflections My Question Is using AVPlayerViewController with dockingRegion the only way to get video reflections in an immersive environment? Or is it possible to enable reflections when using VideoMaterial directly with RealityKit's ModelEntity? My app requires a custom immersive cinema experience with: Custom screen positioning and scaling Danmaku (bullet comments) overlay Custom gesture controls HDR/Dolby Vision support Switching to AVPlayerViewController would require significant architectural changes, so I'd prefer to keep my current VideoMaterial approach if reflections can be enabled somehow. If VideoMaterial cannot produce reflections, are there any alternative approaches to achieve diffuse video reflections with a custom RealityKit setup? Environment visionOS 2.x RealityKit AVPlayer with custom resource loader (for DASH streams) Thank you for any guidance!
0
0
710
Mar ’26
Attaching a hand model to your hands
Hi, we have been working on an application that attaches a hand model to the users hands. Apple provides an animating hand models in visionOS project that is a useful starting point. https://developer.apple.com/documentation/visionOS/animating-hand-models-in-visionOS We have been trying to create our own hand model to attach but have had some issues with how it is attaching to the hand. For our hand model we want to include the forearm all the way up to the users elbow. I have attached a sample project of what our code currently looks like so you can run it. Just select show immersive space to attach the models. The left hand model is the space glove that we were trying to mirror. The right hand model is our model that we have been using. I have mapped each of the joints to the pertaining joint name on our model. The first issue we are having seems to be based around the placement of the forearm. It attaches itself at the wrist. The second issue seems to be around rotation. Our team is looking for some guidance on what needs to change in order to map this model correctly. Thanks in advance!
2
0
527
Feb ’26
Unexpected behavior when writing entities and loading realityFiles.
I have a simple visionOS app that creates an Entity, writes it to the device, and then attempts to load it. However, when the entity file get overwritten, it affects the ability for the app to load it correctly. Here is my code for saving the entity. import SwiftUI import RealityKit import UniformTypeIdentifiers struct ContentView: View { var body: some View { VStack { ToggleImmersiveSpaceButton() Button("Save Entity") { Task { // if let entity = await buildEntityHierarchy(from: urdfPath) { let type = UTType.realityFile let filename = "testing.\(type.preferredFilenameExtension ?? "bin")" let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] let fileURL = documentsURL.appendingPathComponent(filename) do { let mesh = MeshResource.generateBox(size: 1, cornerRadius: 0.05) let material = SimpleMaterial(color: .blue, isMetallic: true) let modelComponent = ModelComponent(mesh: mesh, materials: [material]) let entity = Entity() entity.components.set(modelComponent) print("Writing \(fileURL)") try await entity.write(to: fileURL) } catch { print("Failed writing") } } } } .padding() } } Every time I press "Save Entity", I see a warning similar to: Writing file:///var/mobile/Containers/Data/Application/1140E7D6-D365-48A4-8BED-17BEA34E3F1E/Documents/testing.reality Failed to set dependencies on asset 1941054755064863441 because NetworkAssetManager does not have an asset entity for that id. When I open the immersive space, I attempt to load the same file: import SwiftUI import RealityKit import UniformTypeIdentifiers struct ImmersiveView: View { @Environment(AppModel.self) private var appModel var body: some View { RealityView { content in guard let type = UTType.realityFile.preferredFilenameExtension else { return } let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] let fileURL = documentsURL.appendingPathComponent("testing.\(type)") guard FileManager.default.fileExists(atPath: fileURL.path) else { print("❌ File does not exist at path: \(fileURL.path)") return } if let entity = try? await Entity(contentsOf: fileURL) { content.add(entity) } } } } I also get errors after I overwrite the entity (by pressing "Save Entity" after I have successfully loaded it once). The warnings that appear when the Immersive space attempts to load the new entity are: Asset 13277375032756336327 Mesh (RealityFileAsset)URL/file:///var/mobile/Containers/Data/Application/1140E7D6-D365-48A4-8BED-17BEA34E3F1E/Documents/testing.reality/Mesh_0.compiledmesh failure: Asset provider load failed: type 'RealityFileAsset' -- RERealityArchive: Failed to open load stream for entry 'assets/Mesh_0.compiledmesh'. Asset 8308977590385781534 Scene (RealityFileAsset)URL/file:///var/mobile/Containers/Data/Application/1140E7D6-D365-48A4-8BED-17BEA34E3F1E/Documents/testing.reality/Scene_0.compiledscene failure: Asset provider load failed: type 'RealityFileAsset' -- RERealityArchive: Failed to read archive entry. AssetLoadRequest failed because asset failed to load '13277375032756336327 Mesh (RealityFileAsset)URL/file:///var/mobile/Containers/Data/Application/1140E7D6-D365-48A4-8BED-17BEA34E3F1E/Documents/testing.reality/Mesh_0.compiledmesh' (Asset provider load failed: type 'RealityFileAsset' -- RERealityArchive: Failed to open load stream for entry 'assets/Mesh_0.compiledmesh'.) The order of operations to make this happen: Launch app Press "Save Entity" to save the entity "Open Immersive Space" to view entity Press "Save Entity" to overwrite the entity "Open Immersive Space" to view entity, failed asset load request Also Launch app, the entity should still be save from last time the app ran "Open Immersive Space" to view entity Press "Save Entity" to overwrite the entity "Open Immersive Space" to view entity, failed asset load request NOTE: It appears I can get it to work slightly better by pressing the "Save Entity" button twice before attempting to view it again in the immersive space.
2
3
572
Feb ’26
MeshInstancesComponent vs. manual merging
For Vision Pro's tiled GPU, how does MeshInstancesComponent compare to manually merging meshes for draw-call reduction? Does it collapse draw calls similarly while still allowing per-instance transform and material variation? Deciding whether to re-architect a heavy interior scene around it instead of hand-merging in Maya.
Replies
1
Boosts
0
Views
26
Activity
1d
Real Animation Graph with Curves and Keyframes
RCP 3's Animation Graph covers state machines and blending of imported clips. As an animator, is there now any in-editor support for authoring or editing animation curves and keyframes directly — a graph editor or dope sheet — or must all keyframe animation still be authored in a DCC (Maya/Blender) and imported as clips?
Replies
1
Boosts
1
Views
39
Activity
1d
RCP3 Tutorials
RCP 3 adds a lot of artist-facing surface: lightmaps, Animation Graph, Script Graph. Are step-by-step, artist-oriented tutorials planned beyond the API reference docs? A guided onboarding path would help 3D artists adopt these features much faster.
Replies
2
Boosts
2
Views
60
Activity
1d
Work with Reality Composer Pro content in Xcode
May I ask if there is a complete source code project for this instructional video that needs to be learned. Work with Reality Composer Pro content in Xcode
Replies
3
Boosts
0
Views
409
Activity
1d
Draw order between model sort groups
I’m familiar with using ModelSortGroupComponent to control draw order, but how does RealityKit determine the draw order between model sort groups? How can I enforce a specific draw order between two model sort groups that require different depth pass modes and therefore can't be combined into a single model sort group? Are there model bounding box tricks I can safely rely on?
Replies
1
Boosts
0
Views
76
Activity
1d
How can I export from RCP3beta for use with AR Quick Look?
There is no "export" for a scene or project like in RCP2. I tried to select root|world but none of the 3 file formats export components, therefore no interaction is possible. It works inside RCP3 with PLAY. I tried the exported .reality asset in macOS27 and on iPadOS27. No interactions.
Replies
2
Boosts
1
Views
28
Activity
1d
Camera/Player Start
On visionOS the user's viewpoint isn't directly movable, so we currently invert world movement to simulate locomotion — translating the scene root rather than the camera. With RCP 3 / RealityKit this year, is there a supported way to define or animate a starting viewpoint — a "player start" transform — for an immersive scene, or is world-relative transform still the only sanctioned approach?
Replies
2
Boosts
1
Views
41
Activity
1d
How can an in-ImmersiveSpace menu behave like a regular 2D window in visionOS?
I’m building a visionOS app with an ImmersiveSpace, and I want to show a menu or control panel inside that immersive space. The menu would be created as part of the app’s immersive content, for example as a SwiftUI attachment in a RealityView, or as a custom RealityKit entity with UI-like content. What I would like is for this in-space menu to behave more like a regular visionOS 2D window: The user can move the menu naturally. While the menu is being moved, it automatically adjusts its orientation to face the user. It maintains a comfortable apparent size or distance while being repositioned. It avoids awkward angles or unreadable placement. It feels similar to the system-managed behavior of regular 2D windows. My question is: is there a supported way to give an in-ImmersiveSpace menu the same placement and movement behavior as a normal 2D window? More specifically: Is there a built-in component or API that provides window-like movement, billboard-facing behavior, comfortable distance handling, or automatic scaling for custom panels inside an immersive space? If not, is the recommended approach to implement this behavior manually in RealityKit, for example by tracking the user’s head position and updating the panel’s transform? If manual implementation is required, are there recommended comfort guidelines for menu distance, scale, rotation limits, and movement behavior in immersive spaces? Alternatively, is the recommended design to use a regular 2D window or utility panel outside the immersive content, rather than trying to recreate window behavior inside the ImmersiveSpace?
Replies
1
Boosts
0
Views
54
Activity
1d
DCC round-trip preserving authored data
When I iterate geometry in Maya/Blender after assigning components, prototype overrides, and lightmaps in RCP 3, does re-importing the updated USD preserve those bindings, or do they need reauthoring on each import? What's the recommended round-trip for art that's still changing?
Replies
2
Boosts
2
Views
42
Activity
1d
Spatial scenes API on iOS
Does iOS 27 support the spatial scenes API (ImagePresentationComponent) so apps like our Art Authority Museum can let users “lean into” scenes? (Feedback FB21882981 submitted last year)
Replies
1
Boosts
0
Views
36
Activity
1d
Interactive Surfaces
I have been building a visionOS app that converts anaglyphs and SBS to 3D experiences, and my current approach has been hamstrung by my dependency on a shader graph which separates imagery into right and left eye. It works very well, but ultimately is just a material. The way I have implemented this so far is with VNC to show a 3d Blender window and browser experiences. Ideally, I'd be able to have interactivity in both that didn't depend on an attached computer. Is there any way to accomplish that?
Replies
0
Boosts
0
Views
43
Activity
1d
RCP Assistant provenance
For the Reality Composer Pro Assistant that generates 3D objects and materials: what's the commercial-use and licensing status of generated assets in shipped apps, and what data underpins the model? Alternatively, am I able to upload an original image and use that for 3D generation?
Replies
0
Boosts
4
Views
23
Activity
1d
Creation of 3d Assets and Inclusion in RCP3 for use in Package called by visionOS App
Currently, I have a very basic entity in RCP that I call in my app's immersive view based on an included Package. I'm trying to get a much better 3d asset to use in my app instead. I've been afraid to put much effort into learning Blender to create and export an USDx asset for import into RCP3 (it's a whole world of learning itself...). I may be able to start using agents like Codex tied into Blender to see if I can more quickly create a 3d asset. I tried using the new AI assistant in RCP3 and it seems like I could create a 3d entity, but I'm not sure it will be the level of detail I want. Any high-level advice for the workflow (nowadays with AI agents) to create a desirable 3d asset, get it into RCP3, and then into Xcode?
Replies
0
Boosts
0
Views
45
Activity
1d
How to trigger hover events in UI in RealityView 3D space
attachments: { Attachment(id: "UI_Book_01") { Button { print("Tap...") } label: { Text("Tap me") .padding() .background(.ultraThinMaterial) }.hoverEffect { effect, isActive, _ in if isActive { print("hover...") //Unable to trigger } return effect } } }
Replies
2
Boosts
0
Views
1.6k
Activity
1w
How to make an animation stop at the last frame after playing with xcode+RCP
This is my animation playback method, there are two issues. 1.How to make the animation stop until the last frame after playing once when isLoop=false? When I specify the name of an animClipName animation clip, I cannot play the corresponding animation name. How do I set it up? The animation structure is shown in the figure. PlayAnim(animEntityName: "Book",animClipName: "Open",isLoop: false) private func PlayAnim(animEntityName: String,animClipName: String? = nil,isLoop:Bool = true,transitionDuration: Double = 0.5){ guard let XR = XR else { return } guard let entity = XR.findEntity(named: animEntityName) else { return } let availableAnims = entity.availableAnimations let targetAnimResource: AnimationResource? if let clipName = animClipName { targetAnimResource = availableAnims.first(where: { $0.name == clipName }) } else { targetAnimResource = availableAnims.first } guard let animClip = targetAnimResource else { return } let anim = animClip.repeat(count: isLoop ? 0 : 1) entity.playAnimation(anim,transitionDuration: transitionDuration) }
Replies
0
Boosts
0
Views
187
Activity
1w
Object Capture feature in visionOS
The object capture feature in Reality Composer App is only available in iOS and iPadOS at the moment, would this feature be available for visionOS in near future? Reality Composer App Store https://apps.apple.com/us/app/reality-composer/id1462358802
Replies
2
Boosts
0
Views
1.7k
Activity
May ’26
Xcode fails to compile Blender-exported USDZ in .rkassets with misleading "permission" error — Xcode 26.3
The error: When building a RealityKitContent package that contains a USDZ file exported from Blender, Xcode throws the following error: error: [xrsimulator] Exception thrown during compile: Cannot get rkassets content for path .../RealityKitContent.rkassets because 'The file "RealityKitContent.rkassets" couldn't be opened because you don't have permission to view it.' error: Tool exited with code 1 The error message mentions "permission" — but permissions are not the issue. This appears to be a misleading error from realitytool masking a USD validation failure. What I've ruled out File permissions — all files are -rw-r--r--, user has Read & Write on the folder Extended attributes / quarantine flag — other files with the same @ flag work fine Corrupted archive — unzip -t confirms the USDZ is valid (board.usdc + textures) Stale build cache — deleted DerivedData and com.apple.DeveloperTools cache, no change Key observations The same file builds successfully on my colleague's machine running identical Xcode 26.3 - MacOS 26.3 Other USDZ files in the same .rkassets bundle (downloaded from Sketchfab, or created in Reality Composer Pro) compile without any issue. Only USDZ files exported directly from Blender are affected. When the file is placed in Bundle.main and loaded via Entity(named:in:.main), it works perfectly — no errors Reality Converter flags the file with two errors: UsdGeomPointInstancers not allowed, and root layer must be .usdc with no external dependencies The confusing part: the same file compiles fine on an identical Xcode 26.3 setup and importing method. This suggests either a machine-specific difference in Xcode's validation behavior, or a cached .reality bundle on my colleague's machine that isn't being recompiled. Current workaround: Loading from Bundle.main instead of the RealityKitContent package bypasses realitytool entirely and works, but loses Reality Composer Pro integration: if let entity = try? await Entity(named: "test", in: Bundle.main)
Replies
1
Boosts
0
Views
1.6k
Activity
Mar ’26
Can video reflections in immersive space work with VideoMaterial, or is AVPlayerViewController with dockingRegion required?
Hi Apple Developer Forums, I'm developing a visionOS video streaming app that uses a custom immersive cinema experience with RealityKit. I have a question about enabling video reflections in an immersive environment. My Current Implementation I'm using VideoMaterial with AVPlayer to display video on a ModelEntity plane in an immersive space: // Create screen mesh let screenMesh = MeshResource.generatePlane( width: VideoTheater.screenWidth, height: VideoTheater.screenHeight, cornerRadius: 0.0 ) let screenEntity = ModelEntity(mesh: screenMesh) // Apply VideoMaterial with AVPlayer screenEntity.model?.materials = [VideoMaterial(avPlayer: player)] The video renders correctly in the immersive space, but I don't see any video reflections on surrounding surfaces. Apple's Documentation Approach According to the documentation at https://developer.apple.com/documentation/visionos/enabling-vid eo-reflections-in-an-immersive-environment, the recommended approach uses: AVPlayerViewController for video playback dockingRegion modifier to specify where the video should appear The system automatically handles reflections My Question Is using AVPlayerViewController with dockingRegion the only way to get video reflections in an immersive environment? Or is it possible to enable reflections when using VideoMaterial directly with RealityKit's ModelEntity? My app requires a custom immersive cinema experience with: Custom screen positioning and scaling Danmaku (bullet comments) overlay Custom gesture controls HDR/Dolby Vision support Switching to AVPlayerViewController would require significant architectural changes, so I'd prefer to keep my current VideoMaterial approach if reflections can be enabled somehow. If VideoMaterial cannot produce reflections, are there any alternative approaches to achieve diffuse video reflections with a custom RealityKit setup? Environment visionOS 2.x RealityKit AVPlayer with custom resource loader (for DASH streams) Thank you for any guidance!
Replies
0
Boosts
0
Views
710
Activity
Mar ’26
Attaching a hand model to your hands
Hi, we have been working on an application that attaches a hand model to the users hands. Apple provides an animating hand models in visionOS project that is a useful starting point. https://developer.apple.com/documentation/visionOS/animating-hand-models-in-visionOS We have been trying to create our own hand model to attach but have had some issues with how it is attaching to the hand. For our hand model we want to include the forearm all the way up to the users elbow. I have attached a sample project of what our code currently looks like so you can run it. Just select show immersive space to attach the models. The left hand model is the space glove that we were trying to mirror. The right hand model is our model that we have been using. I have mapped each of the joints to the pertaining joint name on our model. The first issue we are having seems to be based around the placement of the forearm. It attaches itself at the wrist. The second issue seems to be around rotation. Our team is looking for some guidance on what needs to change in order to map this model correctly. Thanks in advance!
Replies
2
Boosts
0
Views
527
Activity
Feb ’26
Unexpected behavior when writing entities and loading realityFiles.
I have a simple visionOS app that creates an Entity, writes it to the device, and then attempts to load it. However, when the entity file get overwritten, it affects the ability for the app to load it correctly. Here is my code for saving the entity. import SwiftUI import RealityKit import UniformTypeIdentifiers struct ContentView: View { var body: some View { VStack { ToggleImmersiveSpaceButton() Button("Save Entity") { Task { // if let entity = await buildEntityHierarchy(from: urdfPath) { let type = UTType.realityFile let filename = "testing.\(type.preferredFilenameExtension ?? "bin")" let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] let fileURL = documentsURL.appendingPathComponent(filename) do { let mesh = MeshResource.generateBox(size: 1, cornerRadius: 0.05) let material = SimpleMaterial(color: .blue, isMetallic: true) let modelComponent = ModelComponent(mesh: mesh, materials: [material]) let entity = Entity() entity.components.set(modelComponent) print("Writing \(fileURL)") try await entity.write(to: fileURL) } catch { print("Failed writing") } } } } .padding() } } Every time I press "Save Entity", I see a warning similar to: Writing file:///var/mobile/Containers/Data/Application/1140E7D6-D365-48A4-8BED-17BEA34E3F1E/Documents/testing.reality Failed to set dependencies on asset 1941054755064863441 because NetworkAssetManager does not have an asset entity for that id. When I open the immersive space, I attempt to load the same file: import SwiftUI import RealityKit import UniformTypeIdentifiers struct ImmersiveView: View { @Environment(AppModel.self) private var appModel var body: some View { RealityView { content in guard let type = UTType.realityFile.preferredFilenameExtension else { return } let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] let fileURL = documentsURL.appendingPathComponent("testing.\(type)") guard FileManager.default.fileExists(atPath: fileURL.path) else { print("❌ File does not exist at path: \(fileURL.path)") return } if let entity = try? await Entity(contentsOf: fileURL) { content.add(entity) } } } } I also get errors after I overwrite the entity (by pressing "Save Entity" after I have successfully loaded it once). The warnings that appear when the Immersive space attempts to load the new entity are: Asset 13277375032756336327 Mesh (RealityFileAsset)URL/file:///var/mobile/Containers/Data/Application/1140E7D6-D365-48A4-8BED-17BEA34E3F1E/Documents/testing.reality/Mesh_0.compiledmesh failure: Asset provider load failed: type 'RealityFileAsset' -- RERealityArchive: Failed to open load stream for entry 'assets/Mesh_0.compiledmesh'. Asset 8308977590385781534 Scene (RealityFileAsset)URL/file:///var/mobile/Containers/Data/Application/1140E7D6-D365-48A4-8BED-17BEA34E3F1E/Documents/testing.reality/Scene_0.compiledscene failure: Asset provider load failed: type 'RealityFileAsset' -- RERealityArchive: Failed to read archive entry. AssetLoadRequest failed because asset failed to load '13277375032756336327 Mesh (RealityFileAsset)URL/file:///var/mobile/Containers/Data/Application/1140E7D6-D365-48A4-8BED-17BEA34E3F1E/Documents/testing.reality/Mesh_0.compiledmesh' (Asset provider load failed: type 'RealityFileAsset' -- RERealityArchive: Failed to open load stream for entry 'assets/Mesh_0.compiledmesh'.) The order of operations to make this happen: Launch app Press "Save Entity" to save the entity "Open Immersive Space" to view entity Press "Save Entity" to overwrite the entity "Open Immersive Space" to view entity, failed asset load request Also Launch app, the entity should still be save from last time the app ran "Open Immersive Space" to view entity Press "Save Entity" to overwrite the entity "Open Immersive Space" to view entity, failed asset load request NOTE: It appears I can get it to work slightly better by pressing the "Save Entity" button twice before attempting to view it again in the immersive space.
Replies
2
Boosts
3
Views
572
Activity
Feb ’26