Jump to content
  • Advertisement
Sign in to follow this  
KimPetersen

Tessellation

This topic is 5045 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
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----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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!