Questions tagged [scnscene]

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.

91 questions
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
3 answers

Apply .jpg and .mtl file to .obj file in SceneKit

The designer has delivered three files: image.jpg something.mtl whatever.obj I can successfully load the .obj file into my scene like such: SCNView * sceneView = [SCNView new]; sceneView.frame = view.bounds; [view addSubview:sceneView]; …
Johnny Rockex
  • 4,136
  • 3
  • 35
  • 55
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
7
votes
1 answer

ARKit - How to load .scn and texture file from server URL

I try to load dynamically .scn and texture files from server URL in ARKit application. I have achieved loading .scn file from web url this way.. But after running I am not seeing any textures on device. I get following error message.…
Raj
  • 485
  • 9
  • 18
7
votes
0 answers

SceneKit: How to place a 3D object in order to fit the SCNView bounds?

I'm new to SceneKit and 3D objects. I've been doing some research but I didn't find an answer to my question. I need to display several 3D objects in an horizontal UICollectionView, one in each cell. I'd like them to be aligned and the same size so…
Marie Dm
  • 2,637
  • 3
  • 24
  • 43
6
votes
1 answer

SceneKit: adding directional light to camera node has no effect

Based on the advice in this answer, the goal is to add an ambient light to a scene along with a directional light to the camera. This works in the Xcode Scene Editor, with the directional light set at 70% white and the ambient light at 50% white.…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
6
votes
3 answers

Check if SCNNode SCNAction is finished

I have created a SceneKit 3D maze world in which a player can move. Some of the moves like jumping involve moving the camera up and down while changing to view direction over a period of time of several seconds. During this time I would like to…
Greg Robertson
  • 2,317
  • 1
  • 16
  • 30
5
votes
2 answers

How to clear the background of a SceneView 3D Object in SwiftUI

Does anyone knows how to clear the background of a SceneView 3D Object? I'm trying using UIColor.clear, but it makes it white. [] import SwiftUI import SceneKit struct TestView: View { var body: some View { ZStack{ …
5
votes
2 answers

SceneKit: Programmatically use "Procedural Sky" option from Scene Inspector?

In the Xcode SceneKit Scene Inspector, there is a Procedural Sky option under the Environment section. According to some tutorials, enabling this option will impart more realism to 3D models. 1) If you're creating a scene from code and not from the…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
5
votes
1 answer

Setting a Camera's Point Of View in SceneKit

How can I set the SceneKit SCNCamera properties for 2d views such as: - top view - bottom view - front view - back view - left side view - right side view
Anan R
  • 311
  • 4
  • 8
4
votes
1 answer

SCNScene load with textures from pod

I am trying to create pod which contains SCNScene with textures and got an error: SceneKit Error: Failed loading : C3DImage src:file:///Users/.../Example.app/Templates.scnassets/grid.png Texture and scene are in the same folder. I've tried to load…
4
votes
0 answers

SceneKit: orbit camera around point with one gesture while allowing camera to rotate with different gesture

Assume a SceneKit scene offers a perspective similar to Minecraft. There is one camera. The camera node acts like the "head" of a person while its parent node acts like the "body." The camera node is a child of the parent node, called…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
3
votes
3 answers

Swift-SceneKit-Can not load '.scn' file from 'art.scnassets'

I'm trying to create a new SCNScene from 'diceCollada.scn' file. But this file won't be loaded. This file is in "ARDicee/art.assets" folder. Not only "diceCollada.scn", but also it cannot load the default "ship.scn". I don't know why it doesn't…
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

ios - Could not open OBJ file when convert MDLAsset to MDLMesh

I'm working with demonstrating loading and texturing a .OBJ file using ModelIO. This code bellow works fine when I use local file. guard let url = Bundle.main.url(forResource: "myVase", withExtension: "obj") else { fatalError("Failed to find…
Khoa
  • 1,738
  • 1
  • 14
  • 21
1
2 3 4 5 6 7