Transparent cube with edges on sides

@Lakshmi
At all the respect, I won’t do your job for you.

The thing you’re requesting is something not basic.

There are several options:

  1. Create a topic in Jobs category.
  2. a) Create an object, containing 12 lines (box edges), each line has two normals - find dot-product of those normals with the view vectors in camera space, and if the result for both of them is negative, then set .visible property of a specific line object to false.
    b) Create a custom buffer geometry of pairs of points, where each pair defines a line of edge. Using a buffer attribute, add two normals to each point of each line egde. Do the same math, described in a), but now you process it in shaders, hiding lines with discard.
  3. Maybe my approaches are overcomplicated and somebody has easier/simpler ideas to share.

References:

  1. Way to hide Points if geometry is seen from backside? - #8 by prisoner849
  2. Get OrbitControls Azimuth Angle - #2 by prisoner849
  3. And maybe this one will be helpful too (thanks to @gkjohnson): LDraw-like edges
2 Likes