SceneKit

RSS for tag

Create 3D games and add 3D content to apps using high-level scene descriptions using SceneKit.

SceneKit Documentation

Posts under SceneKit subtopic

Post

Replies

Boosts

Views

Activity

Ho to get worldpoint in SCNView
I'm new to SceneKit and I'm facing a major problem, when you tap a model of SCNGeometry, how to get the world coordinate of it? Or you can say how to convert the top coordinate to world coordinate. It seems that SCNView dose provide such a method, I just didn't find it. So, can anyone help me with it? Thanks very much.
1
0
568
Oct ’22
How to gen vertex position in SCNGeometry and how to modify it?
Recently I was tring to develop mesh deformation in swift. The default mesh structure is SCNGeometry. I can build a model and render it. But for an imported model, it seems that there is no way to extract vertex position from it. So, is there a way to get vertex position from it, and i want to modifiy it as well. Can anyone help me with it? Thanks very much.
0
1
517
Oct ’22
Recreating RoomPlan from CapturedRoom.walls with SceneKit
I am trying to use RoomPlan to create a rendering of a room without any objects inside. To do this I'm taking the list of walls given by CapturedRoom.walls and creating a series of SCNNodes using the information given. This way I can modify the room at-will in the app. However, the walls are showing up in random places? Not sure where I am going wrong: //roomScan is a CapturedRoom object, scene is an SCNScene for i in 0...(roomScan.walls.endIndex-1) { //Generate new wall geometry let scannedWall = roomScan.walls[i] let length = scannedWall.dimensions.x let width = 0.2 let height = scannedWall.dimensions.y let newWall = SCNBox( width: CGFloat(width), height: CGFloat(height), length: CGFloat(length), chamferRadius: 0 ) newWall.firstMaterial?.diffuse.contents = UIColor.white newWall.firstMaterial?.transparency = 0.5 //Generate new SCNNode let newNode = SCNNode(geometry: newWall) newNode.simdTransform = scannedWall.transform scene.rootNode.addChildNode(newNode) }
2
0
1.6k
Oct ’22
Can SceneKit be used with RoomPlan
We have an App that does something similar to RoomPlan. We use SceneKit to draw all the wall lines. We have noticed that RoomPlan has trouble detecting walls around 7 inches or shorter. Our app has tools to deal with this. It seems the difference in time to capture the walls of a room between our app and the RoomPlan demo app is negligible. But we could save time in our app with auto detection of all the other things like windows, doors, openings, cabinets, etc. Are the lines you see drawn in the RoomPlan demo App SCNNodes? If so will you ever be able to call .addNode() inside the RoomPlan framework? If not, does RoomPlan use SpriteKit to draw? We use an ARSCNView to keep track of all the lines in our app. Changing that member to an instance of RoomCaptureView seems like a non starter. Starting a new RoomCaptureSession when we're ready to scan for objects other than walls wipes all the wall lines we've previously captured. Thanks, Mike
6
0
3.3k
Sep ’22
SCNTechnique stencil buffer - how to read from it?
Desired outcome:Draw a silhouette / outline / edge of constant width around meshes of different shapes in SceneKit. I'm only going for the outer silhouette, and not interested in the inside edges. Eventually, I would like to have the outline only so that and have the inside area of the mesh be either discarded or transparent. I figured that using the stencil buffer may achieve the right look.What I tried:I had success making an SCNTechnique where the first pass scales up the mesh and makes every fragment and constant color, then the second renders it at regular size.Then tried writing to a stencil at regular size, then reading from the stencil buffer in the second (scaled up) pass, so that ONLY the outline would be visible. I can't seem to get this to work. I may not have the right "stencilStates" dictionary, though it is hard to know what is wrong, as I can't generate any different visual feedback or errors when trying differnent keys + values. I thought that by clearing the stencil buffer (all 0's), then replacing with 1's ones during the first pass, then reading anything is "notEqual" to 1 would give me just the outline. However I can't seem to stencil out any part of the second pass.Here is a playground where I've replicated what I tried: https://github.com/mackhowell/scenekit-outline-shader-scntechnique/tree/stencil-test. (The linked branch "stencil-test" is where I've documented this issue.)And here is my SCNTechnique dictionary:let stencilPass: [String: Any] = [ "program": "outline", "inputs": [ "a_vertex": "position-symbol", "modelViewProjection": "mvpt-symbol", ], "outputs": [ "stencil": "COLOR" ], "draw": "DRAW_NODE", "stencilStates": [ "enable": true, "clear": true, "behavior": [ "depthFail": "keep", "fail": "keep", "pass": "replace", "function": "always", "referenceValue": 1 ] ] ] let embiggenPass: [String: Any] = [ "program": "embiggen", "inputs": [ "a_vertex": "position-symbol", "modelTransform": "mt-symbol", "viewTransform": "vt-symbol", "projectionTransform": "pt-symbol", ], "outputs": [ "color": "COLOR" ], "draw": "DRAW_NODE", "stencilStates": [ "behavior": [ "depthFail": "keep", "fail": "keep", "pass": "keep", "function": "notEqual", "referenceValue": 1 ] ] ] let technique: [String: Any] = [ "passes": [ "embiggen": embiggenPass, "stencil": stencilPass ], "sequence": [ "stencil", "embiggen" ], "symbols": [ "position-symbol": ["semantic": "vertex"], "mvpt-symbol": ["semantic": "modelViewProjectionTransform"], "mt-symbol": ["semantic": "modelTransform"], "vt-symbol": ["semantic": "viewTransform"], "pt-symbol": ["semantic": "projectionTransform"], ] ]Thanks!
1
0
1.4k
Sep ’22
Sledge with SceneKit Physics
How can you make a physics object that can be pushed back and forth in one direction but not to the sides? There should be a high static friction to the sides for example for a sledge, skis, a simplified car or rail cart. You can somehow achieve a similar result by using SCNPhysicsVehicle, but it is only satisfying when you are using it on a flat surface. On a slope the wheels will always slowly slip to the sides. You can reduce this by using extreme values for friction and braking power but this will cause other issues. Also with SCNPhysicsVehicle the automatic resting is not functional.
0
0
906
Sep ’22
SCNView shows pale textures
Hi guys,I am creating MTL Textures from CIImages. Everything is sRGB, but when it shows up in Scene Kit it looks white too pale, like the data is used as RGB.I am using no lights nothing in the scene, it's purely a scene with SCNPlanes having the textures as diffuse material and a camera that is it. No lights nothing.Any Ideas what I can do to get a normal representation?(Below a picture of the CIImage in the small window and in SCNViewAll the bestChristoph
4
0
2.5k
Sep ’22
Interact with USDZ parts
Hello, I have a USDZ file placed in a SceneView, and I am searching for a way to interact with parts of that USDZ inside my app. For example, I have a person made up of 6 parts (arm_right, arm_left, leg_left, leg_right, body and head) and I would like to select arm_left and see its width. How can I achieve this inside my app?
1
0
1.4k
Aug ’22
Execution of the command buffer was aborted due to an error during execution. Too much geometry to support memoryless render pass attachments.
Hi Folks This error appeared when I switched to using a M1 ultra MacStudio. It therefore appears to be an issue with unified memory - since the existing code involvesI 'blitting' between CPU and GPU. I need only update the MTLBuffer when needed (which is not very often). This does not appear to be a problem caused in that way. There are many nodes in the scene graph, but the problem does not appear until I zoom down into the point cloud [when you can see relatively few 'spheres' that represent the point cloud. So it does not appear to be a problem related to too many nodes. It would help of course if I could localise where and when the problem began to appear, for the code works normally until this happens, but then of course, it loops and so I must terminate the process, and start again. I would appreciate any help on offer. The error loop repeats these messages over and over again until I cause the program to quit [using Xcode 13.4.1]. 2022-07-22 09:44:02.882746+1000 #####[13703:1234861] Execution of the command buffer was aborted due to an error during execution. Too much geometry to support memoryless render pass attachments. (0000000d:kIOGPUCommandBufferCallbackErrorOutOfMemoryForParameterBuffer) 2022-07-22 09:44:02.882818+1000 #####[13703:1234861] Execution of the command buffer was aborted due to an error during execution. Too much geometry to support memoryless render pass attachments. (0000000d:kIOGPUCommandBufferCallbackErrorOutOfMemoryForParameterBuffer) 2022-07-22 09:44:02.882875+1000 #####[13703:1234861] [SceneKit] Error: Main command buffer execution failed with status 5, error: Error Domain=MTLCommandBufferErrorDomain Code=10 "Too much geometry to support memoryless render pass attachments. (0000000d:kIOGPUCommandBufferCallbackErrorOutOfMemoryForParameterBuffer)" UserInfo={NSLocalizedDescription=Too much geometry to support memoryless render pass attachments. (0000000d:kIOGPUCommandBufferCallbackErrorOutOfMemoryForParameterBuffer)}
9
0
2.5k
Aug ’22
How to synchronize color frame and overlay ar objects...
Hello everyone, I 'm doing a AR Medical Solution project. and have some questions. We can get depth frame, color frame, camera transform matrix and camera projection matrix per every frame. For my comfort, I render on scnview using camera matrix and projection matrix. At a point I want to render simutaneously refresh color frame and camera matrices belonging to one frame, but it wasn't. maybe drawcalls be conducted different times It's my code and can you advice for me? scnview.delegate = self ... @MainActor func renderer(_: SCNSceneRenderer,                didRenderScene _: SCNScene,                atTime _: TimeInterval)   {     if let camTransform = lastFrame.camTransform,       let camProjection = lastFrame.camProjection,       let colorFrame = lastFrame.colorFrame     {       mars.updateCamera(cameraPose: camTransform,                cameraGLProjection: camProjection) // update camera transforms at scenekit       render(colorFrame: colorFrame)     }   }    func render(colorFrame: STColorFrame) {     let buffer = CMSampleBufferGetImageBuffer(colorFrame.sampleBuffer)!           convertVideoFrameToImage(buffer) // ycbcr buffer to rgba image texture by metal computing shader     scnview.scene?.background.contents = outTexture   }
0
0
613
Jul ’22
Are subdivision surfaces broken in SceneKit?
In Xcode, create open a new Scene graph and open it in the SceneKit editor. Go to Editor > Create > Geometry > Box. Open the Attributes Inspector and set the Subdivision level to 1, and enable Tessellation (optional). I'd expect to see a chamfered cube, but instead there are gaps in the corners. Is there a way to fix this?
1
0
658
Jun ’22
Node becomes invisible when moving the camera
Hi, I'm making an app to render glb models with scenekit (using this library https://github.com/warrenm/GLTFKit2). Everything works great, but some nodes become invisible when moving the camera (this usually happens after performing a SCNAnimation). I know that in BabylonJS there is a an option to make a node always active (and shortcut the frustum clipping phase). See this post: https://forum.babylonjs.com/t/models-become-non-visible-when-moving-around/20949. I would like to know if there is a similar option in Scenekit or any solution to my problem. Here is a video of the problem: https://drive.google.com/file/d/1eUsiUk5dEcV72GhB-nHk9rKTF6dQttei/view?usp=sharing Thanks!
1
0
590
Jun ’22
So, is SceneKit dead?
Unlike pervious years, there are no sessions, or anything, for SceneKit.Are we supposed to go to Unity and (ugh) C#?Was there some sort of fallout with the SceneKit group?Was it written in Obj-C so it's a forgotten stepchild?Is Apple only interested in USDZ support?Reality Composer seems like a rudimentary editor for iPad and iPhone.No new features or editor improvements. Seems like it's been dropped in the hold with OpenGL.There's been time invested. Apple, guidance please?
16
0
16k
Jun ’22
enumerateChildNodes
I'm trying to optimize the draw calls in an existing scene with flattenedClone(). From what I can tell enumerateChildNodes would be a good way to go through the scene tree and add the nodes to be flattened to a parent node. I saw something like this in a tutorial but it is saying that 'withName' is an extra argument. gameScene.rootNode.enumerateChildNodes(withName: "//*"){ (node, stop) in   if (node.name == "Large Tree"){         flattenParent.addChildNode(node)         node.removeFromParentNode()    }          } any guidance on this usage? Also would a switch statement or multiple || be optimal when searching through several different mesh nodes?
3
0
1.1k
Jun ’22
Ho to get worldpoint in SCNView
I'm new to SceneKit and I'm facing a major problem, when you tap a model of SCNGeometry, how to get the world coordinate of it? Or you can say how to convert the top coordinate to world coordinate. It seems that SCNView dose provide such a method, I just didn't find it. So, can anyone help me with it? Thanks very much.
Replies
1
Boosts
0
Views
568
Activity
Oct ’22
How to gen vertex position in SCNGeometry and how to modify it?
Recently I was tring to develop mesh deformation in swift. The default mesh structure is SCNGeometry. I can build a model and render it. But for an imported model, it seems that there is no way to extract vertex position from it. So, is there a way to get vertex position from it, and i want to modifiy it as well. Can anyone help me with it? Thanks very much.
Replies
0
Boosts
1
Views
517
Activity
Oct ’22
Recreating RoomPlan from CapturedRoom.walls with SceneKit
I am trying to use RoomPlan to create a rendering of a room without any objects inside. To do this I'm taking the list of walls given by CapturedRoom.walls and creating a series of SCNNodes using the information given. This way I can modify the room at-will in the app. However, the walls are showing up in random places? Not sure where I am going wrong: //roomScan is a CapturedRoom object, scene is an SCNScene for i in 0...(roomScan.walls.endIndex-1) { //Generate new wall geometry let scannedWall = roomScan.walls[i] let length = scannedWall.dimensions.x let width = 0.2 let height = scannedWall.dimensions.y let newWall = SCNBox( width: CGFloat(width), height: CGFloat(height), length: CGFloat(length), chamferRadius: 0 ) newWall.firstMaterial?.diffuse.contents = UIColor.white newWall.firstMaterial?.transparency = 0.5 //Generate new SCNNode let newNode = SCNNode(geometry: newWall) newNode.simdTransform = scannedWall.transform scene.rootNode.addChildNode(newNode) }
Replies
2
Boosts
0
Views
1.6k
Activity
Oct ’22
Can SceneKit be used with RoomPlan
We have an App that does something similar to RoomPlan. We use SceneKit to draw all the wall lines. We have noticed that RoomPlan has trouble detecting walls around 7 inches or shorter. Our app has tools to deal with this. It seems the difference in time to capture the walls of a room between our app and the RoomPlan demo app is negligible. But we could save time in our app with auto detection of all the other things like windows, doors, openings, cabinets, etc. Are the lines you see drawn in the RoomPlan demo App SCNNodes? If so will you ever be able to call .addNode() inside the RoomPlan framework? If not, does RoomPlan use SpriteKit to draw? We use an ARSCNView to keep track of all the lines in our app. Changing that member to an instance of RoomCaptureView seems like a non starter. Starting a new RoomCaptureSession when we're ready to scan for objects other than walls wipes all the wall lines we've previously captured. Thanks, Mike
Replies
6
Boosts
0
Views
3.3k
Activity
Sep ’22
SCNTechnique stencil buffer - how to read from it?
Desired outcome:Draw a silhouette / outline / edge of constant width around meshes of different shapes in SceneKit. I'm only going for the outer silhouette, and not interested in the inside edges. Eventually, I would like to have the outline only so that and have the inside area of the mesh be either discarded or transparent. I figured that using the stencil buffer may achieve the right look.What I tried:I had success making an SCNTechnique where the first pass scales up the mesh and makes every fragment and constant color, then the second renders it at regular size.Then tried writing to a stencil at regular size, then reading from the stencil buffer in the second (scaled up) pass, so that ONLY the outline would be visible. I can't seem to get this to work. I may not have the right "stencilStates" dictionary, though it is hard to know what is wrong, as I can't generate any different visual feedback or errors when trying differnent keys + values. I thought that by clearing the stencil buffer (all 0's), then replacing with 1's ones during the first pass, then reading anything is "notEqual" to 1 would give me just the outline. However I can't seem to stencil out any part of the second pass.Here is a playground where I've replicated what I tried: https://github.com/mackhowell/scenekit-outline-shader-scntechnique/tree/stencil-test. (The linked branch "stencil-test" is where I've documented this issue.)And here is my SCNTechnique dictionary:let stencilPass: [String: Any] = [ "program": "outline", "inputs": [ "a_vertex": "position-symbol", "modelViewProjection": "mvpt-symbol", ], "outputs": [ "stencil": "COLOR" ], "draw": "DRAW_NODE", "stencilStates": [ "enable": true, "clear": true, "behavior": [ "depthFail": "keep", "fail": "keep", "pass": "replace", "function": "always", "referenceValue": 1 ] ] ] let embiggenPass: [String: Any] = [ "program": "embiggen", "inputs": [ "a_vertex": "position-symbol", "modelTransform": "mt-symbol", "viewTransform": "vt-symbol", "projectionTransform": "pt-symbol", ], "outputs": [ "color": "COLOR" ], "draw": "DRAW_NODE", "stencilStates": [ "behavior": [ "depthFail": "keep", "fail": "keep", "pass": "keep", "function": "notEqual", "referenceValue": 1 ] ] ] let technique: [String: Any] = [ "passes": [ "embiggen": embiggenPass, "stencil": stencilPass ], "sequence": [ "stencil", "embiggen" ], "symbols": [ "position-symbol": ["semantic": "vertex"], "mvpt-symbol": ["semantic": "modelViewProjectionTransform"], "mt-symbol": ["semantic": "modelTransform"], "vt-symbol": ["semantic": "viewTransform"], "pt-symbol": ["semantic": "projectionTransform"], ] ]Thanks!
Replies
1
Boosts
0
Views
1.4k
Activity
Sep ’22
Sledge with SceneKit Physics
How can you make a physics object that can be pushed back and forth in one direction but not to the sides? There should be a high static friction to the sides for example for a sledge, skis, a simplified car or rail cart. You can somehow achieve a similar result by using SCNPhysicsVehicle, but it is only satisfying when you are using it on a flat surface. On a slope the wheels will always slowly slip to the sides. You can reduce this by using extreme values for friction and braking power but this will cause other issues. Also with SCNPhysicsVehicle the automatic resting is not functional.
Replies
0
Boosts
0
Views
906
Activity
Sep ’22
SCNView shows pale textures
Hi guys,I am creating MTL Textures from CIImages. Everything is sRGB, but when it shows up in Scene Kit it looks white too pale, like the data is used as RGB.I am using no lights nothing in the scene, it's purely a scene with SCNPlanes having the textures as diffuse material and a camera that is it. No lights nothing.Any Ideas what I can do to get a normal representation?(Below a picture of the CIImage in the small window and in SCNViewAll the bestChristoph
Replies
4
Boosts
0
Views
2.5k
Activity
Sep ’22
Interact with USDZ parts
Hello, I have a USDZ file placed in a SceneView, and I am searching for a way to interact with parts of that USDZ inside my app. For example, I have a person made up of 6 parts (arm_right, arm_left, leg_left, leg_right, body and head) and I would like to select arm_left and see its width. How can I achieve this inside my app?
Replies
1
Boosts
0
Views
1.4k
Activity
Aug ’22
Execution of the command buffer was aborted due to an error during execution. Too much geometry to support memoryless render pass attachments.
Hi Folks This error appeared when I switched to using a M1 ultra MacStudio. It therefore appears to be an issue with unified memory - since the existing code involvesI 'blitting' between CPU and GPU. I need only update the MTLBuffer when needed (which is not very often). This does not appear to be a problem caused in that way. There are many nodes in the scene graph, but the problem does not appear until I zoom down into the point cloud [when you can see relatively few 'spheres' that represent the point cloud. So it does not appear to be a problem related to too many nodes. It would help of course if I could localise where and when the problem began to appear, for the code works normally until this happens, but then of course, it loops and so I must terminate the process, and start again. I would appreciate any help on offer. The error loop repeats these messages over and over again until I cause the program to quit [using Xcode 13.4.1]. 2022-07-22 09:44:02.882746+1000 #####[13703:1234861] Execution of the command buffer was aborted due to an error during execution. Too much geometry to support memoryless render pass attachments. (0000000d:kIOGPUCommandBufferCallbackErrorOutOfMemoryForParameterBuffer) 2022-07-22 09:44:02.882818+1000 #####[13703:1234861] Execution of the command buffer was aborted due to an error during execution. Too much geometry to support memoryless render pass attachments. (0000000d:kIOGPUCommandBufferCallbackErrorOutOfMemoryForParameterBuffer) 2022-07-22 09:44:02.882875+1000 #####[13703:1234861] [SceneKit] Error: Main command buffer execution failed with status 5, error: Error Domain=MTLCommandBufferErrorDomain Code=10 "Too much geometry to support memoryless render pass attachments. (0000000d:kIOGPUCommandBufferCallbackErrorOutOfMemoryForParameterBuffer)" UserInfo={NSLocalizedDescription=Too much geometry to support memoryless render pass attachments. (0000000d:kIOGPUCommandBufferCallbackErrorOutOfMemoryForParameterBuffer)}
Replies
9
Boosts
0
Views
2.5k
Activity
Aug ’22
Proper way to convert DAE file to SCN asset
I must be missing something obvious with this one, but what is the proper method to import a DAE model file and convert it to an SCN file? Any help is appreciated.
Replies
3
Boosts
0
Views
9.1k
Activity
Aug ’22
Is there a way to synchronize the current seconds of SCNAnimation for multiple USDZs?
I think SCNAnimation does not have a property or method to set/get the current time of the animation. Therefore, I do not know how to synchronize the SCNAnimation of multiple USDZs. If anyone knows anything about this, please let me know.
Replies
0
Boosts
0
Views
419
Activity
Jul ’22
How to synchronize color frame and overlay ar objects...
Hello everyone, I 'm doing a AR Medical Solution project. and have some questions. We can get depth frame, color frame, camera transform matrix and camera projection matrix per every frame. For my comfort, I render on scnview using camera matrix and projection matrix. At a point I want to render simutaneously refresh color frame and camera matrices belonging to one frame, but it wasn't. maybe drawcalls be conducted different times It's my code and can you advice for me? scnview.delegate = self ... @MainActor func renderer(_: SCNSceneRenderer,                didRenderScene _: SCNScene,                atTime _: TimeInterval)   {     if let camTransform = lastFrame.camTransform,       let camProjection = lastFrame.camProjection,       let colorFrame = lastFrame.colorFrame     {       mars.updateCamera(cameraPose: camTransform,                cameraGLProjection: camProjection) // update camera transforms at scenekit       render(colorFrame: colorFrame)     }   }    func render(colorFrame: STColorFrame) {     let buffer = CMSampleBufferGetImageBuffer(colorFrame.sampleBuffer)!           convertVideoFrameToImage(buffer) // ycbcr buffer to rgba image texture by metal computing shader     scnview.scene?.background.contents = outTexture   }
Replies
0
Boosts
0
Views
613
Activity
Jul ’22
Xcode crash when importing Collada file
Drag a .dae file into Xcode project. Select the file in the project navigator. Xcode crashes.
Replies
8
Boosts
0
Views
2.8k
Activity
Jul ’22
Convert dae to scn at runtime in iOS
Is there a utility to convert Colada (dae) files to SceneKit Scene files (scn) at run-time in iOS. If not, is there a utility that converts a dae file into a scn file in MacOS for users who do not have XCode.
Replies
3
Boosts
0
Views
3.2k
Activity
Jul ’22
Are subdivision surfaces broken in SceneKit?
In Xcode, create open a new Scene graph and open it in the SceneKit editor. Go to Editor > Create > Geometry > Box. Open the Attributes Inspector and set the Subdivision level to 1, and enable Tessellation (optional). I'd expect to see a chamfered cube, but instead there are gaps in the corners. Is there a way to fix this?
Replies
1
Boosts
0
Views
658
Activity
Jun ’22
Node becomes invisible when moving the camera
Hi, I'm making an app to render glb models with scenekit (using this library https://github.com/warrenm/GLTFKit2). Everything works great, but some nodes become invisible when moving the camera (this usually happens after performing a SCNAnimation). I know that in BabylonJS there is a an option to make a node always active (and shortcut the frustum clipping phase). See this post: https://forum.babylonjs.com/t/models-become-non-visible-when-moving-around/20949. I would like to know if there is a similar option in Scenekit or any solution to my problem. Here is a video of the problem: https://drive.google.com/file/d/1eUsiUk5dEcV72GhB-nHk9rKTF6dQttei/view?usp=sharing Thanks!
Replies
1
Boosts
0
Views
590
Activity
Jun ’22
Custom clipping planes in SceneKit
Is it possible to use custom clipping in SceneKit? Meaning, can I somehow enable "GL_CLIP_DISTANCE0" and write to "gl_ClipDistance" in the fragment shader? Or do I have to provide my own renderer via the renderer delegate?
Replies
1
Boosts
0
Views
906
Activity
Jun ’22
SceneKit particle template xcode 11
Looks like the particle system for scenekit is not available as a template anymore in xcode 11. I can only see the SpriteKit version. Is this by design or a mistake, or is there another way to create one?
Replies
4
Boosts
0
Views
6.2k
Activity
Jun ’22
So, is SceneKit dead?
Unlike pervious years, there are no sessions, or anything, for SceneKit.Are we supposed to go to Unity and (ugh) C#?Was there some sort of fallout with the SceneKit group?Was it written in Obj-C so it's a forgotten stepchild?Is Apple only interested in USDZ support?Reality Composer seems like a rudimentary editor for iPad and iPhone.No new features or editor improvements. Seems like it's been dropped in the hold with OpenGL.There's been time invested. Apple, guidance please?
Replies
16
Boosts
0
Views
16k
Activity
Jun ’22
enumerateChildNodes
I'm trying to optimize the draw calls in an existing scene with flattenedClone(). From what I can tell enumerateChildNodes would be a good way to go through the scene tree and add the nodes to be flattened to a parent node. I saw something like this in a tutorial but it is saying that 'withName' is an extra argument. gameScene.rootNode.enumerateChildNodes(withName: "//*"){ (node, stop) in   if (node.name == "Large Tree"){         flattenParent.addChildNode(node)         node.removeFromParentNode()    }          } any guidance on this usage? Also would a switch statement or multiple || be optimal when searching through several different mesh nodes?
Replies
3
Boosts
0
Views
1.1k
Activity
Jun ’22