Dark Line at edge of texture

HI,
Dose anyone know of any reason I am getting a dark line at the edge of a texture on a curved contour.

I have tried changing texture and size of texture, changed repeat, changed wrapS and wrapT and flip, but dark edge remains.

I can been seen clearly in the second image where the curved front meets the flat of the step.

Thanks


Hi! Firstly use absolutly white texture to know that problem is in texture.

Thanks for the reply but definitely not the texture. Looks a little dull as I have not set the scene lighting up fully yet, but even with an all white texture it shows the dark line.

Maybe check your normals as wrong or even flipped normals can cause similar darkening.

Other than that you should provide the model for someone to inspect as it’s just guessing from screenshot.

Try use basic material or wireframe. Maybe there some small step.

Thanks

Checked normal’s and seem correct.

No small steps in wireframe and all looks as it should to me.

Found a simple way around this, created a very small line in the contour that gets extruded and solved the issue.

Thanks for all the help

Although a solution is found, the actual cause is still a mystery. When I try to recreate the issue with a shape and a tube around the shape, there is no black line between both objects. Anyway, I’m leaving the demo here as a future reference:

https://codepen.io/boytchev/full/oNaegoa

image

1 Like

Hi,
The problem only appeared for me when you apply a texture to the tube section in my case.

I will try your approach of using a tube geometry and see if that gives me a correct result.

Thanks for the reply!!!

1 Like

Hi,
I created a version of your code on my server, added textures and no black line!

The issue I have is that my contour or the tube in your example is not a tube. As such the tube shape in your example could be any profile.

For example in the attached image the profile is a quadratic curve with a connecting line and finishes with a quadratic curve. I still cannot find the actual cause of the black line, but adding pSHP1.lineTo(0.001, 0.001); to my profile shape code has resolved the issue.

    pSHP1 = new THREE.Shape();
    pSHP1.moveTo(0, tTH);
    pSHP1.lineTo(0, 0);
    pSHP1.lineTo(0.001, 0.001);
    pSHP1.quadraticCurveTo(-tNP, 0, -tNP, tNP);
    pSHP1.lineTo(-tNP, tTH - tNP);
    pSHP1.quadraticCurveTo(-tNP, tTH, 0, tTH);

1 Like

You can extrude any shape along a path, tubes just use circular shapes. The best way would be if the issue is available (and editable) online, so that it is possible to investigate with close-ups whether the issue is with pixel colors, or with shape geometry, or with object alignment. In any case, if you already solved the problem, that’s OK.

Edit: here is a modified version with custom profile instead of circular profile. No black line:

https://codepen.io/boytchev/full/qBJPoKN

image

Hi,
Yes, I agree any shape can be extruded along a path which is what I have created in my scene and works fine on other extruded paths.

So to test, I transferred your example onto my testing server, changed the light colors and added a little code to map in a basic texture.

The result was that all renderd ok with no dark line at the edge as you can see from the screenshot.

I also tested with a path with lines and all ok