Transparent faces in mesh plots overlap incorrectly
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
Normally, when a face is opaque it can obscure other faces, or if the camera is rotated 180 degrees the first is now obscured by the second. This is currently not true for faces with opacity < 1. Instead it seems as if they are always layered in order of creation, so the first face in the mesh will always be on top (or beneath?) the others, no matter their relative 3D location.
The example contains 4 triangles: the two on the left are opaque while the two on the right are transparent.
- Notice how the orange face is always in front of the blue one, even though they intersect and part of it should be behind, as demonstrated by the purple and red triangles.
- Even if the camera is rotated.
https://codepen.io/anon/pen/bQqeMg
This leads to situations where obscured objects are drawn in front. All the boxes in the image below are either behind or inside the Blue one.
Observed in Chrome 70.0.3538.102 and Firefox 63.0.1 (64-bit) on Win 10
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从链接的 CodePen 复现开始,并在 Chrome 或 Firefox 中运行它。旋转摄像机时,比较相交的不透明三角形和透明三角形,然后验证透明面是按其 3D 位置而不是创建顺序排序的,并且被遮挡的对象不再渲染在前面。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- computer-graphics, data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100