I coded loop subdivision and ran it on a cube with triangle faces. I noticed this:

enter image description here

I am using doubles to represent my vertex positions, I am not 100% sure these are caused by floating point imprecisions, but since the general shape looks ok I am not sure what else it could be.

Any suggestions on how to find the cause? My linear algebra library is glm and I am coding this in C++.

  • $\begingroup$ Is it easy to try with f32 and see if things get worse? $\endgroup$
    – user2500
    Feb 17, 2020 at 17:12
  • $\begingroup$ They don't it looks the same with floats $\endgroup$
    – Makogan
    Feb 17, 2020 at 18:07
  • $\begingroup$ You're not accidentally updating a source vertex position before it's been referenced by other vertex calculations are you? $\endgroup$
    – Simon F
    Feb 19, 2020 at 18:06
  • 1
    $\begingroup$ @SimonF I don't think I am, I can go and check again, but the algorithm first calculates all the new positions, stores them in a container, and only once the calculation loop is finished do I start the loop to update the positions. Also these artifacts only start to pop after the 4th ish iteration, the first 2-3 don't seem to exhibit any artifacts. $\endgroup$
    – Makogan
    Feb 19, 2020 at 18:27


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.