Jump to content


Catmull-Clark Subdivision (Original Vertex)


7 replies to this topic

#1 appleGuy

    New Member

  • Members
  • PipPip
  • 25 posts

Posted 05 February 2009 - 05:47 PM

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....ivision_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,

#2 Nicholas Christopher

    Member

  • Members
  • PipPip
  • 77 posts

Posted 05 February 2009 - 10: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
Nicholas Christopher
Architecture software development, and modeling
http:\\www.arconovum.com

#3 appleGuy

    New Member

  • Members
  • PipPip
  • 25 posts

Posted 05 February 2009 - 10:46 PM

Nicholas Christopher said:

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

#4 Reedbeta

    DevMaster Staff

  • Administrators
  • 4969 posts
  • LocationBellevue, WA

Posted 05 February 2009 - 11: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.
reedbeta.com - developer blog, OpenGL demos, and other projects

#5 appleGuy

    New Member

  • Members
  • PipPip
  • 25 posts

Posted 05 February 2009 - 11:23 PM

Reedbeta said:

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

#6 appleGuy

    New Member

  • Members
  • PipPip
  • 25 posts

Posted 05 February 2009 - 11: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

#7 Reedbeta

    DevMaster Staff

  • Administrators
  • 4969 posts
  • LocationBellevue, WA

Posted 06 February 2009 - 12:03 AM

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.
reedbeta.com - developer blog, OpenGL demos, and other projects

#8 Nicholas Christopher

    Member

  • Members
  • PipPip
  • 77 posts

Posted 06 February 2009 - 03:57 AM

this might help..

http://www.rorydrisc...ion-the-basics/
Nicholas Christopher
Architecture software development, and modeling
http:\\www.arconovum.com





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users