Skip to main content
GameDev.net gamedev.net
🔒 Locked

Polygon reduction by stan Melax

Started by serious_learner07 Jul 26, 2010 at 7:54 AM 0 replies 3.3k views
Original Post
serious_learner07
serious_learner07

I am trying to understand the Polygon Reduction by stan Melax described in the paper Polygon Reductionusing ProgressiveMesh


Algorithm seems to be fairly straighforward, except the cost factor calculation, used for deciding the vertex to be collapsed.

cost(u,v) = ||u-v|| * max{ min{(1-dot(f.normal,n.normal))/2}

(Here u, v are the vertices (v to be collapsed to u), f.normal is the face normal of each triangle having the common vertex u and n.normal is normal of each triangle sharing the edge uv. Inner function (min) will loop for each triangle sharing edge uv and the outer function (max) will loop for each triangle sharing the vertex u).

I didn't understand the expression (1-dot(f.normal,n.normal)). why dot product is used and why he is subtracting dot product from 1. and also why he is taking the max in the outer loop. It should be minimun function.





apatriarca
apatriarca
(1-dot(f.normal,n.normal)) calculates how similar the two normals are. dot(f.normal, n.normal) is in fact the cosine of the angle between the two normals and it approach 1 when the angle approach 0.
Since you want to estimate the error introduced by the vertex contraction, it estimates the error introduced at each triangle containing u (the min part) and calculates the maximum. Note that it is just an euristic and he decided it because it was the equation it works best in his experiments. You may want to test other euristics.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.