Is there an option in Mesh3d that toggles rendering of backfaces? I.e. faces whose normals point away from the camera (showing its backface). This is a standard openGL/webGL feature, so I wonder if plotly has a way to enable it if it’s not currently supported.
Thanks for the reply @AIMPED. Let me explain more:
Take a house viewed from far outside as an example, and I’m using MeshLab to demo the renderings. If we choose to render all faces, we only see its outside “walls”, like this:
In fact the walls have normals pointing not towards the eye, but away from us, aka back-faces. This is because the “wall” is just the other side of the same faces that also represent the interior geometry. To reveal the interior geometry, a standard technique is asking GL to cull those faces, which exposes all interior faces whose normals point towards us, i.e. front-faces:
Unfortunately I have no direct answer to it. I did not find any reference to this in the help. As I understand, the mesh3D uses Delaunay triangulation which in your case you had to control the normal of the triangles, right? I am not sure if you can do so.
As you can see the interior is fully blocked by the outside walls. On the other hand I can do back-face culling with TriMesh built-in rendering easily:
I really hope Plotly can add this support (@AIMPED Could you maybe @ the person who drives 3d rendering features in Plotly?)
the mesh3D uses Delaunay triangulation
Delaunay triangulation is not involved in rendering a triangle mesh. In fact, it’s an algorithm that generates triangle mesh from a point cloud, so it sits more on the pre-processing side. I know Mesh3D can run it automatically to “mesh” the point cloud as a convenience provided for the user.
you had to control the normal of the triangles, right?
Ideally, from the API side, Plotly can expose “normals” parameter and a flag for “back-face culling”, sth like:
This way during runtime, plotly internally passes the normals and back-face culling flag to underlying rendering engine, e.g. WebGL, which knows which faces are back-faces based on their normals and the current camera.
Thanks. Yea VTK is very powerful so this definitely looks plausible there. I didn’t know Dash has so many C++ visualization libs integrated already. That’s going to be very handy later when I need them.