Post

Replies

Boosts

Views

Activity

Reply to How do we author a "reality file" like the ones on Apple's Gallery?
Hi @d0g Hope this helps. I’m not the most knowledgeable person on this subject but hopefully this is somewhat helpful. For USDZ animation… You can use various 3D applications for this. I’ve used Blender to create 3D models with simple, looping, animations with minimum movement in 3D. I use Reality Composer on the iPad to initiate larger movements of the simply animated 3D object in 3D space. 

I believe that this might also be able to be done using the new Reality Composer Pro app found in the new Beta Xcode 15.1 (Developer Tools) but it requires one to have an Apple silicon Mac to run It which I don't have. (It wasn't a requirement a week or so ago, but apparently now it is, which I'm not happy about.) I guess it’s time to upgrade… From within Blender, or other DCC, export the animated file as .usdz preferably. Open Reality Composer on the iPad, create a new file, and import (+ sign) your exported .usdz file. If you view it in AR now it won’t move yet. Using Behaviors in Reality Composer, generate your AR experience with the imported .usdz file. To move the object within the scene, and have it animate as defined in Blender, insert a Behavior with a “Custom” trigger and select which one you want to use to initiate the experience (Tap, scene start, etc.) Add an “Action Sequence” card select “USDZ Animation” and choose your imported object. Test run it. You should see the animation playing and the object will not move in x,y,z. If you want it to also move while your .usdz animation plays, add another “Action Sequence” card and select the movement you want. (Eg. Move, Rotate, Scale To). Select the object, and set the position you want it to move to. When you preview it, you will notice that the usdz animation plays first, and when finished it will move to the position defined. To have both actions happen at once, drag one action card onto the other to “combine” them. For “Tapping on various buttons in this experience triggers various complex animations”. In Reality Composer (iPad), you can select various items and have them trigger various behaviors such as mentioned above. It’s easy to have one item with a behavior on it to trigger movement of another object. Similar approach the notes above. For “Exporting a Reality File” from Xcode, sorry, I’m no help here. You can do it from within the iPad application though… With your file open in RC, select the ellipsis in the upper-right hand corner of the window and select “Export”. In the dialog box that opens, select "Reality File". The default format is "USDZ" Export your file. Hopefully that helps, cheers!
Nov ’23
Reply to How do we author a "reality file" like the ones on Apple's Gallery?
.@d0g Glad to be of some help. I'd maybe get the most recent version of the Xcode beta, I think it’s now 15.2? If you have a Mac with Apple silicon in it you should be able to run RC Pro. Find it under “Xcode ->Developer Tools”. I wish I could still access it but I only have an Intel-based Mac. My coding skills are really not where I would like them to be. Maybe there’s another way to do this in code than this idea, wouldn’t be surprised if there is, but here you go… Regarding animations, USDZ animations are limited, usually only one thing at a time, or maybe two at most. It’s not a robust system. For example, you could have a propeller spinning on an airplane model while the plane slips side to side in a repeating animation loop. Nothing too complex. So I don’t know if the three animations will work, and there’s no way to control one, then the other independently. Once again, simple animations only. You might try creating two usdz files, yes this sounds like a serious kludge but it might work? One file will have the “WaveHand” animation, another will have the “IdleLoop” or whatever else you might want. Export both files as .usdz. In a new file in RC on the iPad, create a couple of scenes. The first one could have the usdz animation of the waving hand, another could have a different animation in it. If you create the first one, then duplicate the scene, and replace the model with the different animation, they will register in the same place when switching scenes. So each scene would have a different animation in it. This might not be what you want but if you had a “button”, or some other item that triggers the other animation, you could have a behavior that changes scenes so the other animation would play. Use the “Custom” behavior, and add a “Change Scene” action card to it which points to the other scene. Hopefully that makes sense? As for your last question, once again this seems awkward to me too but it might work. I sure hope that Apple continues to improve these applications…. Basically, in the 3D application, you split the model into two parts, say a button (only), and the rest of the model. So delete everything in the model except the button, and export it as .usdz. Then open the original model again, delete the button, and export the file. So you end up with two files. If the parts have the same orientation points when you export them you should be able to import them into RC and have them register with each other correctly, as they would if it was one model file. Make sense? Then, in RC you can select the button without effecting the larger complete model, and assign behaviors to it independently. Once again, I hope that makes sense. It seems that until these tools continue to improve one has to get “creative” in order to hopefully get things to work. It’s a fun challenge, but one that I hope goes away over time. Cheers!
Nov ’23