Delve into the world of graphics and game development. Discuss creating stunning visuals, optimizing game mechanics, and share resources for game developers.

All subtopics

Post

Replies

Boosts

Views

Activity

Moving two entities at the same time separately with both hands in Vision Pro
I'm developing an app for Apple Vision Pro and have a question about RealityKit. Recently, I attempted to use drag gestures to manipulate two entities, A and B, with my left and right hands respectively. The two entities belong to the same RealityView. I anticipated that I could move Entity A with my left hand and Entity B with my right hand independently. However, I noticed that the movement of one hand affects both entities simultaneously. Presumably, DragGesture().onChanged is triggered twice for each entity. In an attempt to properly pair each hand with its corresponding entity, I investigated the platform.manipulatorGroup in the debugger. However, I encountered a compile error when trying to access the platform variable. Is it feasible to pair each hand with a specific entity and move both objects separately? Thank you in advance.
2
0
391
Mar ’24
Game rejected due to Bitcoin logo - Copycats
Hi everyone, Last month, my endless runner game set in a crypto world was rejected for using the Bitcoin logo, labeled as a "Copycats" issue. We were asked to remove the logo and Bitcoin prices, even though the Bitcoin logo is public domain. I noticed other Bitcoin games on the AppStore were updated recently without any problems. I couldn't find any rules against using Bitcoin in the guidelines. When I appealed, they just told me to remove it again but didn't explain why. We've updated our game several times before, and only this small bug fix was rejected. Any advice on what are the next step? Anyone experienced this? Cheers
0
0
397
Mar ’24
Adding 2D PNG to Reality Composer Pro
I've got a couple 2D PNG assets that I want to add to a scene made of a couple other udsz files in RCP (picture adding a couple 2D videogame characters to a simple 3D diorama). When I try to drag the PNGs to the workspace or the file tree…nothing happens. I found a walkthrough on Medium (called "Importing and Exporting Personalized Objects for Augmented Reality: Reality Composer and SwiftUI" for those curious as I can't link to Medium posts here) that makes it look like users could do this with simple drag-and-drop. The Medium post is from June 2023, and in the screenshots RCP visually looks a lot more like Reality Composer on iPad, so I'm assuming it's changed a lot since then? Is there still a way to do this? I've tried adding the 2D elements to a scene with Blenders "import images as planes," but I'm getting weird halos around them and was hoping RCP could make the process a bit easier/cleaner.
0
0
556
Mar ’24
Error gaming porting toolkit
apple/apple/game-porting-toolkit 1.1 did not build Logs: /Users/jorge/Library/Logs/Homebrew/game-porting-toolkit/00.options.out /Users/jorge/Library/Logs/Homebrew/game-porting-toolkit/01.configure /Users/jorge/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc /Users/jorge/Library/Logs/Homebrew/game-porting-toolkit/02.make /Users/jorge/Library/Logs/Homebrew/game-porting-toolkit/wine64-build
0
0
496
Mar ’24
USB HID Specifics for Mac OS?
I am currently developing an USB HID Device, specifically a type of Joystick. However it seems that any attempt of getting a joystick to work on Mac do not work. My prototype works perfectly on Windows, being recognised as such and receiving all data. On MacOS, the Joystick is not recognised as a Joystick though, and the OS does not seem to receiver any Input from it whatsoever. I have translated my code to use both Mouse and Keyboard, both work perfectly. I have also tried to have the Joystick identify as a Gamepad, but again, it works on Windows and is not recognised on Mac (is not recognised as a Gamepad). Are there any specific restrictions to HID devices on MacOS? Apple developer only seems to describe specifics from a software standpoint, not from the standpoint of someone developing hardware. And even then it only seems to describe very specific HID devices, such as mouse, keyboard or a stylus. Please also keep in mind that I don't have much experience developing MacOS applications.
2
0
678
Mar ’24
Error when building game-porting-toolkit 1.1
Hi, Here I encountered an issue while building game-porting-toolkit 1.1. Below are the prints: =================================================== 2 warnings and 7 errors generated. make: *** [dlls/crypt32/unixlib.o] Error 1 make: *** Waiting for unfinished jobs.... ==> Formula Tap: apple/apple Path: /usr/local/Homebrew/Library/Taps/apple/homebrew-apple/Formula/game-porting-toolkit.rb ==> Configuration HOMEBREW_VERSION: 4.2.12 ORIGIN: https://github.com/Homebrew/brew HEAD: 780fbbc65e90fbe09629aba180a1839e9e7dbaf2 Last commit: 6 days ago Core tap JSON: 17 Mar 14:17 UTC Core cask tap JSON: 17 Mar 10:58 UTC HOMEBREW_PREFIX: /usr/local HOMEBREW_CASK_OPTS: [] HOMEBREW_MAKE_JOBS: 10 Homebrew Ruby: 3.1.4 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby CPU: 10-core 64-bit westmere Clang: 15.0.0 build 1500 Git: 2.39.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git Curl: 8.4.0 => /usr/bin/curl macOS: 14.4-x86_64 CLT: 15.3.0.0.1.1708646388 Xcode: 15.3 => /Applications/XCode.app/Contents/Developer Rosetta 2: true ==> ENV HOMEBREW_CC: clang HOMEBREW_CXX: clang++ Error: apple/apple/game-porting-toolkit 1.1 did not build Logs: /Users/mfhyy/Library/Logs/Homebrew/game-porting-toolkit/00.options.out /Users/mfhyy/Library/Logs/Homebrew/game-porting-toolkit/01.configure /Users/mfhyy/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc /Users/mfhyy/Library/Logs/Homebrew/game-porting-toolkit/02.make /Users/mfhyy/Library/Logs/Homebrew/game-porting-toolkit/wine64-build If reporting this issue please do so to (not Homebrew/brew or Homebrew/homebrew-core): apple/apple
6
1
2.2k
Mar ’24
RealityKit Instanced Rendering on visionOS
Hello, I've been trying to leverage instanced rendering in RealityKit on visionOS but have not had success. RealityKit states this is supported: https://developer.apple.com/documentation/realitykit/validating-usd-files https://developer.apple.com/videos/play/wwdc2021/10075/?time=1373 https://developer.apple.com/videos/play/wwdc2023/10099/?time=772 RealityKit Trace metrics Validating instancing is working: To test I made a base visionOS app with immersive space and the entity replaced with my test usdz file. I've been using the RealityKit Trace profiling template in xcode instruments in the immersive space and volume closed. This gets consistent draw call results. If I have a single sphere mesh with one material I get one draw call, but the number of draw calls grows linearly with mesh count no matter how my entity is configured. What I've tried Create a test scene in blender, export with instancing enabled Create a test scene in Reality Composer Pro using references Author usda files by hand based on the OpenUSD spec Programatically create a MeshResource with Contents at runtime References https://openusd.org/release/api/_usd__page__scenegraph_instancing.html https://developer.apple.com/documentation/realitykit/meshresource https://developer.apple.com/documentation/realitykit/meshresource/instance Thank you
2
2
449
Mar ’24
Issues using xbox 360 controller on Macbook Air
Hi all, I have a macbook air 2022 with the M2 chip inside. I am trying to use a wired xbox 360 controller to play games on steam. However, whenever I try to plug it it, the light shines green for a little bit and then turns off. I checked in my usb device tree through the system report and it says that there is a controller plugged in. The controller doesn't work in the game either, are there any fixes? I am also on macOS Monterey version 12.4
0
0
533
Mar ’24
RealityView clip volume
Is there any way to specify a clip volume or clipping planes on either a RealityView or the underlying RealityKit entity on visionOS? This was easy on SceneKit with shader modifiers, or in OpenGL, or WebGL, or with RealityKit on iOS or macOS with CustomMaterial surface shader, but CustomMaterial is not supported on visionOS.
0
0
417
Mar ’24
Jax-Metal: fix/support matrix decompositions
Currently (jax-metal 0.0.5) doesn't support matrix decompositions like Cholesky, LU, or Eigen, on Metal. I have a 64GB M1 Max on Sonoma 14.2.1 (23C71). Eigen raises a NotImplemented error, but Cholesky and jax.linalg.inv error out. When using the CPU by setting export JAX_PLATFORM_NAME=CPU then the decompositions work. The error I am getting: XlaRuntimeError Traceback (most recent call last) Cell In[33], line 1 ----> 1 jsl.cho_factor(Sigma_0_inv) File ~/miniconda3/envs/jaxmetal/lib/python3.10/site-packages/jax/_src/scipy/linalg.py:61, in cho_factor(failed resolving arguments) 56 @_wraps(scipy.linalg.cho_factor, 57 lax_description=_no_overwrite_and_chkfinite_doc, skip_params=('overwrite_a', 'check_finite')) 58 def cho_factor(a: ArrayLike, lower: bool = False, overwrite_a: bool = False, 59 check_finite: bool = True) -> tuple[Array, bool]: 60 del overwrite_a, check_finite # Unused ---> 61 return (cholesky(a, lower=lower), lower) File ~/miniconda3/envs/jaxmetal/lib/python3.10/site-packages/jax/_src/scipy/linalg.py:54, in cholesky(failed resolving arguments) 49 @_wraps(scipy.linalg.cholesky, 50 lax_description=_no_overwrite_and_chkfinite_doc, skip_params=('overwrite_a', 'check_finite')) 51 def cholesky(a: ArrayLike, lower: bool = False, overwrite_a: bool = False, 52 check_finite: bool = True) -> Array: 53 del overwrite_a, check_finite # Unused ---> 54 return _cholesky(a, lower) File ~/miniconda3/envs/jaxmetal/lib/python3.10/site-packages/jax/_src/compiler.py:255, in backend_compile(backend, module, options, host_callbacks) 250 return backend.compile(built_c, compile_options=options, 251 host_callbacks=host_callbacks) 252 # Some backends don't have host_callbacks option yet 253 # TODO(sharadmv): remove this fallback when all backends allow compile 254 # to take in host_callbacks --> 255 return backend.compile(built_c, compile_options=options) XlaRuntimeError: UNKNOWN: /var/folders/9d/0035yr7j3bx84h3ghpp_86pc0000gn/T/ipykernel_40684/3046650730.py:1:0: error: failed to legalize operation 'mhlo.cholesky' /var/folders/9d/0035yr7j3bx84h3ghpp_86pc0000gn/T/ipykernel_40684/3046650730.py:1:0: note: see current operation: %5 = "mhlo.cholesky"(%4) {lower = true} : (tensor<200x200xf32>) -> tensor<200x200xf32>
0
0
308
Mar ’24
GKLocalPlayer.local.isMultiplayerGamingRestricted not representing all relevant scenarios?
I need clarification on the GKLocalPlayer.local.isMultiplayerGamingRestricted behavior which check's user's device capability (whether it is set up to allow or disallow multiplayer) I am referring to this from Apple documentation at : https://developer.apple.com/documentation/gamekit/authenticating_a_player if GKLocalPlayer.local.isMultiplayerGamingRestricted { // Disable multiplayer game features. } The issue is that this is a boolean (true/false value ) However I have noticed that iOS ( latest version and preceding versions) allow people to have the following options: ( you can set these under screen time -> content restrictions -> Multiplayer games ) Disallow all multiplayer games - presumably your API returns a false for this. Allow multiplayer with friends only -???? what does GKLocalPlayer.local.isMultiplayerGamingRestricted return here?? if True, how is the Friends only restriction handled? Are we supposed to do something to force it? Note: So far I am relying on Apple's Game Center native experience and have not added wrappers to do additional filtering etc. I hope that I shall be able to keep doing so. Allow all multiplayer games - presumably your API returns a false for this. You can see how there are three choices but this is modeled as a boolean. Choice number 2. is not addressed. Has anyone come across this? Note: This is very different from checking for underage users. No matter what I do, in my post above, it won't set the correct numbers for numbered bullet -points. I call them 1, 2, 3 it posts 1,1,2 or 1.,2,1 etc. ( side nit ) Apologies if this isn't as readable as it should be.
1
0
1.2k
Mar ’24
Sign in with Apple Game Kit Unity plugin return blank DisplayName on VisionOS
In VisionOS1.1, when using the com.apple.unityplugin.core-3.1.0 & com.apple.unityplugin.gamekit-2.2.0 to sign in Apple Game Center. var player = await GKLocalPlayer.Authenticate(); Debug.Log($"GKLocalPlayer Player: {player.DisplayName}"); Debug.Log($"GKLocalPlayer Player Alias: {player.Alias}"); it returns GKLocalPlayer Player: GKLocalPlayer Player Alias: Unknown all other parameters are fine, except for the DisplayName is blank and the Alias returns "Unknown". However, it works fine on iOS.
0
0
428
Mar ’24
Loading entities from reality kit content?
I'm trying to better understand how loading entities works. If I do this: RealityView { content in // Add the initial RealityKit content if let scene = try? await Entity(named: "RCP_Scene", in: realityKitContentBundle) { content.add(scene) } } It returns the root with the two objects I have in the scene (sphere_01 and sphere_02). If I add a drag gesture to this entity it works on the root and gets applied to both sphere_01 and sphere_02 together (they both indiviually have collision and input components set to allow gestures). How do I get individual control of sphere_01 and sphere_02? Is it possible to load the root scene, as I'm doing above, and have individual control?
0
0
278
Mar ’24
Construction of luminous expression methods
Hi, I am investigating how to emit the following in my visionOS app. https://www.hiroakit.com/archives/1432 https://blog.terresquall.com/2020/01/getting-your-emission-maps-to-work-in-unity/ Right now, I'm trying various things with Shader Graph in Reality Composer Pro, but I can't tell from the official documentation and WWDC session videos what the individual functions and combined effects of Reality Composer Pro's Shader Graph nodes are, I am having a hard time understanding the effects of the individual functions and combinations of them. I have a feeling that such luminous materials and expressions are not possible in visionOS to begin with. If there is a way to achieve this, please let me know. Thanks.
0
0
263
Mar ’24
Cursor data on VisionOS
I am working on an application where we are planning to use Metal for directly rendering custom content. When user looks at something on the rendered image, I want to get the position or ray of cursor (the point where the user is currently looking at) to render something else like a crosshair. Is it possible to get the cursor position information on VisionOS to accomplish this? How can I know if something is being hovered on by the eyes?
4
1
674
Mar ’24
Object Capture API Limitation Concerns
Hello, I'm currently building an app that implements the on-device object capture API to create 3D models. I have two concerns that I cannot find addressed anywhere on the internet: Can on-device object capture be performed by devices without LiDAR? I understand that depth data is necessary for making scale-accurate models - if there is an option to disable it, where would one specify that in code? Can models be exported to .obj instead of .usdz? From WWDC2021 at 3:00 it is mentioned that it is possible with the Apple Silicon API but what about with on-device scanning? I would be very grateful if anyone is knowledgeable enough to provide some insight. Thank you so much!
2
0
453
Mar ’24