How to create a glowing neon effect for a geometry in ARKit through an SCNTechnique

Oscar de la Hera
AR Tips And Tricks
Published in
2 min readAug 5, 2018

--

Please note that this tutorial is based on this github repository. Props to LaanLabs.

Here’s what it will look like:

Step One: Create your model & Add it to XCode.

Follow this tutorial to make your model.

Follow this tutorial to add it to ARKit.

Step Two: Add the scripts from the repo into your project

These two. Make sure that they are in the same folder (or Xcode Group).

Step Three: Add this Script to your project to add the SCNTechnique

import Foundationimport ARKitextension "whateverYourViewControllerIs" {public func addGlowTechnique(node:SCNNode ,sceneView:ARSCNView){node.categoryBitMask = 2;if let path = Bundle.main.path(forResource: "NodeTechnique", ofType: "plist") {if let dict = NSDictionary(contentsOfFile: path)  {let dict2 = dict as! [String : AnyObject]let technique = SCNTechnique(dictionary:dict2)sceneView.technique = technique}}}}

Step Four: Add the function to the node you want to make glow

In the controller that you made the extension add this with the relevant node and your ARKit Sceneview

self.addGlowTechnique(node: child, sceneView: sceneView);

I will one day tell you guys what this all means.

Oscar

--

--

Oscar de la Hera
AR Tips And Tricks

Oscar is an award-winning Spanish Inventor whose work impacts lives through brands that include Nike, MoMA and Samsung.