dilevin / computer-graphics-meshes

Computer Graphics Assignment about Meshes
1 stars 5 forks source link

Catmull Clark moved vertices bug #50

Open hugoksp opened 10 months ago

hugoksp commented 10 months ago

Hi, I've been working on the catmull clark and I am encountering an issue that I've been debugging but of no progress. I am able to run 1 instance of subdivision then the mesh is no longer water tight as the new vertices seem not to map to the same location anymore. Does anyone have some pointers on where I can start looking to debug this issue?

image image

hugoksp commented 10 months ago

To add on, I've been mapping each face's F(i, j+1), F(i, j-1) to a set of map <original point, neighboring points> when looping each face. However, when checking I find that the neighboring points size don't always match to 4 for some reason. Is this a wrong approach to finding the neighboring vertices for each point?

Zhecheng-Wang commented 10 months ago

Start with a simpler shape -- for example, a cube (you get it from cube.cpp). Trace how many vertices are generated for every subdivision iteration, those are fixed for a cube. Are there any dangling/duplicated vertices?