Texture seam in iOS SceneKit

I get intermittent seams in textures that I apply to spheres in SceneKit. It is always on the "back" of the sphere where two edges of the texture meet. It seems that the texture does not quite connect with itself, and you can see the background through a thin line. The problem seems to exist on all devices and in all recent versions of iOS. My experiments showed that texture resolution seems to be a factor, but I didn't nail exactly what it is.

I attached a screenshot to illustrate on a white background for clarity, but the seam is not inherently white, it just allows the background to display:

Planetary seam

Does anyone know why SceneKit will handle textures this way? I have a fairly simple implementation, just creating a sphere and material and applying a diffuse and normal map to it. Here is my code:

// create planet SCNNode *baseNode = [SCNNode node]; [baseNode setName:name]; // Planet SCNSphere *planet = [SCNSphere sphereWithRadius:5]; SCNNode *planetNode = [SCNNode nodeWithGeometry:planet]; [planetNode setName:@"planetNode"]; [baseNode addChildNode:planetNode]; SCNMaterial *material = [SCNMaterial material]; material.shininess = 1; material.normal.intensity = 0.5; material.normal.contents = normalMap; material.diffuse.contents = diffuseMap; planetNode.geometry.materials = @[material]; 

Does anyone have experience in what can cause this “seam” to appear, and how can I get rid of it? My textures are usually either 1000x500 or 2048x1024, depending on the situation, and the seam appeared in both resolutions. Is there an ideal resolution for SceneKit textures or something known that can cause this behavior?

+7
ios textures scenekit texture-mapping
source share

No one has answered this question yet.

See related questions:

5
SceneKit Performance Optimization with High Resolution Textures
4
SceneKit, SCNMaterial change direction
2
Using MPMoviePlayerController as Texture in SceneKit
2
How to compress textures for use in SceneKit
one
Dynamic Texturing API for SceneKit or ARKit
one
SceneKit - Textures do not display properly
0
SceneKit how to add texture inside SCNSphere
0
The problem of displaying the SceneKit texture on the material
0
SceneKit - transition between textures
0
Are shift maps supported in SceneKit?

All Articles