Sign in to follow this  

Tessellation

This topic is 4859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Take the average of all four vertices, and the average of each pair of adjacent corners:

X----0----X
| |
| |
0 0 0
| |
| |
X----0----X

X -> original vertices
0 -> averaged points


then connect the old and new points to make four quads

X----0----X
| | |
| | |
0----0----0
| | |
| | |
X----0----X

X -> original vertices
0 -> averaged points

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this