该角色是一个具有某些网格物体的对象3D.
我试图克隆和设置一个背面材料,但它没有工作,问题是每个立方体的形状是单独渲染背面,所以大纲是错误的.
解决方法
What I SUSPECT needs to be done is something like this: 1. First the background needs to be rendered 2. Then,on a separate transparent layer,the character model with a flat color,slightly bigger than the original,3. On another transparent layer the character with its normal material / texture 4. Finally,the character layer needs to go on top of the outline layer and them combined need to be placed in the bg
您只需创建多个场景,并将它们与顺序渲染过程相结合:
renderer.autoClear = false; . . . renderer.render(scene,camera); // the entire scene renderer.clearDepth(); renderer.render(scene2,camera); // just the selected item,larger,in a flat color renderer.render(scene3,camera); // the selected item again
这是一个使用GPU采摘实现的小提琴,但它可以很容易地与更熟悉的Raycaster实现:
小提琴:http://jsfiddle.net/Tcb3z/
three.js.r.66
原文地址:https://www.jb51.cc/js/150782.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。