Does anyone have any insight to how Blender's edge-split algorithm works?

I need hard lighting for an OpenGL project I'm working on that uses per-vertex normals to calculate shading, and I'd rather not have to go through the trouble of rewriting the engine to allow for both per-vertex and per-face normals to calculate lighting. I think it'd be easier to just apply the edge-split algorithm to imported models that use flat shading.


  • $\begingroup$ i'm not sure if your question belongs here.. are you expecting a pseudo code ? an explanation on how it works ?? better read and study the source file to see how it works internally ,not 100% sure but it looks like it identifies and tags the edges to be split based on the angle or if they are maked as sharp, then it duplicates the 2 verticies that make up an edge, to make it appear sharp instead of smooth and finally clean up by removing any double vertices. $\endgroup$ – user2816 Jun 20 '16 at 5:55
  • $\begingroup$ That's more or less exactly what I was looking for -- thanks. $\endgroup$ – haji beats Jun 20 '16 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.