Questions tagged [scnnode]

SCNNode is a part of the SceneKit Framework. An SCNNode object represents a portion of a scene graph.

SCNNode is a part of the SceneKit Framework. An SCNNode object represents a portion of a scene graph. A node by itself has no visible content when the scene containing it is rendered—it represents only a position in space (and transformation of coordinate spaces) relative to its parent node. To construct a scene, you use a hierarchy of nodes to create its structure, then add lights, cameras, and geometry to nodes to create visible content.

401 questions
4
votes
2 answers

How to change anchor point?

I'm working with SceneKit. The object SCNNode is rotated relative to the center. How to change anchor point of the SCNNode? SCNScene *scene = [SCNScene new]; SCNBox *boxGeometry = [SCNBox boxWithWidth:384.f height:512.f length:20.f…
Sveta
  • 1,270
  • 3
  • 16
  • 33
3
votes
0 answers

Draw custom polygon dynamically from manually added verticies in real time

I want to create app where you can set points in real world in detected surface and after you have 4 or more points it creates plane/polygon between them with texture. Basic controller configuration: @IBOutlet weak var sceneView: ARSCNView! let…
Libor Zapletal
  • 13,752
  • 20
  • 95
  • 182
3
votes
1 answer

physically based lighting on custom SCNGeometry Node

Question How do you define the material on a custom geometry from vertex data, so that it renders the same as 'typical' SCNNodes? Details In this scene there are A directional light A red sphere using physicallybased lighting model A blue sphere…
tospig
  • 7,762
  • 14
  • 40
  • 79
3
votes
0 answers

SCNNode's flattenedNode behavior in Swift

In a Swift iOS app, I have a main SCNNode containing thousands of nodes which all contain the SAME geometry. I am cloning the nodes using .copy(): let firstNode = SCNNode(geometry: myGeo) for i in 0...10000 { let newNode=firstNode.copy() …
Laurent Crivello
  • 3,809
  • 6
  • 45
  • 89
3
votes
2 answers

ARKit - How to contain SCNText within another SCNNode (speech bubble)

I am trying to create a quote generator with simple text within a speech bubble in ARKit. I can show the speech bubble with text, but the text always starts in the middle and overflows outside of the speech bubble. Any help getting it align in the…
JimmyJammed
  • 9,598
  • 19
  • 79
  • 146
3
votes
1 answer

SCNNode facing towards the camera

I am trying to put SCNCylinder node in the scene on the touch point. I always want to show the cylinder shape diameter facing towards camera. Its working fine for horizontal scene but it have a problem in vertical scene. In vertical scene I can see…
neena
  • 365
  • 1
  • 6
  • 22
3
votes
1 answer

SceneKit: animation of SCNView background color happens instantly, not gradually

Animating the backgroundColor property of a SCNView happens instantly, instead of gradually over the specified duration. Here's the code: UIView.animate(withDuration: 0.5, animations: { self.sceneView.backgroundColor = UIColor.redColor }) This…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
3
votes
0 answers

Render lips with ARKit and iPhoneX

I have been trying to render lips using ARKit. This is what I have tried: Create and import an SCN node from a collada dae format file. Place the node in SCNScene with SceneKit editor. I am using ARFaceAnchor.BlendShapes to figure out the…
3
votes
1 answer

Run SCNActions sequence with different nodes in SceneKit

I know how to create a sequence of SCNActions in a single node, one by one, in SceneKit. But I would like to know, how can I make a sequence of SCNActions with different nodes? For example Move forward node A Move forward node B Wait 1 second…
3
votes
3 answers

Drawing edges of SCNBox without diagonal line?

I'm making an AR application using Apple's ARKit, and I want to make wireframe outlines of boxes. The one described in the code and shown in the picture draws the hypotenuse on each face of the box. It also hides the corner on the opposite side of…
Miket25
  • 1,895
  • 3
  • 15
  • 29
3
votes
1 answer

ARKit : How to apply material with multiple colors for SCNCylinder in SCNView?

I have to make a SCNCylinder to look like a dynamic pie chart, I am able to make it look like static pie chart by adding texture or applying color to SCNCylinder with below code. However, my pie chart values changes randomly and want to add material…
Venkatesh
  • 3,558
  • 8
  • 32
  • 38
3
votes
1 answer

How to programmatically assign a material to a 3D SCNNode?

I'm trying to figure out how to programmatically assign a material to some object (SCNNode) in my scene for ARKit (XCode 9 / Swift 4). I'm trying to programmatically do this because I want the same shaped object to be rendered with way too many…
Bryan
  • 43
  • 1
  • 5
3
votes
0 answers

Adding "SCNNode" to ScreenView to current view of the camera

I've got an image that im trying to add to the current camera location of the Screenview ARSCNView session. Whatever I do it seems to put the image behind the current location of the phone camera and i have to move it back to see it. I have the…
Matt
  • 3,305
  • 11
  • 54
  • 98
3
votes
1 answer

SCNBox make the front side rotated to the camera in ARKit

I have a simple ARKit app. When the user touches the screen override func touchesBegan(_ touches: Set, with event: UIEvent?) { guard let touch = touches.first else { return } let result = sceneView.hitTest(touch.location(in:…
nslllava
  • 589
  • 2
  • 9
  • 19
3
votes
2 answers

ARKit dragging object changes scale

İ am trying to move the SCNNode object which i placed on to a surface. İt moves but the scale changes and it becomes smaller, when i first start to move. This is what i did; @IBAction func dragBanana(_ sender: UIPanGestureRecognizer) { guard let…