THREE.js-具有导入模型的图形故障 [英] THREE.js - Graphical Glitch with an imported model

查看:170
本文介绍了THREE.js-具有导入模型的图形故障的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用JSONLoader时,导入的模型出现图形故障. 我无法真正解释它,您必须看到它.
它可能与不同的材质和相机POV有关.

I'm experiencing a graphical glitch with an imported model while using JSONLoader. I can't really explain it, you'll have to see it.
It may have something to do with the different materials and the camera POV.

您可以在这里找到塞子:
http://plnkr.co/edit/0VjHiGNmWFHxdoMWC3GV?p=info

You can find the plunk here:
http://plnkr.co/edit/0VjHiGNmWFHxdoMWC3GV?p=info

JSONLoader部分代码:

JSONLoader part of the code:

var loader = new THREE.JSONLoader();
loader.load( 'tv.js',
        function ( geometry, materials ) {
        var tv = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial(materials) );
        glScene.add(tv);
} );

故障的屏幕截图

推荐答案

您指的是小故障"是由于z战.

The "glitch" you are referring to is due to z-fighting.

您的相机的近平面为0.01,远平面为20000.近平面的值过小会导致深度分类的精度问题.

Your camera near plane is 0.01 and far plane is 20000. Small values of the near plane can lead to depth-sorting precision problems.

根据您的情况,将您的近平面设置为1或10.

In your case, set your near plane to, 1 or 10.

ref: http://www.opengl.org/wiki/Depth_Buffer_Precision .

three.js r.81

three.js r.81

这篇关于THREE.js-具有导入模型的图形故障的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆