3D Graphics

RSS for tag

Discuss integrating three-dimensional graphics into your app.

Posts under 3D Graphics tag

106 Posts

Post

Replies

Boosts

Views

Activity

Scene kit View as Sub view
I'm trying to populate scene view inside Table cell (for 3D objects) as a subview. For first view load its working fine but as new child nodes are added/Updated to view that is not happening its remain static(objects are not updating on view). Tried with renderer delegate values of child nodes are updated but on view its not happening we have to switch between different scene then view is loaded properly. How to update or refresh subview continuously ?
1
0
1.4k
Mar ’22
Pass animatable custom parameters to metal shader in RealityKit 2
Hi, In SceneKit I pass custom parameters to a metal shader using a SCNAnimation, for example: let revealAnimation = CABasicAnimation(keyPath: "revealage") revealAnimation.duration =  duration revealAnimation.toValue = toValue let scnRevealAnimation = SCNAnimation(caAnimation: revealAnimation) material.addAnimation(scnRevealAnimation, forKey: "Reveal") How would I do similar to a metal shader in RealityKit? I saw in the Octopus example: //int(params.uniforms().custom_parameter()[0]) But it's commented out and there is no example how to set the custom variable and animate it? (unless I missed it) Great session BTW Thanks
2
0
2k
Mar ’22
Photo Catch to Cinema4D via OBJ
Total newbie here. And I recognize that this isn't strictly a developer question. But it is where Photo Capture lead me. So... We're having trouble with the OBJ files generated by Photo Catch being recognized by Cinema4D. Is anyone having thew same issue? There's not a lot to adjust in Photo Catch so I'm not entirely sure where we would go wrong here. If this isn't the right place for these questions. can you steer me to where I should go? Much obliged!
0
0
519
Feb ’22
MTLDebugCommandBuffer lockPurgeableObjects
I'm using Xcode 13 after recently updating to MacOS Monterey, and only after updating am I getting this error: [MTLDebugCommandBuffer lockPurgeableObjects]:2103: failed assertion `MTLResource 0x14a8a8cc0 (label: null), referenced in cmd buffer 0x149091400 (label: null) is in volatile or empty purgeable state at commit' I haven't changed my code at all between updating to the latest OS, and it worked perfectly before. How can I fix this? I don't think there should be any reason that I can't use a command buffer on a texture resource with a volatile/empty purgeable state.
4
0
3.6k
Jan ’22
MTLDevice.currentAllocatedSize incorrect on late 2014 iMacs
I have two iMacs where MTLDevice.currentAllocatedSize is acting strange--the reported size keeps rising, despite periodically freeing resources to keep under MTLDevice.recommendedMaxWorkingSetSize. The affected iMacs are both late 2014 models running MacOS Big Sur 11.6, one with an AMD Radeon R9 M290X and the other with an AMD Radeon R9 M295X. So far none of our other Macs have shown this behaviour, which suggests this may be an API or driver problem. I do have the option of using my own resource size estimates, but that's likely not as accurate as what the system reports, assuming MTLDevice.currentAllocatedSize is working properly. Any suggestions?
2
0
1.5k
Dec ’21
Error while converting MTLTexture to CVPixelBuffer
I am getting an error from the graphics driver while converting the EnvironmentTexture(from ARKIT.AREnvironmentProbeAnchor) to CVPixelBuffer. The EnvironmentTexture is an IMTLTexture. I am using Xamarin.iOS. This is the code that I use to convert the IMTLTexture to CVPixelBuffer. buffers[i] = new CVPixelBuffer((nint)epAnchor.EnvironmentTexture.Width, (nint)epAnchor.EnvironmentTexture.Height, CVPixelFormatType.CV32RGBA); GetEnvironmentTextureSlice(buffers[i], epAnchor.EnvironmentTexture, i); public void GetEnvironmentTextureSlice(CVPixelBuffer pixelBuffer, Metal.IMTLTexture texture, int id) { Metal.MTLRegion mtlRegion = Metal.MTLRegion.Create2D((nuint)0, 0, 256, 256); nuint bytesPerPixel = 4; nuint bytesPerRow = bytesPerPixel * (nuint)mtlRegion.Size.Width; // (nuint)pixelBuffer.BytesPerRow; nuint bytesPerImage = bytesPerRow * (nuint)mtlRegion.Size.Height; pixelBuffer.Lock(CVPixelBufferLock.None); texture.GetBytes(pixelBuffer.BaseAddress, (nuint)pixelBuffer.BytesPerRow, mtlRegion, 0); pixelBuffer.Unlock(CVPixelBufferLock.None); } The error I am getting from the driver is AGX: Texture read/write assertion failed: bytes_per_row = used_bytes_per_row I tried with different values of pixelBuffer.BytesPerRow but still getting the error. Can someone help me?
1
0
2.2k
Dec ’21
vkCmdDrawIndexedIndirectCount functionality under Metal
Hello, It looks like my previous question was closed without being resolved. https://developer.apple.com/forums/thread/668171 There are FPS values from our new benchmark. Indirect command buffers are not working properly. So there is no way to emulate multi-draw indirect count functionality other than a loop of draw indirect commands. As you can see below, the same hardware is working three times slower under Metal because of it. And Apple M1 performance is worse than AMD integrated graphics performance. We have a buffer with multiple draw commands. How should we render it efficiently under Metal? AMD Vega 56 eGPU: Direct3D12: 94.0 Direct3D11: 87.2 Vulkan: 91.1 Metal: 35.8 AMD Ryzen™ 7 4800H: Direct3D12: 21.1 Direct3D11: 19.4 Vulkan: 20.5 Apple M1: Metal: 16.9 Thank you
9
0
3.3k
Nov ’21
3D point cloud CoreML
Hi guys! I'm studying CoreML converting now. I want to convert a model which deals 3D point cloud data, but I can't make the code that determine input shape. 3d data sets shape depends on the number of points, and that is variable whenever LiDAR gets the 3d data. Is there any way I can do?
0
0
769
Oct ’21
Minimum Hardware requirements for running RealityKit and Photogrammetry
Hi! I'm really excited to try the new ObjectCapture API. I have a iPhone 12 Pro (with the lidar) but have a old MacBook. I'm planning to get a new MacBook to run the RealityKit and Photogrammetry software, as given in this example: https://developer.apple.com/videos/play/wwdc2021/10076/. Are there any restrictions on the Mac hardware or is it fine as long as they support macOS 12.0+ Beta and Xcode 13.0+? Thanks!
4
0
1.9k
Sep ’21
SceneKit 3D rendering limited to 60Hz on the new iPhone 13 Pro?
My app uses SceneKit to do 3D rendering, and on the iPad Pro, it detects the 120Hz screen and lets you pick that as a target frames per second in the settings. All works well. On the iPhone 13 Pro, it can see the screen, and shows the option, but everything seems to be capped at 60Hz regardless of what you set the preferredFramesPerSecond of the SceneView to. Does anybody have an idea what I need to do on the iPhone to get this to work? Thanks!
3
0
2.5k
Sep ’21
Mixing projection types in a scene
I have a 3D scene with a perspective camera and I'd like some of the elements to be projected using an orthographic projection instead. My use case is that I have some 3D elements with attached text nodes. I'd like the text on these nodes to always be the same size no matter how far away the camera is. Is there a way I can use SceneKit to mix and match? Or is there another technique I can use?
0
0
861
Sep ’21
Scene kit View as Sub view
I'm trying to populate scene view inside Table cell (for 3D objects) as a subview. For first view load its working fine but as new child nodes are added/Updated to view that is not happening its remain static(objects are not updating on view). Tried with renderer delegate values of child nodes are updated but on view its not happening we have to switch between different scene then view is loaded properly. How to update or refresh subview continuously ?
Replies
1
Boosts
0
Views
1.4k
Activity
Mar ’22
Pass animatable custom parameters to metal shader in RealityKit 2
Hi, In SceneKit I pass custom parameters to a metal shader using a SCNAnimation, for example: let revealAnimation = CABasicAnimation(keyPath: "revealage") revealAnimation.duration =  duration revealAnimation.toValue = toValue let scnRevealAnimation = SCNAnimation(caAnimation: revealAnimation) material.addAnimation(scnRevealAnimation, forKey: "Reveal") How would I do similar to a metal shader in RealityKit? I saw in the Octopus example: //int(params.uniforms().custom_parameter()[0]) But it's commented out and there is no example how to set the custom variable and animate it? (unless I missed it) Great session BTW Thanks
Replies
2
Boosts
0
Views
2k
Activity
Mar ’22
Photo Catch to Cinema4D via OBJ
Total newbie here. And I recognize that this isn't strictly a developer question. But it is where Photo Capture lead me. So... We're having trouble with the OBJ files generated by Photo Catch being recognized by Cinema4D. Is anyone having thew same issue? There's not a lot to adjust in Photo Catch so I'm not entirely sure where we would go wrong here. If this isn't the right place for these questions. can you steer me to where I should go? Much obliged!
Replies
0
Boosts
0
Views
519
Activity
Feb ’22
Online software for creating 3D assets
Hi there! Does anyone know software (possibly online) for creating 3D assets for inserting them into my project/playground? Thanks
Replies
0
Boosts
0
Views
592
Activity
Feb ’22
MTLDebugCommandBuffer lockPurgeableObjects
I'm using Xcode 13 after recently updating to MacOS Monterey, and only after updating am I getting this error: [MTLDebugCommandBuffer lockPurgeableObjects]:2103: failed assertion `MTLResource 0x14a8a8cc0 (label: null), referenced in cmd buffer 0x149091400 (label: null) is in volatile or empty purgeable state at commit' I haven't changed my code at all between updating to the latest OS, and it worked perfectly before. How can I fix this? I don't think there should be any reason that I can't use a command buffer on a texture resource with a volatile/empty purgeable state.
Replies
4
Boosts
0
Views
3.6k
Activity
Jan ’22
Metal 2 "Multi Indirect Draw"
Is there a way based on Metal 2 to do "Multi Indirect Draw" like DX12 ExecuteIndirect?
Replies
1
Boosts
0
Views
1.9k
Activity
Dec ’21
iPad support for Reality Converter
Will iPad ever receive these tools for object capture? Or at the very least xCode for the ability to use the command line apps for it? I have an M1 iPad Pro that should be able to do all that the M1 Macs can but it’s being held back by software limitations.
Replies
1
Boosts
0
Views
928
Activity
Dec ’21
MTLDevice.currentAllocatedSize incorrect on late 2014 iMacs
I have two iMacs where MTLDevice.currentAllocatedSize is acting strange--the reported size keeps rising, despite periodically freeing resources to keep under MTLDevice.recommendedMaxWorkingSetSize. The affected iMacs are both late 2014 models running MacOS Big Sur 11.6, one with an AMD Radeon R9 M290X and the other with an AMD Radeon R9 M295X. So far none of our other Macs have shown this behaviour, which suggests this may be an API or driver problem. I do have the option of using my own resource size estimates, but that's likely not as accurate as what the system reports, assuming MTLDevice.currentAllocatedSize is working properly. Any suggestions?
Replies
2
Boosts
0
Views
1.5k
Activity
Dec ’21
Error while converting MTLTexture to CVPixelBuffer
I am getting an error from the graphics driver while converting the EnvironmentTexture(from ARKIT.AREnvironmentProbeAnchor) to CVPixelBuffer. The EnvironmentTexture is an IMTLTexture. I am using Xamarin.iOS. This is the code that I use to convert the IMTLTexture to CVPixelBuffer. buffers[i] = new CVPixelBuffer((nint)epAnchor.EnvironmentTexture.Width, (nint)epAnchor.EnvironmentTexture.Height, CVPixelFormatType.CV32RGBA); GetEnvironmentTextureSlice(buffers[i], epAnchor.EnvironmentTexture, i); public void GetEnvironmentTextureSlice(CVPixelBuffer pixelBuffer, Metal.IMTLTexture texture, int id) { Metal.MTLRegion mtlRegion = Metal.MTLRegion.Create2D((nuint)0, 0, 256, 256); nuint bytesPerPixel = 4; nuint bytesPerRow = bytesPerPixel * (nuint)mtlRegion.Size.Width; // (nuint)pixelBuffer.BytesPerRow; nuint bytesPerImage = bytesPerRow * (nuint)mtlRegion.Size.Height; pixelBuffer.Lock(CVPixelBufferLock.None); texture.GetBytes(pixelBuffer.BaseAddress, (nuint)pixelBuffer.BytesPerRow, mtlRegion, 0); pixelBuffer.Unlock(CVPixelBufferLock.None); } The error I am getting from the driver is AGX: Texture read/write assertion failed: bytes_per_row = used_bytes_per_row I tried with different values of pixelBuffer.BytesPerRow but still getting the error. Can someone help me?
Replies
1
Boosts
0
Views
2.2k
Activity
Dec ’21
3D object on websites
I want to put on 3D object on websites, but I don’t know how to do. It doesn’t explain AR such as Apple’s product page. It explain like top page’s earth of github.com. In short, I want to put 3D object without page-jumping. This question is maybe not adopted here -apple developer forum-, however I want someone to answer this.
Replies
2
Boosts
0
Views
1.5k
Activity
Nov ’21
Unable to build the sample code for WWDC RealityKit 2 session
Hi I'm trying to become familiar with RealityKit 2. I'm trying to build the code in the session, but I'm getting compile errors. Any advice? Link to the sample code below https://developer.apple.com/documentation/realitykit/building_an_immersive_experience_with_realitykit
Replies
3
Boosts
0
Views
1.8k
Activity
Nov ’21
vkCmdDrawIndexedIndirectCount functionality under Metal
Hello, It looks like my previous question was closed without being resolved. https://developer.apple.com/forums/thread/668171 There are FPS values from our new benchmark. Indirect command buffers are not working properly. So there is no way to emulate multi-draw indirect count functionality other than a loop of draw indirect commands. As you can see below, the same hardware is working three times slower under Metal because of it. And Apple M1 performance is worse than AMD integrated graphics performance. We have a buffer with multiple draw commands. How should we render it efficiently under Metal? AMD Vega 56 eGPU: Direct3D12: 94.0 Direct3D11: 87.2 Vulkan: 91.1 Metal: 35.8 AMD Ryzen™ 7 4800H: Direct3D12: 21.1 Direct3D11: 19.4 Vulkan: 20.5 Apple M1: Metal: 16.9 Thank you
Replies
9
Boosts
0
Views
3.3k
Activity
Nov ’21
Triangle Intersection in 3D Space
I have two triangels (T1,T2) and their vertecies. I want to know the line at which the triangles intersect. For the vertecies I use SIMD3. It would be great if someone could help me with my problem.
Replies
9
Boosts
0
Views
2.1k
Activity
Nov ’21
How to create a 3d human model on iphone?
As the title says, I want to create a 3D human model, is there some API for me to use
Replies
1
Boosts
0
Views
1.1k
Activity
Nov ’21
re hellophotogrammetry sample app file format
Has anyone worked out how to create OBJ files instead of USDZ?
Replies
0
Boosts
0
Views
701
Activity
Nov ’21
3D point cloud CoreML
Hi guys! I'm studying CoreML converting now. I want to convert a model which deals 3D point cloud data, but I can't make the code that determine input shape. 3d data sets shape depends on the number of points, and that is variable whenever LiDAR gets the 3d data. Is there any way I can do?
Replies
0
Boosts
0
Views
769
Activity
Oct ’21
Minimum Hardware requirements for running RealityKit and Photogrammetry
Hi! I'm really excited to try the new ObjectCapture API. I have a iPhone 12 Pro (with the lidar) but have a old MacBook. I'm planning to get a new MacBook to run the RealityKit and Photogrammetry software, as given in this example: https://developer.apple.com/videos/play/wwdc2021/10076/. Are there any restrictions on the Mac hardware or is it fine as long as they support macOS 12.0+ Beta and Xcode 13.0+? Thanks!
Replies
4
Boosts
0
Views
1.9k
Activity
Sep ’21
SceneKit 3D rendering limited to 60Hz on the new iPhone 13 Pro?
My app uses SceneKit to do 3D rendering, and on the iPad Pro, it detects the 120Hz screen and lets you pick that as a target frames per second in the settings. All works well. On the iPhone 13 Pro, it can see the screen, and shows the option, but everything seems to be capped at 60Hz regardless of what you set the preferredFramesPerSecond of the SceneView to. Does anybody have an idea what I need to do on the iPhone to get this to work? Thanks!
Replies
3
Boosts
0
Views
2.5k
Activity
Sep ’21
Cannot find type 'PhotogrammetrySession' in scope
I'm on Mac OS 12 (Monterey) and Xcode 13 but it still get the error "Cannot find type 'PhotogrammetrySession' in scope" I tried restarting Xcode, tried restarting the Mac. But I still get the error. I have imported "RealityKit". I'm trying to run the HelloPhotogrammetry code provided by Apple.
Replies
1
Boosts
0
Views
1.3k
Activity
Sep ’21
Mixing projection types in a scene
I have a 3D scene with a perspective camera and I'd like some of the elements to be projected using an orthographic projection instead. My use case is that I have some 3D elements with attached text nodes. I'd like the text on these nodes to always be the same size no matter how far away the camera is. Is there a way I can use SceneKit to mix and match? Or is there another technique I can use?
Replies
0
Boosts
0
Views
861
Activity
Sep ’21