Buggy edges in three.js when using gltf

Viewed 101

Does anybody know how to get rid of this bug?

Edges are buggy

It doesn't occur on stuff created in three.js code (as for example the tree is not a .gltf but handcrafted code). However, the "sheep-like" thing I imported through a gltf (exported by blockbench) and I mean yeah - this looks completely inacceptable. I tried different scales but the edges are bugged no matter what scale I set the sheep to.

const loader = new GLTFLoader();

  loader.load( './sheep.gltf', function ( gltf ) {

    var gltfO = gltf.scene;
    //gltfO.scale.set(0.05, 0.05, 0.05);
    gltfO.position.set(0,-sz/2,0);
    scene.add( gltfO );

  }, undefined, function ( error ) {

    console.error( error );

  } );
  
1 Answers

Turns out this is an issue with UV Mapping. At least I figured out a work around that one can apply in blockbench. Instead of just painting the rectangle in the UV you also need to paint the border OUTSIDE the rectangle. Not really a solution but it's at least a workaround. Probably doesn't work for non unicolor texture? I don't know. But it works in this case.

Related