• Advertisement
Sign in to follow this  

Remove incorrect edges of a 3D reconstruction from a depthmap

This topic is 2625 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


I create a 3D rendering of a depthmap and I am facing a problem:
All plans of the model are connected together or at the bottom with long edge, and I don't know how to remove these sides.
With an example it will be easier (The examples are not mine, I found them on google image) :
Example where we can see that the model is connected to the bottom with long faces. Another example.
I use triangleList, that I fill with :
for(int y = 0; y < depthmap_height-1; y++)
for(int x = 0; x < depthmap_width-1; x++)
CustomVertex.PositionNormalTextured pnt = new CustomVertex.PositionNormalTextured();
pnt.X = (float)x;
pnt.Y = (float)y;
pnt.Z = (float)GetAltFromDepthmap(x,y);
pnt.Tu = (float)((float)x / (float)(width -1));
pnt.Tv = (float)((float)y / (float)(height -1));
// Following addition of the vertex in the vertex buffer, and then calculating
- What is the way to remove these long faces on the side of the model?

-What is the best way to remove a face in the shader?
For now, I success with output.position =0 , placed in the pixel shader, but it doesn't work in the vertex shader. And I know that is it a bad way to remove a face from the screen.

PS : [font="arial, sans-serif"]I found a trick in searching for images for example:[/font] here.
They say : "remove surfaces that are at a sharp angle to the viewing direction". But I don't know how to start with this.

Can you help me please?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement