1 Reply
      Latest reply on Sep 5, 2019 7:09 PM by kemalenver
      kemalenver Level 1 Level 1 (0 points)

        I have the following code to create a circle Path and a SCNShape from this path.  orbit_gradient.png is a horizontal 1px high image that represents a gradient.

         

        let material = SCNMaterial()
        material.isDoubleSided = true
        material.lightingModel = .constant     
        material.diffuse.contents = UIImage(named: "art.scnassets/orbit_gradient.png")
        
        let shapePath = Path.circle(radius: radius, segments: 512)
        
        let orbitShape = SCNShape(shapePath)
        orbitShape.materials = [material]  
        self.orbitNode.geometry = orbitShape

         

        The problem I have is that when applying the texture to this geometry I'm just left with a white circle.  If I set the diffuse to be UIColor.red it displays as red.  What I want to accomplish is a stroked circle that appears to gradually fade, creating a rotating trail effect.