Post

Replies

Boosts

Views

Activity

Is Passthrough + Unbounded Volumes + My Own 3D Rendering in Metal Possible?
On VisionOS, is a combination of full passthrough, unbounded volumes, and my own custom 3D rendering in Metal Possible? According to the RealityKit and Unity VisionOS talk, towards the end, it’s shown that an unbounded volume mode allows you to create full passthrough experiences with graphics rendering in 3D — essentially full 3D AR in which you fan move around the space. It’s also shown that you can get occlusion for the graphics. This is all great, however, I don’t want to use RealityKit or Unity in my case. I would like to be able to render to an unbounded volume using my own custom Metal renderer, and still get AR passthrough and the ability to walk around and composit virtual graphical content with the background. To reiterate, this is exactly what is shown in the video using Unity, but I’d like to use my own renderer instead of Unity or RealityKit. This doesn’t require access to the video camera texture, which I know is unavailable. Having the flexibility to create passthrough mode content in a custom renderwr is super important for making an AR experience in which I have control over rendering. One use case I have in mind is: Wizard’s Chess. You see the real world and can walk around a room-size chessboard with virtual chess pieces mixed with the real world, and you can see the other player through passthrough as well. I’d like to render graphics on my living room couches using scene reconstruction mesg anchors, for example, to change the atmosphere. The video already shows several nice use cases like being able to interact with a tabletop fantasy world with characters. Is what I’m describing possible with Metal? Thanks! EDIT: Also, if not volumes, then full spaces? I don’t need access to the camera images that are off-limits. I would just like passthrough + composition with 3D Metal content + full ARKit tracking and occlusion features.
0
0
1.1k
Jun ’23
People Occlusion + Scene Understanding on VisionOS
In ARKit for iPad, I could 1) build a mesh on top of the real world and 2) request a people occlusion map for use with my application so people couls move behind or in fromt of virtual content via compositing. However, in VisionOS, there is no ARFrame image to pass to the function that would generate the occlusion data. Is it possible to do people occlusion in visionOS? If so, how it is done—through a data provider, or is it automatic when passthrough is enabled? If it’s not possible, is this something that might have a solution in future updates as the platform develops? Being able to combine virtual content and the real world with people being able to interact with the content convincingly is a really important aspect to AR, so it would make sense for this to be possible.
4
1
1.4k
Jun ’23
structured logging is great, but logging fails with variables ?
I wanted to try structured logging with os_log in C++, but I found that it fails to print anything given a format string and a variable: eg. void example(std::string& str) { os_log_info(OS_LOG_DEFAULT, "%s", str.c_str()); os_log_debug(OS_LOG_DEFAULT, "%s", str.c_str()); os_log_error(OS_LOG_DEFAULT, "%s", str.c_str()); } This prints a blank row in the console, but with no text. How is this meant to work with variables? It only works with literals and constants now as far as I can tell. I'm looking forward to getting this working.
10
0
2.6k
Jun ’23
macbook pro 16" 2021 magsafe issues macOS 12.0.1
I am seeing that seemingly after the macOS 12.0.1 update, the macbook pro 16" 2021 is having widespread issues with the magsafe charger when shut-off, in which fast-charge causes the charger to loop the connection sound over and over without actually charging. discussion pages: https://forums.macrumors.com/threads/2021-macbook-pro-16-magsafe-light-flashing-amber-and-power-chime-repeating-during-charging-when-off.2319925/ https://www.reddit.com/r/macbookpro/comments/qi4i9w/macbook_pro_16_m1_pro_2021_magsafe_3_charge_issue/ https://www.reddit.com/r/macbookpro/comments/qic7t7/magsafe_charging_problem_2021_16_macbook_pro_read/ Most people suspect it's a firmware/OS issue. Is Apple aware of this / is it being worked-on? Has anyone tried this with the latest 12.1 beta as well?
0
0
708
Nov ’21
SFSpeechRecognizer Broken in iPadOS 15.0?
I updated Xcode to Xcode 13 and iPadOS to 15.0. Now my previously working application using SFSpeechRecognizer fails to start, regardless of whether I'm using on device mode or not. I use the delegate approach, and it looks like although the plist is set-up correctly (the authorization is successful and I get the orange circle indicating the microphone is on), the delegate method speechRecognitionTask(_:didFinishSuccessfully:) always returns false, but there is no particular error message to go along with this. I also downloaded the official example from Apple's documentation pages: SpokenWord SFSpeechRecognition example project page Unfortunately, it also does not work anymore. I'm working on a time-sensitive project and don't know where to go from here. How can we troubleshoot this? If it's an issue with Apple's API update or something has changed in the initial setup, I really need to know as soon as possible. Thanks.
9
1
3.6k
Sep ’21
Nearby Interaction data between iOS and watchOS
I’m very interested in trying to have an iOS and watchOS device pair communicate and want to know if it’s possible for the iOS device to get the direction to the watchOS device. (I cannot try this because I don’t have an Apple Watch yet.) I’m looking at the documentation here and am not sure how to interpret the wording: nearby interaction docs Nearby Interaction on iOS provides a peer device’s distance and direction, whereas Nearby Interaction on watchOS provides only a peer device's distance. I’m not sure what is considered the peer. Let’s assume I’m communicating over a custom server and not using an iOS companion app. Is the above saying that: A: iOS will send watchOS the distance from the iOS device to the watchOS device and watchOS will send out its distance and direction to the iOS device? (i.e. NearbyConnevtivity on iOS receives distance and direction of any other device, regardless of whether it’s a phone or watch, but watchOS only gets distance.) B: The watch receives distance and direction to the phone, and the phone receives only the distance to the watch. C: the iOS device only gets distance to the watchOS device, and the watchOS device only gets distance to iOS device, period. May I have clarification? A secondary question is how often and how accurate the distance and directions are calculated and sent, but first things first. I’m looking forward to a reply. That would help very much and inform my decision to develop for watchOS. I have some neat project ideas that require option A or B to be true. Thanks for your time!
0
0
889
Jul ’21
ReplayKit Live Streaming Custom Video Feed?
Is it possible to feed ReplayKit with custom live stream data, e.g. a cvPixelBuffer created from a Metal Texture, and stream that to youtube? My use case is to give the broadcaster hidden UI manipulation controls that the stream audience cannot see. (Think of a DJ. No one gets to see all the DAW controls on the DJ's laptop and doesn't need to because that's not part of the experience.) If it's possible, might anyone be able to help figure out the correct way to implement this? From what I can tell, ReplayKit doesn't let you send custom data, in which case, what else can be done?
0
0
874
Jun ’21
GroupActivities on iPadOS?
I forgot to ask this during my lab session, but I noticed iPadOS is not listed under supported OSes under the GroupActivities documentation page. iPadOS supports FaceTime, but is it that GroupActivies doesn't work on iPadOS? This would be a crying shame since one of the examples specifically involved drawing collaboratively. The iPad is the perfect device for that use case. EDIT: Quick edit. Coordinate media experiences with Group Activities mentions iPadOS support, in which case the first page I linked might have a missing OS entry.
1
0
1.1k
Jun ’21
How to achieve bindless textures and dynamic indexing to pick and sample textures in shaders?
Hello all. I'm developing a user-generated content 2D drawing application for iOS (iPad) that requires a lot of dynamic drawing, texture swaps, and all-around changing data, meaning that I can't allocate most of my resources up-front. The general idea of what I'm trying to do: One thing I'd like to do is support lots of texture loading and swapping at runtime, using images fetched on-the-fly. I would prefer not to set textures over and over using setFragmentTexture to avoid all of the extra validation. Here is what I've tried and thought of doing so far, for some context: A way of doing what I want, I think, might involve creating a large array of texture2D representing an active set of resident textures. Each object in my world should have an associated index set into a subset of textures into that array (so I could support sprite animation for example). Then, in the shader, I could use that index to access the correct texture and sample from it. Is dynamic indexing to sample a texture even allowed? There's a problem, however. Everything I've learned about other graphics APIs and Metal suggests that this sort of dynamic indexing might be illegal unless the index is the same for all invocations of the shader within a draw call. In Vulkan, this is called "dynamically uniform," though there's an extension that loosens this constraint, apparently. I think what I'm trying to achieve is called "mindless textures" or a form of "descriptor indexing." Potentially use Argument Buffers? So I looked into Argument Buffers here, which seem to support more efficient texture-setting that avoids a lot of the overhead of validation by packing everything together. From my understanding, it might also relax some constraints. I'm looking at this example: using_argument_buffers_with_resource_heaps - https://developer.apple.com/documentation/metal/buffers/using_argument_buffers_with_resource_heaps?language=objc The example uses arrays of textures as well as heaps, but you can toggle-off the heaps (so let's ignore them for now). Assuming I have tier-2 iOS devices (e.g. iPad mini 2019, iPad Pro 2020), there's a lot I can do with these. If I used Argument Buffers, how would I support dynamically-added, removed, and swapped resources? Still, there's another problem: none of the examples show how to modify which textures are set in the argument buffer. Understandably, those buffers were optimized for set-once, use every frame use cases, but I want to be able to change the contents during my draw loop in case I run out of texture slots, or maybe I want to delete a texture outright, as this is a dynamic program after all. On to the concrete questions: Question 1 how do I best support this sort of mindless texturing that I'm looking to do? Should I still use argument buffers, in which case, how do I use them efficiently considering I may have to change their contents. How *do* I change their contents? Would I just create a new argument buffer encoder and set one of the texture slots to something else for example, or would I need to re-encode the entire thing? What are the costs? May I have clarification and maybe some basic example code? The official documentation, as I said, does not cover my use case. Question 2: is it even legal to access textures from a texture array using a dynamic index provided in an object-specific uniform buffer? Basically it would be the equivalent of a "material index." Last Question: I think I also have the option of accessing the texture from the vertex shader and passing it to the fragment shader as an output. I hadn't considered doing that before, but is there a reason this may be useful? For example, might there be some restrictions lifted if I did things this way? I can imagine that because there are far more vertices than fragments, this would reduce the number of accesses into my "large buffer" of resident textures. Thanks for your time. I'm looking forward to discussing and getting to the bottom of this!
2
0
1.7k
Oct ’20
Clarify restrictions / security as applied to development on Apple Sillicon?
I develop mainly UNIX-style command line applications without Xcode and use plenty of open-source software that isn't necessarily Mac-specific or signed (e.g. from GitHub repositories). Given the new security enforced at the hardware level, I'm concerned what this means for my development cycle. On Catalina, you can re-enable "download from anywhere" via command line. Since I'm not able to get an Apple Silicons development kit, I can't test behavior myself. if someone knows already or is expecting a development kit, it would be great to get more information. These are some of my questions: Will I still be able to compile code locally and run it without code-signing? Might I be able to re-enable download from anywhere like on Catalina, so people in my own group can run binaries I might send securely (not via the App Store)? I am wondering, also, if the tagged pointer memory in the WWDC presentation will be optional, or if the idea is that it will be mandatory once Apple gets them working for user-level programs. I currently use home-brew to download the latest versions of clang and packages, again not for Xcode Mac apps, but rather command line programs. Will I still be able to do this once home-brew/llvm update to build to arm Macs? Lastly, can I always just disable SIP at my own risk to restore full freedom, or is this unrelated? Note that I understand all of the security risks. I just want to know about all options. For Development purposes and research, it's sometimes beneficial to enable easy non-signed development and sharing and simply be a responsible programmer/computer user. Thanks.
4
0
889
Jun ’20