PDA

View Full Version : Catmull-Clark Subdivision (Original Vertex)


appleGuy
02-05-2009, 10:47 AM
Hi,
I posted this on the opengl.org forum. it hasn't caught much attention so i thought I would try here.

Hi,

im having a little trouble with moving the original vertex, based on the algorithm:
http://en.wikipedia.org/wiki/Catmull-Clark_subdivision_surface

Assuming I have a quad of: (-1, -1, -1), (1, -1, 1), (1, 1, -1), (-1, 1, -1)

Now say i want to re-position the top left vertex (-1, 1, -1)

**The centroid of the face is: (0.0, 0.0, -1.0)

**The Valence is 2

**The Average Of mid points connection vertex is: (-0.5, 0.5, -1.0)

If i plug those into the formula i get:
vp = (([0, 0, -1] + (2 * [-0.5, 0.5, -1.0]) + ((2-3) * [-1, 1, -1] ))) / 2
= ([0, 0, -1] + [-1, 1, -2] + [1, -1, 1]) / 2
= [0, 0, -2] / 2
= [0, 0, -1]

This is not the correct position for the original point however.

Please can someone tell me where im going wrong?

Thanks,

Nicholas Christopher
02-05-2009, 03:14 PM
looking quickly maybe I am wrong but is [n] not supposed to be 3 here?

so 3-3 not 2-3.. and the division also

appleGuy
02-05-2009, 03:46 PM
looking quickly maybe I am wrong but is [n] not supposed to be 3 here?

so 3-3 not 2-3.. and the division also

n is the valence, which for every vertex on the quad (I am only subdividing a single quad) is 2, as every vertex has 2 edges coming off it.

Cheers,
Alex

Reedbeta
02-05-2009, 04:07 PM
I don't think Catmull-Clark subdivision is supposed to work on a mesh with edges or holes, like a single quad. It's only well-defined for 2-manifold meshes, in which every edge connects two distinct faces.

You should try it on a cube.

appleGuy
02-05-2009, 04:23 PM
I don't think Catmull-Clark subdivision is supposed to work on a mesh with edges or holes, like a single quad. It's only well-defined for 2-manifold meshes, in which every edge connects two distinct faces.

You should try it on a cube.

Hi,

Ok I will. Are you absolutely sure on this. I wonder how applications like modo, allow for this....

Cheers,
Alex

appleGuy
02-05-2009, 04:26 PM
Strangely enough ...

If i put the valence as 4. With a single quad (with actual valence of 2) ... it gives me the correct subdivision.


I wonder if this is a trick they use in the commercial apps...

Cheers,
Alex

Reedbeta
02-05-2009, 05:03 PM
To be honest I wouldn't even know what the subdivision surface from a single quad 'ought' to look like. What would you expect to get at the end? A circle?

If professional apps allow you to do this, I'd think they must be using some modified subdivision rule at the edges, perhaps fudging the valence as you suggest, but I don't know enough about it to say.

Nicholas Christopher
02-05-2009, 08:57 PM
this might help..

http://www.rorydriscoll.com/2008/08/01/catmull-clark-subdivision-the-basics/