scenekit

Is there a way to draw a SCNNode always in front of others?

会有一股神秘感。 提交于 2021-02-07 02:48:52
问题 I've been trying to make a scene with scene kit in which an specified object is always in front of others, despite the fact that it's actually behind the other objects. A similar effect to this used in blender. Apparently, blender uses GUI and a lot of math to transform otherwise 2D objects, but I need this effect in a SCNNode with a SCNGeometry, in other words, a 3D object currently locate in the scene. I considered using category masks, but after reading Apple's documentation I've realized

Is there a way to draw a SCNNode always in front of others?

天涯浪子 提交于 2021-02-07 02:48:30
问题 I've been trying to make a scene with scene kit in which an specified object is always in front of others, despite the fact that it's actually behind the other objects. A similar effect to this used in blender. Apparently, blender uses GUI and a lot of math to transform otherwise 2D objects, but I need this effect in a SCNNode with a SCNGeometry, in other words, a 3D object currently locate in the scene. I considered using category masks, but after reading Apple's documentation I've realized

Occlusion Material or Hold-Out Shader in ARKit and SceneKit

拜拜、爱过 提交于 2021-02-06 12:30:41
问题 I have seen some examples demo of ARKit where material A is blocking material B, kind of creating occlusion effect, or black hole, or masking. But all of them seems to be using Unity engine (I might be wrong). I wanted to do this using what Apple provide already. Or maybe using Metal Shader. Wondering if anyone knows a trick that allows this for ARKit or even in SceneKit term, when 2 objects are overlapping, but wanting one object to occlude the other object, leaving the other object empty.

Occlusion Material or Hold-Out Shader in ARKit and SceneKit

断了今生、忘了曾经 提交于 2021-02-06 12:29:51
问题 I have seen some examples demo of ARKit where material A is blocking material B, kind of creating occlusion effect, or black hole, or masking. But all of them seems to be using Unity engine (I might be wrong). I wanted to do this using what Apple provide already. Or maybe using Metal Shader. Wondering if anyone knows a trick that allows this for ARKit or even in SceneKit term, when 2 objects are overlapping, but wanting one object to occlude the other object, leaving the other object empty.

How to draw dashed line in ARKit (SceneKit) like in the Measure app?

旧时模样 提交于 2021-02-05 05:07:39
问题 Just wanted to know is it possible (I know it is, but how) to draw dashed line in ARSCNView like in the Measure app? Maybe there is a way to use scene nodes out of the box, idk. I've been using the SCNCylinder to draw a straight line and IDK is it possible to reuse it and adjust or we have to use a really different way to make the dashed line. import SceneKit class CylinderLineNode: SCNNode { private(set) var cylinder: SCNCylinder private(set) var positionA: SCNVector3 private(set) var

How to draw dashed line in ARKit (SceneKit) like in the Measure app?

时间秒杀一切 提交于 2021-02-05 05:00:24
问题 Just wanted to know is it possible (I know it is, but how) to draw dashed line in ARSCNView like in the Measure app? Maybe there is a way to use scene nodes out of the box, idk. I've been using the SCNCylinder to draw a straight line and IDK is it possible to reuse it and adjust or we have to use a really different way to make the dashed line. import SceneKit class CylinderLineNode: SCNNode { private(set) var cylinder: SCNCylinder private(set) var positionA: SCNVector3 private(set) var

How to draw dashed line in ARKit (SceneKit) like in the Measure app?

蹲街弑〆低调 提交于 2021-02-05 04:59:06
问题 Just wanted to know is it possible (I know it is, but how) to draw dashed line in ARSCNView like in the Measure app? Maybe there is a way to use scene nodes out of the box, idk. I've been using the SCNCylinder to draw a straight line and IDK is it possible to reuse it and adjust or we have to use a really different way to make the dashed line. import SceneKit class CylinderLineNode: SCNNode { private(set) var cylinder: SCNCylinder private(set) var positionA: SCNVector3 private(set) var

SceneKit – Concave collision box

Deadly 提交于 2021-01-29 03:09:58
问题 Im importing an object in DAE format and I'm wanting to use it as a collision object however it is concave, but I'm having trouble implementing this in code: func addCollisionBox() { let collisionBoxNode = SCNNode() let collisionBox = importedCollisionBox.rootNode.childNodeWithName("pCube2", recursively: false) collisionBoxNode.addChildNode(collisionBox!) collisionBoxNode.position = SCNVector3Make(0, 0, 0) collisionBoxNode.scale = SCNVector3Make(30, 20, 50) //collisionBoxNode.physicsBody =

ARKit – Pivot Point of 3D model is wrong

时间秒杀一切 提交于 2021-01-29 00:44:44
问题 I´m using Blender to export my models to dae and Xcode to import it to scn . But my problem is that the pivot point is totally wrong placed when I use it in my scene. The strange thing is that the pivot point is positioned right in the model viewer from SceneKit (even as scn ). The World Coordinates are all zeroed. 回答1: Group all the elements of your 3D model in Blender and move your pivot point for that group at a desired place. SceneKit always reads in a position of pivot point in 99.99%

ARKit – Pivot Point of 3D model is wrong

两盒软妹~` 提交于 2021-01-29 00:41:36
问题 I´m using Blender to export my models to dae and Xcode to import it to scn . But my problem is that the pivot point is totally wrong placed when I use it in my scene. The strange thing is that the pivot point is positioned right in the model viewer from SceneKit (even as scn ). The World Coordinates are all zeroed. 回答1: Group all the elements of your 3D model in Blender and move your pivot point for that group at a desired place. SceneKit always reads in a position of pivot point in 99.99%