Tessellation

Started by
1 comment, last by OrenGL 19 years, 8 months ago
G'day, I have 4 vertices ( x1 y1 z1, x2 y2 z2 etc..) which make up a quad. I then want to tessellate that quad into smaller quads so i need to calculate the vertices for each of the smaller quads. I'm doing this for lighting purposes because opengl calculates light on a per-vertex basis so to get accurate lighting i need to spit my quad up into smaller quads. I'm a little stumped on this one, any ideas?
Advertisement
Take the average of all four vertices, and the average of each pair of adjacent corners:
X----0----X|         ||         |0    0    0|         ||         |X----0----XX -> original vertices0 -> averaged points


then connect the old and new points to make four quads
X----0----X|    |    ||    |    |0----0----0|    |    ||    |    |X----0----XX -> original vertices0 -> averaged points
Its not going to end there, not everything is going to be a quad. Tessellation can get quite complex. If you need better lighting consider shaders, even the simplest phong shader would do better than Tessellation.
Don't shoot! I'm with the science team.....

This topic is closed to new replies.

Advertisement