It is currently Sat Aug 22, 2020 4:30 am


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Cracks in mesh when using CubicSurfaceExtractor
PostPosted: Thu Feb 07, 2013 4:42 pm 
User avatar

Joined: Thu Feb 07, 2013 3:27 pm
Posts: 2
Location: Leeds, England
Hi All,

I currently have PolyVox running in the GamePlay3D engine rendering a 100x100x50 voxel volume. The mesh is extracted using the CubicSurfaceExtractor class with the basic MaterialPosition voxel type. I have noticed that in the render output I can see missing pixels that show up as black when rotating the mesh. I'm pretty sure the missing pixels lay on the boundaries between long triangles where the mesh extractor has optimised similar voxels out of the mesh.

Has anyone else encountered the problem or have any ideas how to solve it?

I've tried using a really basic pass through shader, so no lighting/texturing just basic vertex transformation and solid colour, and still see the artifacts. I've also tried playing about with the depth buffer (even turning it off) but it doesn't seem to have helped. I think it must be to do with rounding issues between the vertices.

I uploaded a couple of screenshots. The solid one is in pure white to make the cracks stand out. It's much more visible when everything is moving!

Solid model
https://docs.google.com/file/d/0B2oFnEV ... h0TnM/edit

Wireframe model
https://docs.google.com/file/d/0B2oFnEV ... xzX00/edit

I've also tried the CubicSurfaceExtractorWithNormals class and that does not exhibit the same pixel sized holes in the mesh. But then, it is also using 24 vertices for each cube which aren't shared.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Cracks in mesh when using CubicSurfaceExtractor
PostPosted: Fri Feb 08, 2013 10:24 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Actually this is a known issue, and you can see it occurring in some of the screenshots I have posted on the blog recently: http://www.volumesoffun.com/wordpress/w ... icLod0.png (notice the single black pixel to the right of the lower-left lake).

The issue appears to be that the cubic mesh simplification generates T-junctions in the mesh. I started documenting this in the manual but I need to add some figures to explain it properly. In response to this post I have also opened an issue for this: https://bitbucket.org/volumesoffun/poly ... lification

I don't know if/when/how we will fix it, but it is something which affects my current work so it will at least get investigated. Currently the only real solution is to switch off the mesh simplification by passing a flag to the CubicSurfaceExtractor.

Not that this problem is most visible in the kind of image which you have shown, and is less visible when you add textures, lighting, etc. For example it should exist in Voxeliens but I have never noticed it because of the way we darken the edges of the voxels.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Cracks in mesh when using CubicSurfaceExtractor
PostPosted: Fri Feb 08, 2013 8:25 pm 
User avatar

Joined: Thu Feb 07, 2013 3:27 pm
Posts: 2
Location: Leeds, England
Hi there,

Ok, I didn't know it was a known issue, thanks for the details on that. I'll have a think on it anyway and if I come up with anything I'll pass on the details. I did notice though that using the same drivers and the fixed function pipeline I don't get the missing pixels versus a customised pipeline. It's not a fix because I'm developing for mobile devices but it could be indicative of a way around the problem. I'm using Linux at the moment with the mesa drivers so I'm not sure what the fixed function pipeline is doing. It might be hard to even find the shaders in use for it with it being mesa owned... I'll see :-)

Also, just wanted to say what an excellent community it is here and your work on the PolyVox library is excellent. It's just what I was looking for. Hopefully I may be able to contribute something back in return.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Cracks in mesh when using CubicSurfaceExtractor
PostPosted: Sat Feb 09, 2013 4:41 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
gsfare wrote:
I did notice though that using the same drivers and the fixed function pipeline I don't get the missing pixels versus a customised pipeline.


I didn't know this and it is very interesting. I'm not sure exactly what the implications are but I'll investigate... It's likely that the order of operations makes a difference, as may combining multiple transformation matrices into a single one. I expect the fixed function version will still show errors at some point but perhaps only further from the origin?

gsfare wrote:
Also, just wanted to say what an excellent community it is here and your work on the PolyVox library is excellent. It's just what I was looking for. Hopefully I may be able to contribute something back in return.


Thanks :-)


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net