Tool or algorithm for mesh tessellation

Started by
2 comments, last by eppo 10 years, 2 months ago

Recently I switched to logarithmic depth buffer in order to fix depth-fighting artifacts in large scenes. Sadly, while this technique works brilliantly on highly tessellated meshes, it performs poorly on low poly ones. One solution to this issue consists in writing depth from the pixel shader but I'd prefer to avoid it for reasons related to performance and complications to the shader pipeline. Furthermore, I cannot use a floating point depth buffer, as suggested in other threads, as I need the stencil and I want to keep bandwidth and memory consumption down to a minimum.

Most of my 3D models have a high poly count and behave well but some have long big triangles that suffer from obvious depth testing artifacts. I would like to preprocess them, either using an existing free tool or by writing my own tessellation algorithm. I'm still using DirectX 9 so HW tessellation is not an option yet. Do you know any tool or simple subdivision schemes that would help in this case?

Thanks a lot

Advertisement

Can't you use a D24S8 depth stencil format? If you want to keep memory consumption low, then I don't see how needlessly adding more detail to meshes would help.

A simple subdivision algorithm (basically tension-less Catmull-Clark subdivision):

- add a point to the center of every edge

- add a point to the center of every face (average of all its vertices)

- connect face and edge points

subdiv.png

I'm already using a D24S8 depth buffer format with a logarithmic encoding. As explained above, it works brilliantly except for large triangles. My goal is to subdivide only these triangles (based on an area metric), not all triangles of all meshes indiscriminately. Your suggested subdivision scheme seems appropriate and I will try it soon. Are T junctions going to complicate the algorithm ? I vaguely remember an article in a ShaderX book dealing with this topic but can't remember what is was.

Are you saying your meshes already contain t-junctions, or are you afraid a subdivision pass might create them? Because you'll want to prevent those to avoid rendering artefacts.

You can do adaptive subdivision by creating a triangle-fan on non-subdiv faces that connect to an edge-point on a subdiv face.

subdiv2.png

This topic is closed to new replies.

Advertisement