Reality Composer Pro

RSS for tag

Leverage the all new Reality Composer Pro, designed to make it easy to preview and prepare 3D content for your visionOS apps

Posts under Reality Composer Pro tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

CrossPost w/ AOUSD forum: Autoplay stage metadata not being acknowledged RealityView (RCP Bundle)
The Apple documentation seems to say RealityKit should obey the autoplay metadata, but it doesn't seem to work. Is the problem with my (hand coded) USDA files, the Swift, or something else? Thanks in advance. I can make the animations run with an explicit call to run, but what have I done wrong to get the one cube to autoplay? https://github.com/carlynorama/ExploreVisionPro_AnimationTests import SwiftUI import RealityKit import RealityKitContent struct ContentView: View { @State var enlarge = false var body: some View { VStack { //A ModelEntity, not expected to autoplay Model3D(named: "cube_purple_autoplay", bundle: realityKitContentBundle) //An Entity, actually expected this to autoplay RealityView { content in if let cube = try? await Entity(named: "cube_purple_autoplay", in: realityKitContentBundle) { print(cube.components) content.add(cube) } } //Scene has one cube that should auto play, one that should not. //Neither do, but both will start (as expected) with click. RealityView { content in // Add the initial RealityKit content if let scene = try? await Entity(named: "Scene", in: realityKitContentBundle) { content.add(scene) } } update: { content in // Update the RealityKit content when SwiftUI state changes if let scene = content.entities.first { if enlarge { for animation in scene.availableAnimations { scene.playAnimation(animation.repeat()) } } else { scene.stopAllAnimations() } let uniformScale: Float = enlarge ? 1.4 : 1.0 scene.transform.scale = [uniformScale, uniformScale, uniformScale] } } .gesture(TapGesture().targetedToAnyEntity().onEnded { _ in enlarge.toggle() }) VStack { Toggle("Enlarge RealityView Content", isOn: $enlarge) .toggleStyle(.button) }.padding().glassBackgroundEffect() } } } No autospin meta data #usda 1.0 ( defaultPrim = "transformAnimation" endTimeCode = 89 startTimeCode = 0 timeCodesPerSecond = 24 upAxis = "Y" ) def Xform "transformAnimation" () { def Scope "Geom" { def Xform "xform1" { float xformOp:rotateY.timeSamples = { ... } double3 xformOp:translate = (0, 0, 0) uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateY"] over "cube_1" ( prepend references = @./cube_base_with_purple_linked.usd@ ) { double3 xformOp:translate = (0, 0, 0) uniform token[] xformOpOrder = ["xformOp:translate"] } } With autoplay metadata #usda 1.0 ( defaultPrim = "autoAnimation" endTimeCode = 89 startTimeCode = 0 timeCodesPerSecond = 24 autoPlay = true playbackMode = "loop" upAxis = "Y" ) def Xform "autoAnimation" { def Scope "Geom" { def Xform "xform1" { float xformOp:rotateY.timeSamples = { ... } double3 xformOp:translate = (0, 0, 0) uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateY"] over "cube_1" ( prepend references = @./cube_base_with_purple_linked.usd@ ) { quatf xformOp:orient = (1, 0, 0, 0) float3 xformOp:scale = (2, 2, 2) double3 xformOp:translate = (0, 0, 0) uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] } } } }
0
0
381
Oct ’23
Convert Blender to .usdz
I have a blender project, for simplicity a black hole. The way that it is modeled is a sphere on top of a round plane, and then a bunch of effects on that. I have tried multiple ways: convert to USD from the file menu convert to obj and then import But all of them have resulted in just the body, not any effects. Does anybody know how to do this properly? I seem to have no clue except for going through the Reality Converter Pro (which I planned on going through already - but modeling it there)
0
1
442
Oct ’23
Exporting .reality files from Reality Composer Pro
I've been using the MacOS XCode Reality Composer to export interactive .reality files that can be hosted on the web and linked to, triggering QuickLook to open the interactive AR experience. That works really well. I've just downloaded XCode 15 Beta which ships with the new Reality Composer Pro and I can't see a way to export to .reality files anymore. It seems that this is only for building apps that ship as native iOS etc apps, rather than that can be viewed in QuickLook. Am I missing something, or is it no longer possible to export .reality files? Thanks.
2
1
1.1k
Oct ’23
Reality Composer Pro: Triggering Animations and changing scenes from an onClick Event
Hello, Currently working on a project that was finished in Reality Composer but then we noticed the pink material after changing scenes on iOS 17 devices. So did some updating to Mac OS 14 and X Code 15 beta to use Reality Composer Pro and currently stuck on how to setup the animations and onClick triggers to be able play animation from the USDZ model in the scene. Once the animation is finished, it will trigger the next scene. This was done through behaviors in Reality Composer and it was simple drag and drop. But now it seem we need to do it by components which i don't mind just don't see much resources on how to set this up properly. Is there are way to do behaviors like in Reality Composer? Extra: If there is a way to use alpha pngs or be able to drag PNG's into the scene like in Reality Composer?
1
1
629
Oct ’23
Playing Animation using visionOS - Reality Composer Pro - USDZ
I have a usdz model with animation that I can preview in RCP. When I create a new base/example visionOS project in Xcode it's set up to load in the 'Scene" and "Immersive" reality kit content. But my models don't play the animation. How do I fire off the contained animations in those files? Is there a code snippet that someone can share that takes into account how the example project is setup?
1
2
1.1k
Oct ’23
How to place a 3D model in front of you in the Full Space app.
Hi, I am currently developing a Full Space App. I have a question about how to implement the display of Entity or Model Entity in front of the user. I want to move the Entity or Model Entity to the user's front, not only at the initial display, but also when the user takes an action such as tapping. (Animation is not required.) I want to perform the initial placement process to the user's front when the reset button is tapped. Thanks. Sadao Tokuyama https://twitter.com/tokufxug https://www.linkedin.com/in/sadao-tokuyama/ https://1planet.co.jp/tech-blog/category/applevisionpro
1
0
424
Oct ’23
Reality View toggle Entities activation
I'm trying to create a feature in my app vision OS app where i show a reality view and on button click toggle different entities as in showing them on button click and vice versa. Is this possible in Vision os? if so how can i do this ? All that I did now was to instanciate my scene which contains a car 3d model, red tyres and blue tyres. On a button click i'm trying to show the blue tyres instead of the red ones. Is this possible ? Thank you,
1
0
577
Sep ’23
Diorama Demo Issues -
I'm trying to run this demo, which opened a month ago, but now returns 2 issues in xCode: https://developer.apple.com/documentation/visionos/diorama My goal is to better understand how to use Reality Composer Pro to develop visionOS apps for the Vision Pro. BillboardSystem.swift:39:58 Value of type 'WorldTrackingProvider' has no member 'queryDeviceAnchor' Cannot find 'Attachment' in scope. Preview paused shows. Any thoughts on where I'm off? Thanks!
2
0
504
Sep ’23
Failed to preview iOS app due to RealityKitContent.rkassets (should be linked only on visionOS)
Hello! My app supports iOS and visionOS in a single target. But when I preview the app on iOS device/simulator, an error occurred: The RealityKitContent.rkassets is located in my RealityKitContent package that is linked on visionOS. It seems that Xcode Preview is ignoring the link settings and attempt to build RealityKitContent.rkassets on iOS. Reproduce Steps: Clone my demo project at https://github.com/gongzhang/rkassets-preview-issue-demo Build the app for iOS (success) Preview ContentView.swift (failed due to RealityKitContent.rkassets issue)
3
0
758
Sep ’23
How to impose an Impulse
Hi. Given an RC entity var physicsBody = tappedObject.entity.components[PhysicsBodyComponent.self]! as PhysicsBodyComponent how does one call func applyImpulse(_ impulse: SIMD3, at position: SIMD3, relativeTo referenceEntity: Entity?) to impose an impulse on the object? Or the real question is how does one obtain a physiceBody on the Model.Entity? Thanks!
6
0
873
Sep ’23
where to apply "grounding shadow" in Reality Composer Pro?
So there's a "grounding shadow" component we can add to any entity in Reality Composer Pro. In case my use case is Apple Vision Pro + Reality Kit: I'm wondering, by default I think I'd want to add this to any entity that's a ModelEntity in my scene... right? Should we just add this component once to the root transform? Or should we add it to any entity individually if it's a model entity? Or should we not add this at all? Will RealityKit do it for us? Or does it also depend if we use a volume or a full space?
2
0
715
Sep ’23