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


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Help with Region Borders - demonstrates t-junction problem?
PostPosted: Tue Nov 29, 2011 3:19 am 

Joined: Thu Apr 21, 2011 1:13 am
Posts: 18
Hello,

When filling a volume with data like this:
Code:
volumeData(Region(Vector3DInt32(0,0,0), Vector3DInt32(8, 1, 8)))

{0,0,0,1,0,0,0,0},
{0,1,1,1,1,1,2,0},
{4,4,0,0,0,0,2,0},
{4,4,0,1,2,0,2,2},
{4,4,0,4,3,0,2,2},
{4,4,0,0,0,0,2,0},
{0,4,3,3,3,3,2,0},
{0,0,0,3,3,3,0,0},



When surface extracting the 1 voxel(data 1) on the first x row, and 4 voxels(data 4) on the first z row have an issue with the outer voxel face not being built. I am using the CubicSurfaceExtractorWithNormals<SimpleVolume,MaterialDensityPair44>

I'm trying to setup loading and saving Voxel data for assets, so my regions for this purpose need to be tight. I would rather not use magic numbers or hacky larger regions to get it to work.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Help with Region Borders
PostPosted: Tue Nov 29, 2011 7:56 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Yeah, I'm actually aware of this. You should switch to the regular CubicSurfaceExtractor if you can as this handles the edge cases correctly. It also performs decimation of the resulting mesh and is generally faster/better.

I only really intended the 'WithNormals' version to be used while people are becoming familier with PolyVox, as they may be confused by having to generate the normals themselves in shader code. I could fix the edge cases but it complicates the code (making it harder to learn from and maintain).

Can you switch to the regular CubicSurfaceExtractor?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Help with Region Borders
PostPosted: Tue Nov 29, 2011 10:02 pm 

Joined: Thu Apr 21, 2011 1:13 am
Posts: 18
I am using vertex colouring instead of textures for my project so I shouldn't need the normals anymore. (Previously I was generating UVs and not using a shader for texturing)

I will try it when I get home. I was also having trouble getting mesh decimation to work properly so it's good to hear the regular CubicSurfaceExtractor will solve my issues.

Thank you for the quick response :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Help with Region Borders
PostPosted: Wed Nov 30, 2011 6:00 am 

Joined: Thu Apr 21, 2011 1:13 am
Posts: 18
Ok, Just converted it so I am using the CubicSurfaceExtractor<SimpleVolume,Material8> and it handles the region edges fine now.


I wonder if anyone with ogre experience might know why
I am having an issue with using meshdecimation (bMergeQuads).
When it's enabled and I move the camera around I see little flickers of holes(about the size of a pixel) in the mesh.

Thanks again for the help David :D


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Help with Region Borders
PostPosted: Sat Dec 03, 2011 12:25 am 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
Those holes are the result of t-junction problems. I don't think there is a way to resolve it unless you fix it by using skirts or split the polys properly. I'm currently using skirts and it reduces the problem to a barely noticeable level. But the way I'm using skirts is hackish so I may improve it later.

Another method is perhaps use tessellation if you have dx11 to get rid of t-junction.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Help with Region Borders
PostPosted: Sat Dec 03, 2011 4:38 am 

Joined: Thu Apr 21, 2011 1:13 am
Posts: 18
thanks for the info, since my game is simple I don't want to use dx11 because despite being 2011 people still run winxp :{

I think for now I will just not use decimation and revisit this at a later time.

Thanks for the info :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Help with Region Borders
PostPosted: Sat Dec 03, 2011 7:24 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Interesting... I wasn't aware that there was a problem with t-junctions in the decimated mesh. But logically it does make sense that they could occur. Maybe I haven't seen them due to having antialiasing on or something.

Anyway, I would consider this to be a bug in PolyVox. Not sure if/how it can be fixed but I'll investigate. I'll also move this to the bugs forum.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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