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
33
votes
1 answer

ARKit SKVideoNode Playing on Render

Main Problem: I am adding this section AFTER to clarify the problem. -- I can PAUSE my video (I do not want it playing on a loop). When my node comes into sight, my node plays my video, even if it is on pause. If my video has finished playing, and…
impression7vx
  • 1,728
  • 1
  • 20
  • 50
24
votes
3 answers

SCNBox different colour or texture on each face

I'm new to iOS development and I've got myself stumped. I am trying to render a cube using SceneKit that has a different colour for each face. This is what I've got so far: func sceneSetup() { // 1 let scene = SCNScene() // 2 let…
may19c19
  • 360
  • 1
  • 4
  • 15
15
votes
6 answers

ARKit Place a SCNNode facing the camera

I'm using ARKit to display 3D objects. I managed to place the nodes in the real world in front of the user (aka the camera). But I don't manage to make them to face the camera when I drop them. let tap_point=CGPoint(x: x, y: y) let…
Marie Dm
  • 2,637
  • 3
  • 24
  • 43
14
votes
2 answers

Load large 3d Object .scn file in ARSCNView Aspect Fit in to the screen ARKIT Swift iOS

I am developing ARKit Application using 3d models. So for that I have used 3d models & added gestures for move, rotate & zoom 3d models. Now I am facing only 1 issue but I am not sure if this issue relates to what. Is there an issue in 3d model or…
Mayur Prajapati
  • 5,454
  • 7
  • 41
  • 70
13
votes
3 answers

cameranode rotate as iOS device moving

It's 360 degree video player project. I add a cameranode(SCNNode) to a rootnode, the cameranode was put at the center(0,0,0) of the SCNSphere, It can play video by now. Now I have to use devicemotion. I need to rotate the camera when device moves.…
ronan
  • 1,611
  • 13
  • 20
11
votes
4 answers

How to create a SCNNode from a .usdz?

I have downloaded the .usdz models provided by Apple: https://developer.apple.com/arkit/gallery/ But now, I want to create a SCNNode with one of these models, so I am doing this to obtain the node: guard let urlPath = Bundle.main.url(forResource:…
Sergio
  • 1,610
  • 14
  • 28
10
votes
2 answers

Persistence of SCNAudioPlayer on SCNNodes in Xcode Instrument

I have created a subclass of SCNNode. It is made up of few child nodes. I have declared a method, viz. soundCasual() which adds a SCNAudioPlayer to the instance of this class. Everything is working as expected and audio is being played, when this…
Manganese
  • 650
  • 5
  • 26
10
votes
2 answers

ARkit - Loading .scn file from Web-Server URL in SCNScene

I am using ARKit for my application and I try to dynamically load .scn files from my web-server(URL) Here is a part of my code let urlString = "https://da5645f1.ngrok.io/mug.scn" let url = URL.init(string: urlString) let request =…
Raj
  • 485
  • 9
  • 18
10
votes
6 answers

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

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…
Matheus Rocha
  • 1,152
  • 13
  • 22
9
votes
1 answer

ARKit: Finding the coordinates of a SCNNode on the screen

I have a simple Swift ARKit setup where I have a SCNNode with a 3D object that is visible in an ARSCNView. I want to determine the 2D coordinates of this object on the ARSCNView. By this I mean the x- and y-coordinates the object has when it is…
AscendingEagle
  • 771
  • 1
  • 7
  • 17
9
votes
3 answers

Swift: "Must call a designated initializer of the superclass" error even though code is doing so

The goal is to subclass SCNNode. According to the class docs, init(geometry geometry: SCNGeometry?) is a designated initializer (no convenience keyword listed), so isn't this code invoking a designated initializer of its superclass? Why is Xcode…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
9
votes
1 answer

Import 3D object with animation from scn

I've imported a DAE file in XCode and converted it into a SCN file. This file contains some 3D objects with animations. I'm trying to import all the nodes with their animations and play them on the scene. The nodes are imported but I can't get the…
user623396
  • 1,537
  • 1
  • 17
  • 39
9
votes
2 answers

Stroke Width with a SceneKit line primitive type

I am trying to replicate this cube image shape (with permission from the original creator) using scene kit. Thus far, I have the drawing code for the lines and the vertices. I cannot use an image because the background has to be transparent. The…
coneybeare
  • 33,113
  • 21
  • 131
  • 183
8
votes
2 answers

How to change orientation of a SCNNode to the Camera with ARKit

The code below places a SCNPlane onto the point touched, but the plane is oriented (rotated) to the position that the phone was in when the app started. I would ideally like to orient the Node to a physical wall or to the current orientation of the…
Rob Schlackman
  • 309
  • 3
  • 6
8
votes
3 answers

SceneKit: understanding the pivot property of SCNNode

The goal is to increase the length of a SCNBox such that it only grows in the positive-z direction. This answer suggests playing with the pivot property. However, the documentation for the pivot property is sparse on the SCNNode page, and there is…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
1
2 3
26 27