Im trying to render a STL - File. The Problem is that the normals are messed up.
This leads to parts of the model beeing seethrough.
In order to counter this effekt I called:
However this leads to black faces…
How can I fix this?
In fact, specialized editors such as blender are better suited for this. I don’t think you can fix this in Panda.
I fixed it. Things I didn’t know and helped me fixing it:
- Backfaceculling only relies on the order of the vertices. It generates its own normal vert for each triangle.
vert1, vert2, vert3 -> normalvert
vert2, vert1, vert3 -> -normalvert
- This internal normalvert is independant of the normals you pass to the mesh. The normals passed to the mesh only effect the shading / lighting of the triangle.
- Every single vert needs a normal
So in order to fix it. I simply duplicated all vertices, half of them rearranged to avoid the backfaceculling.
Then duplicate all normales, and flip half of the normals.
That way I had true double sided rendering without weird shading.