Tessellation
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?
Take the average of all four vertices, and the average of each pair of adjacent corners:
then connect the old and new points to make four quads
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement