It is currently Sat Aug 22, 2020 3:42 am


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Cubiquity pixel artifacts
PostPosted: Fri May 25, 2018 4:16 pm 

Joined: Tue Apr 10, 2018 3:48 pm
Posts: 4
So, I'm using the OpenGL renderer for Cubiquity. I'm writing my own game engine for fun around it and when I added a Skybox, I notice pixel artifacts shining through the voxel model at cube seams. I attached a pic of it (look at the whitish dots in the brown blocks). Hard to capture it as well on an image, but as you move around the artifacts all twinkle at you. I've had something similar happen to me in the past when I used texture coordinates and there was rounding issues. But, since there's no textures, this seem more like floating point precision issues or something... Is there a way around this?


Attachments:
Screenshot.jpg
Screenshot.jpg [ 184.76 KiB | Viewed 9502 times ]
Top
Offline Profile  
Reply with quote  
 Post subject: Re: Cubiquity pixel artifacts
PostPosted: Sat May 26, 2018 2:26 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
The artefacts which you are seeing are caused by T-junctions in the extracted mesh. This is a difficult problem to avoid and affects many voxel engines. There is a nice blog series about voxel mesh extraction below, and part three talk briefly about this issue:


The conclusion is basically that it is hard to fix, and the author references my suggested approach of simply fixing up the problems in a image post-processing step. I haven't actually tried this myself but the author seemed to have success with it.

You may also find the flickering pixels are particular annoying when you have large areas of plain colour, but once you add lighting and possibly normal maps it may be less obvious. I never noticed them in Voxeliens, for example, but I also had the advantage of a dark skybox there.

But ultimately it is a problem with PolyVox/Cubiquity, it is not something you are doing wrong.

Hope that helps!


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Cubiquity pixel artifacts
PostPosted: Sat May 26, 2018 4:39 pm 

Joined: Tue Apr 10, 2018 3:48 pm
Posts: 4
Ok, yeah I remember reading about t junctions in your wiki. I didn’t remember seeing them in my ogre3d/polyvox experiments. Sounds like I should hit them in there too, so glad it’s not something unique in my setup. I’ll read up on the link you sent. Thanks!


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Cubiquity pixel artifacts
PostPosted: Sat May 26, 2018 9:06 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
xtitus wrote:
I didn’t remember seeing them in my ogre3d/polyvox experiments. Sounds like I should hit them in there too...


In principle you should, but there can be a number of factors at play. Early version of PolyVox did not perform the 'greedy meshing' (adjacent quads were not combined) which would probably have avoided T-junctions but at the expense of high triangle counts. Also, because the issue is related to floating point precision it will be more serious further from the origin, and may depend on other factors such as whether you combine your model/view/projection matrices into a single matrix before applying them.

On an unrelated note (just because you are one of the few users of Cubiquity) I recently posted a little insight into my work on Cubiquity 2 on Reddit:


Also, I'm going to be away for the next couple of weeks so I may not be able to reply to any questions.


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: Majestic-12 [Bot] 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