# SceneKit – White layer covering my tube

I have a simple tube node in my scene that isn't displaying properly.

When I rotate it to face the camera, more than half of it is covered by some invisible sheet. When I rotate the tube enough, it gets completely covered by the sheet. Here is a screenshot showing my problem:

As you can see, the red tube is covered on its top-end. If I were to rotate it far enough, it would disappear.

There is nothing complex in my code, it's all very simple. In fact, here is is:

// Create tube geometry.
tubeGeometry.firstMaterial!.diffuse.contents = UIColor.redColor()/*UIImage(named: "GreenTube")*/

// Create tube node.
let tube = SCNNode(geometry: tubeGeometry)
tube.position = SCNVector3Make(0.0, -11.0, 0.0)
tube.rotation = SCNVector4Make(1.0, 0.0, 0.0, Float(M_PI_2))

• It looks like it might be getting clipped against the camera's near or far plane, but it's hard to say without seeing it in motion. – DMGregory Feb 5 '16 at 2:30
• @DMGregory Near or far plane. Do you mean xFov and yFov? I will try resetting those and let you know how it goes. – Christian Kreiter Feb 5 '16 at 2:58
• No, the near & far clipping planes are the closest and furthest depth values, respectively, that the camera will render. Anything closer than the near plane or further than the far gets clipped off sharply — the visible elliptical cross-section of your tube looks like this telltale effect. – DMGregory Feb 5 '16 at 3:02
• Oh. I have never heard of that before. Messing with the FOV fixed it for me, but I'll watch out for the near & far next time. Thanks! – Christian Kreiter Feb 5 '16 at 3:50
• Cool! Be sure to write up what worked for you as an answer and (after any required wait) mark it accepted. That will help others with this problem in future find your tested fix. – DMGregory Feb 5 '16 at 3:59

I fixed it! It turns out my Field of Vision was set too low. I went into my custom camera's xFov and yFov and set them to be a bit bigger than the length of my tube. My tube was merely going out of view too soon :)

• Yes, thank you. I have to wait 2 days first :) – Christian Kreiter Feb 5 '16 at 4:52