3D Graphics

RSS for tag

Discuss integrating three-dimensional graphics into your app.

Posts under 3D Graphics tag

97 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.5k
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
2.1k
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
594
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.9k
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.7k
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.5k
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.5k
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
840
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
2k
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.5k
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
2.1k
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
594
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
663
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.9k
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
2k
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
1k
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.7k
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.5k
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.7k
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.9k
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.5k
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.3k
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.2k
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
771
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
840
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
2k
Activity
Sep ’21