Jump to content

  • Log In with Google      Sign In   
  • Create Account


Tool or algorithm for mesh tessellation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Reitano   Members   -  Reputation: 471

Like
0Likes
Like

Posted 23 January 2014 - 04:37 AM

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



Sponsor:

#2 eppo   Crossbones+   -  Reputation: 2312

Like
0Likes
Like

Posted 23 January 2014 - 08:51 AM

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



#3 Reitano   Members   -  Reputation: 471

Like
0Likes
Like

Posted 24 January 2014 - 04:43 AM

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.



#4 eppo   Crossbones+   -  Reputation: 2312

Like
0Likes
Like

Posted 25 January 2014 - 08:37 AM

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






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS