Author Topic: Shared vertices in subdivision  (Read 455 times)

0 Members and 1 Guest are viewing this topic.

Offline Xetick

  • Atari ST
  • ***
  • Posts: 106
  • Karma: 73
    • View Profile
    • Plane9
Shared vertices in subdivision
« on: February 07, 2010 »


I have added a catmull clark subdivision algorithm to my program however I have run into the problem with shared vertices.

Example:
Take a cube. If you add textures to each side you need to split up the vertices so you end up with 6 "stand alone" quads that have no real relation to each other. If you try to subdivide that you end up with smaller smoothed quads.

The only solution I can come up with is to keep the vertices shared and apply a flat texture projection on each side after the subdivision step or is there something I'm missing?

Plane9 - Home of the Plane9 3d screensaver/music visualizer
Challenge Trophies Won:

Online Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5097
  • Karma: 379
    • View Profile
Re: Shared vertices in subdivision
« Reply #1 on: February 07, 2010 »
I don't think you're missing anything.  Either the vertices are shared and so primitives get subdivided that way, or your data structure says these two vertices are shared (same x,y,z, different anything else) and your algorithm marks the primitives with that vertex in for subdivision also.
It's not easy at all to avoid the cracking/holes caused by shared edges between patches.
Jim
Challenge Trophies Won: