Dark Bit Factory &  Gravity

Dark Bit Factory & Gravity

  • July 30, 2010 *
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Pages: [1]   Go Down

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

0 Members and 1 Guest are viewing this topic.

Xetick

  • ZX 81
  • *
  • Karma: 3
  • Offline Offline
  • Posts: 22
    • View Profile
    • WWW
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?

Logged
Plane9 - Home of the Plane9 3d screensaver/music visualizer

Jim

  • ADMIN
  • Senior Member
  • ********
  • Karma: 325
  • Offline Offline
  • Posts: 4676
    • 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
Logged
Pages: [1]   Go Up
 

 

B l a c k R a i n V.2 by C r i p

Page created in 0.095 seconds with 19 queries.