Category "scenekit"

Can I load both obj and materials as an MDLAsset?

I have a directory containing an obj, mtl, and the textures. If I do let asset = MDLAsset(url: url) then it loads the mesh, but no textures. Now, if I go rename

Why 3d object added to scene view scene moves along with camera?

I have added 3d object to scene view scene which is in dae format. But its moving along with camera. How to fix it to a particular position. Same code works wit

How to programmatically export 3D mesh as USDZ using ModelIO?

Is it possible to programmatically export 3D mesh as .usdz file format using ModelIO and MetalKit frameworks? Here's a code: import ARKit import RealityKit impo

Is there someone who used animationDidStop or animationDidStart for SCNAnimation Player?

I am getting animation from a scene file with func animationFromSceneNamed(path: String) -> SCNAnimationPlayer? { let scene = SCNScene(named: path)

How to use "HEVC with Alpha channel" videos in SceneKit?

At WWDC 2019, Apple announced that it was now handling HEVC with Alpha in iOS, and state that it could be used in SceneKit. I've been trying for hours to make

Scene kit shape distorted

We built an iOS app to render 3D objects using Scene kit. We are plotting based upon coordinates(Vertices) received and populating our scene view inside Table c

SceneKit how to move a character on terrain with different height

I am working on a scene with a character and a platform with a stairs. Character must move up and down of the stairs and jump from the platform: I move charac

Is there any way to load FBX file using ARKit?

In my project I am projecting 3d files using ARKit. I am able to project .dae and .obj format models. Is there anyway I could load .fbx files?

Arrange SCNNodes in Circle

I'm creating multiple nodes automatically and I want to arrange them around me, because at the moment I'm just increasing of 0.1 the current X location. capsu

SceneKit Custom Geometry Shape not showing up

I am pretty new to Swift, and SceneKit, and my current problem is that the custom shape I am trying to create is not showing up, even though the primitive shape

How do I make a hexagon with 6 triangular SCNNodes?

I'm trying to make a hexagon grid with triangles without altering any pivot points, but I can't seem to position the triangles correctly to make single hexagon.

SceneKit – Why does adding spot light blacken the floor?

Screenshot #1 shows a simple SceneKit scene with only an ambient light (explicitly added, not the default one). Screenshot #2 shows what happens after adding a

Place multiple SCN objects in touchesBegan method

My Swift code below uses func touchesBegan to place a SCN object in the ARKit view. The problem is – it's only placing the object one time. I would like t

How to setup physical based rendering in SceneKit from code?

I want to present some scene with PBR. I created metalness and roughness textures and want to apply it to the mesh. When I try to do it in Xcode - everything is

Why SCNPhysicsBody resets position when set eulerAngles?

I'm trying to use SceneKit to develop a game for tvOS, and I'm having an issue. When I set the node's eulerAngle before apply an impulse to the physicsBody the

SceneKit : how to get distance between two SCNNode ? (ObjC and Swift)

I wonder how to get distance between two SCNNode (ObjC and Swift) Thanks

Occlusion Material or Hold-Out Shader in ARKit and SceneKit

I have seen some examples demo of ARKit where material A is blocking material B, kind of creating occlusion effect, or black hole, or masking. But all of them s

ARKit how position nodes base on horizon and not the camera orientation?

When I add a new node with ARKit (ARSKView), the object is positioned base on the device camera. So if your phone is facing down or tilted, the object will be i

How to load animations made in Blender to ARKit?

I made a 3D object in Blender and made some custom animation to it. However, I manage to load the object to the scene, but not the animation. This is what it

Implicitly animating SCNNode's transition from one ARImageAnchor to another

I’m trying to make my AR experience more user friendly. I have this SCNnode (objectNodeToPlace) that I want to place over the node created/update by the r