SCNScene is a part of the SceneKit Framework. An SCNScene object is a container for the node hierarchy and global properties that together form a displayable 3D scene.
Questions tagged [scnscene]
91 questions
1
vote
0 answers
In tvOS how to actually put an SCNNode in a focus container? Scene nodes now have focus behavior, but how to include in the focus container?
You have a scene kit scene in your tvOS app.
As usual the scene kit is part of a normal view controllert.
Nowdays you can in fact do this:
someNode.focusBehavior = .focusable
reference -…

Fattie
- 27,874
- 70
- 431
- 719
1
vote
1 answer
SwiftUI – Setting SceneView background to video
I'm trying to set the SceneViews background to a .mov video. I can get the video to play if I pass it to a VideoPlayer but not if I set it as a material on my Sphere & use it in my SceneView. Ideally I would like the video to play behind the sphere…

user
- 35
- 4
1
vote
1 answer
How to scale SCNScene?
I'm displaying USDZ model in AR with this code:
class ViewController: UIViewController {
@IBOutlet var sceneView: ARSCNView!
override func viewDidLoad() {
super.viewDidLoad()
sceneView.autoenablesDefaultLighting = true
sceneView.scene…

Paulina
- 11
- 1
1
vote
3 answers
Node's geometry (from DAE file) is nil only on production builds
I have a 3D model that ALWAYS works fine on real device and simulator when compiled from Xcode even if setting as Release and with any optimization setting but when uploaded to TestFlight it's missing some materials.
After debugging (with TF builds…

Dante Puglisi
- 648
- 7
- 24
1
vote
0 answers
Can I get SCNNode position in SCNScene when I use "node.physicsBody.velocity"?
Is there any way to get position of SCNNode in SCNScene when I used node.physicsBody.velocity before? I have set default coordinates to SCNVector3(0,0,0) then I've used node.physicsBody.velocity = SCNVector3(someValue, someValue, someValue) and…

psrajer
- 83
- 2
- 5
1
vote
0 answers
SceneKit memory leak
The memory of app increased after segue to VC with scnView. I've used deinit and set geometry to nil but it didn't help. I saw some tips on stack about using deinit to solve this issue, but it doesn't work for me. Memory increased every time when I…

Diana
- 683
- 1
- 8
- 17
1
vote
1 answer
Get the position of a sphere created in scn file
I created an scn file using Xcode (as you can see below), where there are two nodes (a sphere and a platform). I set up the position of the sphere:
I used a class which creates a node platform, which you can resize and move:
Screenshot
After…

Edoardo
- 657
- 7
- 24
1
vote
0 answers
The problem with SCNView and processor loading in macOS Mojave
I have a problem with Mojave and SCNView in my macOS program. But, I have also tested the simplest project and found the same problem !
So, if we start new macOS project with xib file, not storyboard, and put the NSTabView (with two TabView) in the…

VYT
- 1,071
- 19
- 35
1
vote
0 answers
scnscene is nil every time
Hi there I'm trying to create an AR app on which I have every file ordered in few different catalogues and now when I want to create the scene I can not to catch my Models.scnscene catalogue I was trying to do this in so many ways but on each time…

Wojtek Kulas
- 41
- 4
1
vote
1 answer
Interoperate MTKView (MetalKit) and SceneKit
I am using MetalKit and have a complex rendering pipeline. The results are rendered into a MTKView.
Now I would like to feed the contents of the MTKView to a SCNScene and using a SCNCamera to perform post-process effects like HDR.
How is this…

Summon
- 968
- 1
- 8
- 19
1
vote
1 answer
SceneKit: scaling SCNNode doesn't change size by expected amount
This attached DAE model has a height of ~324 units as shown by its bounding box.
In a SceneKit, however, if you set the Y-scale to 0.01, the height doesn't become ~3.24. It becomes smaller than 3, which you can prove by fitting it comfortably within…

Crashalot
- 33,605
- 61
- 269
- 439
1
vote
0 answers
Calling SCNView snapshot function inside of renderer(_:didRenderScene:atTime:) fails after a few frame
Calling the snapshot function of SCNView from inside of renderer(_:didRenderScene:atTime:) fails after a few frames.
Putting a breakpoint inside renderer(_:didRenderScene:atTime:) shows that the code gets executed for a few frames then stops.
1) Is…

Crashalot
- 33,605
- 61
- 269
- 439
1
vote
1 answer
ARKit transform whole scene
I have this SCNScene which is quite nice and contains some nSCNNodes...
Now I want to display this Scene in an ARSCNView. But, my whole scene is built with x,y,z >= 0 aka if I'd just set the screen my whole scene would be behind the camera.
I also…

thisIsTheFoxe
- 1,584
- 1
- 9
- 30
1
vote
0 answers
How to load big scene from server in swift
I put art.scnassets in my local server and tried to use SCNScene(url: options:) to load the .scn
The assets are from fox2 Apple sample code.
Turns out: model is loaded successful but maps cannot be found, and options like "assetDirectoryUrls" did…

Shark Deng
- 960
- 9
- 26
1
vote
2 answers
How to add 3D models to a scene so that they have certain XYZ position?
I once wrote a function in which I added geometrical cones to the scene. It looked like this:
func addZombies(i:Int, x: Float, y: Float, z: Float)
{
let node = SCNNode()
node.geometry = SCNCone(topRadius: 0.0, bottomRadius: 1, height: 2)
…

aleksy.t
- 267
- 2
- 18