Post AXHEZGzyYhVLlfLIvY by zhuowei@notnow.dev
 (DIR) More posts by zhuowei@notnow.dev
 (DIR) Post #AXHENin7OtmkURovTs by zhuowei@notnow.dev
       2023-07-02T07:33:14.883413Z
       
       0 likes, 0 repeats
       
       Here's my tool to take 3D stereoscopic side-by-side screenshots in the visionOS Simulator:https://github.com/zhuowei/VisionOSStereoScreenshots#visionOS
       
 (DIR) Post #AXHEZGzyYhVLlfLIvY by zhuowei@notnow.dev
       2023-07-02T07:35:25.450021Z
       
       0 likes, 0 repeats
       
       @stroughtonsmith @ShinyQuagsire @jjtech @keithahern I made a tool to take 3D stereoscopic screenshots of the visionOS simulator by hooking the CompositorServices API to make backboardd render both a left and right eye view.
       
 (DIR) Post #AXHGCqOqyHyIoKPaRk by haifisch@nso.group
       2023-07-02T07:44:45Z
       
       0 likes, 0 repeats
       
       @zhuowei rad! say, the 3DS camera has the 3D images exported with left/right eye perspective images, it'd be rad to see a visionOS app to view those old images. I can give you some from my trip in Hawaii if interested.
       
 (DIR) Post #AXHGCrG1maVRTFI3KS by zhuowei@notnow.dev
       2023-07-02T07:53:43.369941Z
       
       0 likes, 0 repeats
       
       @haifisch I'm not planning to look into .mpo files right now - either writing them (https://twitter.com/zhuowei/status/1675411250673483777) or viewing them. (Especially since there's no actual visionOS headset yet)I wonder if the visionOS stock Photos app would Just Work (tm) with them though?I know Apple documented the 3D video support (https://developer.apple.com/videos/play/wwdc2023/10071/, https://developer.apple.com/av-foundation/HEVC-Stereo-Video-Profile.pdf), so worst case scenario, convert to movie
       
 (DIR) Post #AXHGGyYyYwBBHr7HlY by Pixar@pixelfed.social
       2023-07-02T07:39:54+00:00
       
       0 likes, 0 repeats
       
       @zhuowei@notnow.dev really fancy - it seems the panel is behind the table but cuts leafs of the plant
       
 (DIR) Post #AXHGGzU38jpi8rorj6 by zhuowei@notnow.dev
       2023-07-02T07:54:27.539091Z
       
       0 likes, 0 repeats
       
       @Pixar No idea if that means I screwed up or the built-in synthetic environments are broken in occulusion somehow... file a feedback to Apple?
       
 (DIR) Post #AXHHDLECS8uINQEIKG by zhuowei@notnow.dev
       2023-07-02T08:05:04.456545Z
       
       0 likes, 0 repeats
       
       @Pixar ... I can reproduce this in the visionOS Simulator's 2D mode as well: if you rotate the view, you can see the window overlapping the plant even though it's supposed to be behind it.Do you want to file the most nitpicky Apple feedback bug in history, or should I do it?
       
 (DIR) Post #AXHIfZM5cb4iFowaGW by tomlokhorst@mastodon.social
       2023-07-02T08:15:29Z
       
       0 likes, 0 repeats
       
       @zhuowei This is so cool! Seems to work as-is, without disabling SIP.
       
 (DIR) Post #AXHIfaHs9lIP91yjKa by zhuowei@notnow.dev
       2023-07-02T08:21:22.645831Z
       
       0 likes, 0 repeats
       
       @tomlokhorst Thanks for letting me know! In the past I remember the Simulator prevented code injection; I guess that changed recently? I'll try re-enabling SIP and if it works I'll update the instructions.
       
 (DIR) Post #AXHIuMaJNuJgzTeOFE by zhuowei@notnow.dev
       2023-07-02T08:24:03.717778Z
       
       0 likes, 0 repeats
       
       @tomlokhorst Does it actually output the screenshot in /tmp/visionos_stereo_screenshot_{}.png? ./inject.sh has no error checking whatsoever: if it fails, the simulator would simply restart without injecting the code.
       
 (DIR) Post #AXHs7498kI6xxvjY80 by tomlokhorst@mastodon.social
       2023-07-02T08:32:57Z
       
       0 likes, 1 repeats
       
       @zhuowei Ha! It works on my 10 year old 3D TV with glasses. 😎
       
 (DIR) Post #AXHz9L45Vt72hCOx60 by marcello3d@hci.social
       2023-07-02T15:41:49Z
       
       0 likes, 0 repeats
       
       @zhuowei neat! Is it a bug in the simulator that the plant is cut off by the window behind it?
       
 (DIR) Post #AXHz9Ljv0MZamvyMIS by zhuowei@notnow.dev
       2023-07-02T16:17:18.465225Z
       
       0 likes, 0 repeats
       
       @marcello3d Yes: happens in 2D as well (try rotating the view)
       
 (DIR) Post #AXHzEVIgswvpt9h8Hg by zhuowei@notnow.dev
       2023-07-02T16:18:18.810096Z
       
       0 likes, 0 repeats
       
       @marcello3d (I suspect the Simulator doesn't do object occlusion; I assume the real headset would be able to do it...)
       
 (DIR) Post #AXI0ZXbpb35t5IF6q8 by schrockwell@mastodon.social
       2023-07-02T16:26:19Z
       
       0 likes, 0 repeats
       
       @zhuowei Sweet! If you unfocus your eyes and do the “Magic Eye” trick you can see the depth extremely clearly. And yeah the plant is weirdly cut off by the window.
       
 (DIR) Post #AXI0ZYNKkR5jScT2si by zhuowei@notnow.dev
       2023-07-02T16:33:18.036174Z
       
       0 likes, 0 repeats
       
       @schrockwell I also have a crosseye version (left on right, right on left) if that's easier. (The version I posted is left on left)
       
 (DIR) Post #AXI8l0c2tz1tr7K2pk by jjtech@infosec.exchange
       2023-07-02T17:36:23Z
       
       0 likes, 0 repeats
       
       @zhuowei Well, now I'm a bit conflicted at how to proceed. I was originally trying to use the original system as much as possible, so I made a proper .simdeviceui and .simdevicetype so that nothing is patched, you just select a different device type. So I could replace the entire .simruntime for XROS too... but hooking it seems way easier, especially if it doesn't require disabling SIP or library validation...
       
 (DIR) Post #AXI8l1R5qBrYPRCoOu by jjtech@infosec.exchange
       2023-07-02T17:55:08Z
       
       0 likes, 0 repeats
       
       @zhuowei also... can dyld interposing be done with Swift stuff?
       
 (DIR) Post #AXI8l46ztMZQhypIzg by zhuowei@notnow.dev
       2023-07-02T18:04:57.320517Z
       
       0 likes, 0 repeats
       
       @jjtech I've never tried: in theory, probably the same way as non-Swift (though you'll need C to actually put the functions into the interpose section). What are you planning to do? I haven't looked at the host side of this at all; shinyquagsire would probably know more
       
 (DIR) Post #AXI9vl3HCGZgjakTQG by jjtech@infosec.exchange
       2023-07-02T18:11:04Z
       
       0 likes, 0 repeats
       
       @zhuowei I was just thinking that it was better to use all the same method, so if interposing/hooking is used for the stereo output maybe I should do the same for the gyro inputs
       
 (DIR) Post #AXI9vln0SF9d1Q8zhY by jjtech@infosec.exchange
       2023-07-02T18:12:41Z
       
       0 likes, 0 repeats
       
       @zhuowei also I noticed when I try to load from simctl rather than simulator.app I get an error like this? Not really sure how to fix it2023-07-02 14:09:27.602978-0400 simctl[1528:1975911] [loading] Error loading /Applications/Xcode-beta.app/Contents/Developer/Platforms/XROS.platform/Library/Developer/CoreSimulator/Profiles/UserInterface/XRGyroControlsUI.simdeviceui/Contents/MacOS/XRGyroControlsUI (187):  dlopen(/Applications/Xcode-beta.app/Contents/Developer/Platforms/XROS.platform/Library/Developer/CoreSimulator/Profiles/UserInterface/XRGyroControlsUI.simdeviceui/Contents/MacOS/XRGyroControlsUI, 0x0106): Symbol not found: _$s12SimulatorKit24SimDeviceLegacyHIDClientC6deviceACSo0cD0C_tKcfC  Referenced from: <E2373FFB-486D-32C4-8B57-D44E9EE5C53B> /Applications/Xcode-beta.app/Contents/Developer/Platforms/XROS.platform/Library/Developer/CoreSimulator/Profiles/UserInterface/XRGyroControlsUI.simdeviceui/Contents/MacOS/XRGyroControlsUI  Expected in:     <no uuid> unknown2023-07-02 14:09:27.603028-0400 simctl[1528:1975911] Failed to load bundle executable from /Applications/Xcode-beta.app/Contents/Developer/Platforms/XROS.platform/Library/Developer/CoreSimulator/Profiles/UserInterface/XRGyroControlsUI.simdeviceui
       
 (DIR) Post #AXI9vnB9Hy3nKaRmyG by zhuowei@notnow.dev
       2023-07-02T18:18:09.528486Z
       
       0 likes, 0 repeats
       
       @jjtech I don't know: maybe you need to somehow manually load its dependency? Or set your rpath during linking (or something) to make it look for that library?
       
 (DIR) Post #AXIAKpkareaGXwy0gq by zhuowei@notnow.dev
       2023-07-02T18:22:42.609916Z
       
       0 likes, 0 repeats
       
       @jjtech eh, whatever works best. I might try hooking the AR poses inside backboardd itself, though, and see if that's easier.
       
 (DIR) Post #AXIs2DP95hOOOCrp0S by eval@glauca.space
       2023-07-02T21:42:39Z
       
       0 likes, 0 repeats
       
       @zhuowei cool! is it possible to output both eyes to the screen live with a similar technique, do you think?
       
 (DIR) Post #AXIs2E9wHip4jKlBwW by zhuowei@notnow.dev
       2023-07-03T02:32:16.259315Z
       
       0 likes, 0 repeats
       
       @eval Yes: just need to add an extra shader command to copy the eye textures into one texture. I don't really want to setup the PSVR right now, though