Questions tagged [scenekit]

Apple SceneKit is a high-level framework for 3D data visualizations and casual games on iOS, macOS, iPadOS, tvOS and watchOS. Since 2017, SceneKit is used as an ARKit companion and a main render engine for AR apps.

SceneKit is an Apple framework for constructing, animating and rendering 3D scenes. It was introduced in 2012 on Mac OS X 10.8 Mountain Lion, then became available in 2014 for iOS 8, and was a part of the original release of tvOS 9.0 in 2015.

SceneKit provides a Swift and Objective-C interface that abstracts away lower level interactions with Metal, and has tight integration with other frameworks like ARKit and CoreAnimation. It includes a comprehensive game physics engine. It can be integrated with SpriteKit (Apple's 2D gaming engine) or used on its own. Since 2018 SceneKit reads in Pixar USDZ file format that supports Physically Based Rendering (PBR) and asset animation.

Documentation for this framework can be found in the SceneKit Reference from Apple.

4072 questions
2
votes
1 answer

Omni light disables ambient light in SceneKit

I have an ambient light attached to the scene and some objects that have attached an Omni light appear to the scene. In the moment when objects gets into the scene, the ambient light disables. Any clues why is happening that?
Alec Firtulescu
  • 543
  • 6
  • 18
2
votes
2 answers

tracking camera's position and rotation

I have allowsCameraControl property set to true. I need my camera to tell me what it's position and rotation is, while I move it around with pinch and pan gestures so I can later update my camera to that position. Is there some function that is…
potato
  • 4,479
  • 7
  • 42
  • 99
2
votes
2 answers

changing text size of SCNText

I'm trying to set the size of the font using this code: func setupText(){ let text = SCNText(string: "textString", extrusionDepth: 4) textNode.geometry = text textNode.position = SCNVector3Make(0, -200, 5) …
potato
  • 4,479
  • 7
  • 42
  • 99
2
votes
0 answers

SceneKit 'clip to bounds' equivalent

Other than camera xFov, yFov, zNear and zFar, is there a way with SceneKit to have a node (and its descendants) 'clip to bounds', i.e. to specify an arbitrary 3D bounding box whereby any nodes that fall outside it would not be rendered? My use case…
stephent
  • 1,355
  • 15
  • 29
2
votes
0 answers

SceneKit: Rotate a node according to device motion data while making it accelerate in its direction

I've been fiddling with SceneKit recently and I wanted to make the following thing: When creating a Game template from Xcode, you get a scene with a ship. I wanted to animate this ship and orient it according to the relative position of my iPhone…
Drayae
  • 241
  • 2
  • 10
2
votes
3 answers

How do I make Character(SCNNode) bounce off of a wall in Scenekit?

I am trying to make a simple maze game in Scenekit. I have a sphere node and wall nodes. The sphere moves by SCNActions. The actions I use on the sphere are moveByX actions. My problem is that whenever the sphere hits a wall, it just moves the wall…
2
votes
3 answers

SceneKit: Is it possible to cast an shadow on an Transparent Object?

i am trying to cast an shadow on an totally transparent plane in SceneKit on OSX. I am struggling with this problem since several hours and do not come to any solution. My Purpose is to generate an Screenshot of several objects with an transparent…
Manuel Blum
  • 23
  • 1
  • 5
2
votes
1 answer

SceneKit shader modifiers with GLSL arrays

I'm trying to pass in an array of points into a shader modifier in SceneKit, but I can't work out the correct syntax. In my shader extension code I have: uniform vec2 points[100]; If I call… material.setValue(NSValue(point: CGPoint(x: 100.5, y:…
Luke Rogers
  • 2,369
  • 21
  • 28
2
votes
1 answer

Cloning nodes and performance, geometry, and performance; IOS Scenekit

I'm writing a app using Scenekit where the client wishes to push the limits of animation in IOS. This particular app has requirements where I"m pushing out to the screen over 1,500 redraws. Even with this many redraws, I've locked down the FPS to…
2
votes
1 answer

Adding audio player to a node in SceneKit

I have some problems with adding an audio player to a node. For some reason, I get an exception and my application stops. Here is how my code looks like let node = scene.rootNode.childNodeWithName("box", recursively: true)! let source =…
Alec Firtulescu
  • 543
  • 6
  • 18
2
votes
3 answers

Have SCNCamera follow a node at a fixed distance?

I have a SCNNode, and an SCNCamera. The camera is located up and in front of the node, and looks down on the node via an SCNLookAtConstraint that I have setup. However when the node moves laterally, the camera only rotates, instead of moving with…
Jack Maloney
  • 527
  • 2
  • 5
  • 18
2
votes
1 answer

How to locate a tap on a SCNPlane?

I have a SCNPlane in SceneKit, which is rotated so it extends in the x and z directions, and I would like to have a UITapGestureRecognizer that can get me the x and z coordinates of a tap on that plane, so I can render something there. I've been…
Jack Maloney
  • 527
  • 2
  • 5
  • 18
2
votes
1 answer

COLLADA transformations in SceneKit

We try to make viewer for models in Xcode and use SceneKit to render model. If we add COLLADA (.dae) file to Xcode, it transforms the model using scntool to c3d format (found this on the Internet). But we want to load models in runtime (we download…
DuXeN0N
  • 1,577
  • 1
  • 14
  • 29
2
votes
1 answer

Can I use SCNAction for multiple SCNNodes at the same time(concurrently)?

Im trying to animate multiple SCNNodes using the SCNAction class to run concurrently but I'm having a hard time figuring it out. I have a feeling that it might not be possible though but it doesn't hurt to throw the question out there and see if…
Chris
  • 21
  • 4
2
votes
2 answers

Using MPMoviePlayerController as texture in SceneKit

I created a cube in scenekit and tried to use an instance of an MPMoviePlayerController as its material. It kind-ish works but not exactly well: the video seems to be very jumpy, like it would be jumping between the video frames (basically replaying…
Fygo
  • 4,555
  • 6
  • 33
  • 47
1 2 3
99
100