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

RealityKit and Reality Composer Pro: Custom Shader Material
Hello! I have a few questions about using RealityKit on iPadOS and Mac Catalyst. I currently have a model in Cinema 4D that has no materials added to it. I need to add a couple of simple materials to everything. My goal is to move my model from Cinema 4D to my RealityKit app. The model can load fine in the app. However, I'm having issues with the materials. First, when I export from Cinema 4D as a USD, the materials don't seem to come with it. I thought materials came with the model. I just get a pink striped model (no materials), which is not ideal. So, that crossed out making materials in Cinema 4D for me. Here's a test model with materials added: Here's what it looks like when exported as a USDA in Reality Composer Pro. It looks the same when exported as a USDZ: I checked materials when exporting from Cinema 4D, so I don't know what I am doing wrong. So, I thought of another idea instead of making materials in Cinema 4D. What if I used Apple's new Reality Composer Pro app to add materials to my model? You can add physically based materials or even custom shader materials with nodes. I thought that would work, and it does. When I export the model as a USDZ with physically based materials, they appear fine and work in my app. However, what about custom shader materials? Whenever I play with a custom shader material and apply it to my model, I am left with problems. Look at this image. This is my model in Reality Composer Pro with two types of materials added from the app. The water and sand on the beach are created with physically based materials in the app. No nodes. The gold/metal ball is created with a custom shader material with nodes. Looks fine, right? When I drag an exported USDZ of this into my Xcode project, it even looks good in the Xcode preview of the file under Resources. (Note I am not adding the USDZ as an . rkassets as Apple suggests as .rkassets folders are only available for visionOS. This is an iPadOS + Catalyst app.) However, when I run the actual app, only the physically based materials actually display correctly: Besides the lighting in the scene, the physically based materials look good. However, the metal ball that used a custom shader material? It looks gray. Why? How can I fix this? I guarantee this is not a problem with my app or its lighting setup etc. I tried loading a custom shader material in a visionOS simulator and it worked! But, not for this. I know Reality Composer Pro seems to be very focused on visionOS right now, but this is still just a USDZ file. Why aren't these custom shaders working? I've been working on this problem for at least 24+ hours, so I've tried as much as I could imagine. I thought Reality Composer Pro would be good to do textures in as it would be less error prone when moving the model over to Xcode, compared to moving materials from Cinema 4D to Xcode, and I kind of proved that with my second photo. For RealityKit on iPadOS + Catalyst, how should I be applying materials? What am I doing wrong? P.S. Yes, this is a nonAR project with a virtual camera, which is possible for RealityKit. Thanks for the help! :)
0
1
846
Jan ’24
Reality Composer Pro - high cpu usage (even when hidden)
Activity monitor reports that Reality Composer Pro uses 150% CPU and always is the number one energy user on my M3 mac. Unfortunately the high cpu usage continues when the app is hidden or minimized. I can understand the high usage when a scene is visible and when interacting with the scene, but this appears to be a bug. Can anyone else confirm this or have a workaround? Can the scene processing at least be paused when app is hidden? Or better yet, find out why the cpu usage is so high when the scene is not changing. Reality Composer Pro Version 1.0 (409.60.6) on Sonoma 14.3 Thanks
1
1
418
Jan ’24
Strange issues with VisionOS template
Hello, I'm getting some strange behavior as I keep working with AVP on Xcode. First the basic template used to be normal, and when I previewed contentView it would display the basic sphere (using volume preset) right in the center of the screen. Now, when I create any basic template, the preview window is way elevated upwards to where its basically going thru the ceiling in the room. For the life of me I cannot get Xcode to correct this behavior. Also, while I can create a scene with assets in RealityKit, and try to view it in my content bundle following this Apple tutorial https://developer.apple.com/videos/play/wwdc2023/10203/ I cannot get my new scene to show in an immersive view file. I made sure to use the swiftUI template for the immersive view and I had the correct setup for it. My naming conventions are correct and there are no typos or errors (that I know of). I CAN get the basic template scene to show up, but not my custom scene with a pancake model in it. I've gone thru the video several times, but that still doesn't solve the above issue of the initial template previewing way to high. Does anyone have any advice on fixes for this subject? Edit : I may have located the issue to importing assets and using them in a new scene in realityComposerPro. Still not sure why it breaks after creating a scene in RCP. I haven't even used them in y project yet. (Started a new one) --> If I reset the project it removes the errors. But I still can't see my pancake, even if I just replace the template scene with a basic scene with just the asset in it. Much like the sphere but pancake instead. Also the initial scene may be high because using the volume template the view starts at the users feet. That might be why
0
1
340
Jan ’24
VisionOS Destination question
I've been pouring over the code for Apple's visionOS demo: "Destination" trying to figure out something about its skybox. (not really a box, there, Apple). The skybox contains a 360deg panorama, but only one half shows with the other half fades out to nothing. I cannot find anywhere there is an alpha channel being set, a lighting or material effect causing that. But "alpha" doesn't show up and the only gradients are use to make controls standout a little more in its window. I need a full panorama that shows., no fading.
1
0
498
Jan ’24
Is this type of offset even possible with Vision OS?
Hey, I'm working on a UI that a designer created. But he added an object behind the glass, with an offset, pretty much like the cloud in this video: https://dribbble.com/shots/23039991-Weather-Widget-Apple-Vision-Pro-visionOS I tried a couple of methods, but I always ended up clipping my object. So, here's the question: Is there a way to have some object behind the glass panel, but with a slight offset on the x and y?
1
0
393
Jan ’24
Metal Shading Language vs Reality Composer Pro Shader Graph vs Unity Shader Graph vs MaterialX Shader
I have a relatively complex shader in the metal shader language. Now I want to use this shader in visionOS. As I understand the straight forward approach would be to recreate the shader in the Reality Composer Pro (RCP) Shader Graph, however I do not think this is possible in my case. (Because I have an array of input variables and a while loop). Am I correct, that not all shaders from the Metal Shading language can be converted into a RCP Shader Graph? In the WWDC video about "Create immersive Unity apps" I saw that the Shader Graph from Unity is converted into MaterialX and then into a Shader Graph Material. On the Unity documentation I found that not all Unity Shader Nodes are supported, but not if this means the Unity Shader Graph does not provide any more functionality. So is the Unity Shader Graph limited by the functionalities the Shader Graph in RCP provides? If it is not, is it possible to take advantage of that without using Unity and using a MaterialX shader directly in some way (for example with the MaterialX Graph Editor)?
2
1
456
Feb ’24
How to apply a different texture to the Rear face of the material in Reality Composer Pro?
I would like to apply different textures to the front and back faces of a 3D material. Specifically, when applying a texture that cuts the object in half through opacity, I want to be able to observe the back face of the object and apply a different color to it compared to the front face. In Unity, there is a 'isFrontFace' boolean node that allows for applying different colours to the front and rear faces. However, I am unsure of how to achieve the same effect in Reality Composer Pro! 3D Model is already two-sided.
1
0
798
Jan ’24
Is it possible to create a compass in VisionOS?
I am attempting to create a simple compass for Apple Vision Pro. The method I am familiar with involves using: locationManager.startUpdatingHeading() locationManager(_ manager: CLLocationManager, didUpdateHeading newHeading: CLHeading) However, this does not function on visionOS as 'CLHeading is unavailable in visionOS'. Is there any way to develop this simple compass on visionOS?
1
0
421
Jan ’24
Animated USD file | Starting position of the USD is not the same as first frame of animation
Hello all, I am building for visionOS with another engineer and using Reality Composer Pro to validate usd files. The starting position of my animated usdz, its position when it's first loaded, is not the same as the first frame of the animation on the usdz file For testing, I am using the AR Quick Look asset 'toy_biplane_idle.usdz' which demonstrates the same 'error' we're currently getting with our own usdz files. When the usdz is loaded, it is on the ground plane - But when the aniamtion is played, the plane 'snaps' to the position of the first frame of the animation - This 'snapping' behavior is giving us problems. We want the user ot see this plane in its static 'load' position with the option to play the animation. But we dont want it to snap when the user presses play Is it possible to load the .usdz in the position specified by the first frame of the animation? What is the best way to fix this issue. Thanks!
0
0
448
Jan ’24
displacement map specification
Where can I find a specification document of displacement file "baked_mesh_disp0.exr" obtained from Full Quality result run by Reality Composer Pro? I ran Reality Composer Pro, selected Full Quality and ran Create Model, and obtained *.usdz, which I renamed to *.zip and unzipped. Then I found 5 maps including "baked_mesh_disp0.exr" and I want to know its data specification.
2
0
348
Jan ’24
Loading .usdz materials in Reality Composer Pro
Hello All - I'm receiving .usdz files from a client. When previewing the .usdz file in Reality Converter - the materials show up as expected. But when I load the .usdz in Reality Composer Pro, all the materials show up as grey. I've attached an image of the errors I'm get inside Reality Converter, to help trouble shoot. What steps can I take to get these materials working in my Reality Composer Pro project? Thanks!
2
0
566
Jan ’24
Entity not reacting to light and not casting shadow in VIsionOS Simulator
Hi Guys, I've been trying to put my model to react to light in visionOS Simulator by editing the component in Reality Composer Pro and also modifying it by code, but I can only put the shadow if I put it as an usdz file, it's not as reflective as when I see it on reality converter or reality composer pro, does someone have this problem too? RealityView { content in if let bigDonut = try? await ModelEntity(named: "bigdonut", in: realityKitContentBundle) { print("LOADED") // Create anchor for horizontal placement on a table let anchor = AnchorEntity(.plane(.horizontal, classification: .table, minimumBounds: [0,0])) // Configure scale and position bigDonut.setScale([1,1,1], relativeTo: anchor) bigDonut.setPosition([0,0.2,0], relativeTo: anchor) // Add the anchor content.add(anchor) // Enable shadow casting but this does not work bigDonut.components.set(GroundingShadowComponent(castsShadow: true)) } }
1
0
446
Jan ’24
Can't play Audio in RealityComposerPro
I hope to be able to display the USDA model in RealityComposerPro and play the Spatial Audio. I used RealityView to implement these contents: RealityView{ content in do { let entity = try await Entity(named: "isWateringBasin", in: RealityKitContent.realityKitContentBundle) content.add(entity) guard let entity = entity.findEntity(named: "SpatialAudio"), let resource = try? await AudioFileResource(named: "/Root/isWateringBasinAudio_m4a", from: "isWateringBasin.usda", in: RealityKitContent.realityKitContentBundle) else { return } let audioPlaybackController = entity.prepareAudio(resource) audioPlaybackController.play() } catch { print("Entity encountered an error while loading the model.") return } } but when I ran it, I found that although can displayed the model normally, Spatial Audio failed to play normally. I hope to get guidance, thank you!
1
0
389
Jan ’24
How to add .hoverEffect to a single entity in a realityview with multiple entities.
How can I add .hoverEffect to a single entity in a realityview with multiple entities? I want selectable object to highlight themselves when looked at or hovered over. How can I easily make this happen? There is a working example of this within the Swift Splash demo but I don't know what part of the code is creating that feature. So far I've been able to get .hoverEffect to work on Model3D(), but I want to have multiple entities with a few that are selectable.
1
0
385
Jan ’24
Play Spatial Audio
I want to play RealityKitContent USDA model's Spatial Audio, I use this code: RealityView{ content in do { let entity = try await Entity(named: "isWateringBasin", in: RealityKitContent.realityKitContentBundle) let audio = entity.spatialAudio entity.playAudio(audio) content.add(entity) } catch { print("Entity encountered an error while loading the model.") return } } entity.playAudio(audio) this code need add a 'AudioResource' back of audio, Excuse me, what should AudioResource be?
0
0
324
Dec ’23
Model3D with deep stretching
I used Model3D to display a model: Model3D(named: "Model", bundle: realityKitContentBundle) { phase in switch phase { case .empty: ProgressView() case .failure(let error): Text("Error \(error.localizedDescription)") case .success(let model): model.resizable() } } However, when I ran, I found that the width and length were not stretched, but when I looked at the depth from the side, they were seriously stretched. What should I do? Note: For some reason, I can't use the Frame modifier. Image: width and length error depth
0
0
318
Dec ’23
Can’t find Reality Composer Pro
I just updated xcode 15.2 and I want to try to use Reality Composer Pro, I saw on the Apple developer video that it should be under Xcode -> developer tool -> Reality Composer Pro but when I open that I don't have Composer. On the Apple webpage for Rality Composer is written "Reality Composer for macOS is bundled with Xcode, which is available on the Mac App Store." Where i can find the Composer Pro? Thanks
0
0
572
Dec ’23