# Why are these lines created, in gltf model?

**URL:** <https://discourse.threejs.org/t/why-are-these-lines-created-in-gltf-model/14701>\
**Category:** Questions\
**Tags:** gltf-loader, threejs\
**Created:** [April 27, 2020, 6:51pm UTC](https://discourse.threejs.org/t/why-are-these-lines-created-in-gltf-model/14701 "2020-04-27T18:51:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashishsiddharth](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ashishsiddharth/32/10940_2.png) [@ashishsiddharth](https://discourse.threejs.org/u/ashishsiddharth)\
**Post date:** [April 27, 2020, 6:51pm UTC](https://discourse.threejs.org/t/why-are-these-lines-created-in-gltf-model/14701/1 "2020-04-27T18:51:15Z")

</div>

Hi… when i open model in gltf viewer [https://gltf-viewer.donmccurdy.com/](https://gltf-viewer.donmccurdy.com/) it looks fine.  
 ![dump1](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/a/aaa310c01a329c6056205b02bf1ac929690520ad.jpeg)

but when i try to import it using my own viewr. why are these lines created.  
 ![dump2](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/7/769bb3bf687e94322938256ef13b25637b65abe2.jpeg)

My Code:

```
function addglass() {	
	const loader = new THREE.GLTFLoader();
        const threeGlasses = new THREE.Object3D();
	loader.load( './model/goggles.glb', function (glassesFramesGeometry){
		var glass = glassesFramesGeometry.scene;
		threeGlasses.add(glass);
		threeGlasses.scale.set( 0.08, 0.08, 0.08);
		threeGlasses.rotation.x = 70*Math.PI/180;
		threeGlasses.position.z=0.5;
	});		
	scene.add(threeGlasses);
}
```

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [April 27, 2020, 6:58pm UTC](https://discourse.threejs.org/t/why-are-these-lines-created-in-gltf-model/14701/2 "2020-04-27T18:58:09Z")

</div>

What version of three.js are you using? Could you share a demo or the model?

---

<div class="post-metadata">

**Author:** ![ashishsiddharth](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ashishsiddharth/32/10940_2.png) [@ashishsiddharth](https://discourse.threejs.org/u/ashishsiddharth)\
**Post date:** [April 27, 2020, 7:02pm UTC](https://discourse.threejs.org/t/why-are-these-lines-created-in-gltf-model/14701/3 "2020-04-27T19:02:38Z")

</div>

Threejs\>  
[three.js](https://discourse.threejs.org/uploads/short-url/hQPXF69dLc11lgmTfjai7xMQTkD.js) (1.2 MB)  
gltfloader\>  
[GLTFLoader.js](https://discourse.threejs.org/uploads/short-url/fWUvnYsxzFHheQ90cVCQbfkcKDi.js) (99.0 KB)  
model\>  
[goggles.glb](https://discourse.threejs.org/uploads/short-url/ywgEtcfIl4uo8EXgcLKlUZP3Hj3.glb) (589.2 KB)

these lines are also seen [https://gltf.insimo.com/](https://gltf.insimo.com/) in this viewer.

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [April 27, 2020, 7:23pm UTC](https://discourse.threejs.org/t/why-are-these-lines-created-in-gltf-model/14701/4 "2020-04-27T19:23:13Z")

</div>

This issue was fixed in three.js r114 ([https://github.com/mrdoob/three.js/pull/18235](https://github.com/mrdoob/three.js/pull/18235)), and you are currently using r112. Upgrading (both three.js and GLTFLoader.js) to r114+ should resolve the problem. Alternatively, traverse the model and set `material.depthWrite = false` on any material where `material.transparent === true`.

---

<div class="post-metadata">

**Author:** ![ashishsiddharth](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ashishsiddharth/32/10940_2.png) [@ashishsiddharth](https://discourse.threejs.org/u/ashishsiddharth)\
**Post date:** [April 27, 2020, 9:18pm UTC](https://discourse.threejs.org/t/why-are-these-lines-created-in-gltf-model/14701/5 "2020-04-27T21:18:59Z")

</div>

thank you, it worked…

what should i do view this logo, as i could see this in [https://sandbox.babylonjs.com/](https://sandbox.babylonjs.com/)

 ![dump4](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/a/a604a7c4230356fad3a4a386f5ebeedd081bc757.jpeg)

my current progress:  
 ![dump5](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/5/5d5c5b5bbe8655ed02b447b0182c7cb9d951a8e3.jpeg)

---

<div class="post-metadata">

**Author:** ![ashishsiddharth](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ashishsiddharth/32/10940_2.png) [@ashishsiddharth](https://discourse.threejs.org/u/ashishsiddharth)\
**Post date:** [April 27, 2020, 9:21pm UTC](https://discourse.threejs.org/t/why-are-these-lines-created-in-gltf-model/14701/6 "2020-04-27T21:21:35Z")

</div>

will adding material shininess solve the issue?? if so how?

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [April 27, 2020, 9:40pm UTC](https://discourse.threejs.org/t/why-are-these-lines-created-in-gltf-model/14701/7 "2020-04-27T21:40:52Z")

</div>

You probably need an environment map — see the MeshStandardMaterial documentation. Any metallic surfaces require an environment map to appear reflective.

---

<div class="post-metadata">

**Author:** ![ashishsiddharth](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ashishsiddharth/32/10940_2.png) [@ashishsiddharth](https://discourse.threejs.org/u/ashishsiddharth)\
**Post date:** [April 27, 2020, 10:15pm UTC](https://discourse.threejs.org/t/why-are-these-lines-created-in-gltf-model/14701/8 "2020-04-27T22:15:37Z")

</div>

hi… adding roughness gave me this result

 ![dump6](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/7/702a988d3129d5238b7f98fa019b372c3a298128.jpeg)

but adding textures removes logo

code:

> ```
> loader.load( './model/goggles.glb', function (glassesFramesGeometry){
> var model = glassesFramesGeometry.scene;
> model.traverse ( ( o ) => {
> if ( o.isMesh ) {
> //o.material.map = texture;
> o.material.metalness = 1;
> o.material.roughness = 1;
> }
> } );
> 
> ```

I still couldn’t get shiniess… what property should i use to get shiniess?

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [April 27, 2020, 11:06pm UTC](https://discourse.threejs.org/t/why-are-these-lines-created-in-gltf-model/14701/9 "2020-04-27T23:06:03Z")

</div>

Roughness is the opposite of glossiness, or shininess. You will need an environment map and a low roughness value for that. Changing the texture will certainly change how any model looks.
