ArUn
ArUn

Reputation: 1337

How to make The border of the 3d model smooth in Three.js

There is a problem in Rendering the 3d model as the Border of the Mesh is not smooth.I have added the image of model loded using three.js and the same in blender. Is it the problem with the 3d model ?

 Loader = new THREE.JSONLoader(true);
 Loader.load("models/test.json", function (geometry) {
    geometry.mergeVertices();
    geometry.computeVertexNormals();
    geometry.computeFaceNormals();
    Material = new THREE.MeshLambertMaterial();
    Material.side = THREE.DoubleSide;
    Material.shading = THREE.SmoothShading;
    Mesh= new THREE.Mesh(geometry,Material);
    Mesh.doubleSided = true;
    Material.map = new THREE.ImageUtils.loadTexture("textures/pattern3.jpg");
    Material.map.wrapS = THREE.RepeatWrapping;
    Material.map.wrapT = THREE.RepeatWrapping;
    Material.map.repeat.set(2,2);
     Scene.add(Mesh);

});

enter image description here

enter image description here

Upvotes: 0

Views: 454

Answers (1)

gaitat
gaitat

Reputation: 12632

Add { antialias: true } as a parameter to your renderer.

Upvotes: 1

Related Questions