Weird artifacts with sphere textures

Not sure if anyone has seen this before, but all the examples run fine as does furmark so I’m pretty sure it’s not my graphics card or drivers at fault.



I’ve got a basic scene with a few textured spheres (meant to be balls on a snooker table.) From a distance they look black, like they’re surrounded by some form of mesh, but from close up this disappears to leave the texture visible:









Has anyone seen this before, or any ideas as to what the problem might be? I’ve tried playing around and my best guess at the moment is some form of lighting problem perhaps, but it does seem rather weird.

Hello!



I’ve seen this before, but it can be caused by a lot of things. It looks like some polygon Z fighting on the top of the spheres. This is usually caused by polygons that are too closely overlapping. If these are jME3 spheres I’m a bit concerned… But if these spheres were generated in Blender or another modeling suite, I’d check to make sure the spheres are indeed spheres from top to bottom. Check for duplicate vertexes or faces would be a good place to start. Another thing I would check would be the UV coords, but this is much less likely the problem.



EDIT: derp derp. Just paid a bit more attention to the first pic. I stand by what I originally said, but the first pic sorta makes me think it’s something else entirely. Still, check to make sure you’re not creating the geometries twice or something and check your models themselves if you can.



Cheers!

~FlaH

I guess it’s a tangent issue.

Try the



TangentBinormalGenerator.generate(yourSphere);

Thanks for the replies - I’m using normal JME2 spheres (not using JME3 for this project) and there’s no external models involved whatsoever. I’ve tried the tangent binormal generator line of code, but unfortunately that doesn’t seem to fix it either (makes no difference on my machine.)



I’m a bit confused by this - any other suggestions?

It turns out the textures in use didn’t have dimensions that were a power of 2 - it looks like my graphics card was trying to resize them and getting confused somehow (seemingly overlaying the previous texture with the current one.) Resized the textures and it all works fine!

1 Like