Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

Per vertex ambient occlusion
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=481
Page 2 of 2

Author:  David Williams [ Fri Feb 22, 2013 10:08 am ]
Post subject:  Re: Per vertex ambient occlusion

Dynasty wrote:
Each is decomposed into two separate triangles. There are two possible different ways you can partition the face into two triangles. For each diagonal of the square, take the absolute difference in lighting levels between the two vertices on the diagonal. You should partition the face so that the set of diagonals with the lowest absolute difference in lighting form the hypotenuse of the triangles.


Very interesting! But it's not clear to me if this really fixes the problem or simply minimizes the extent to which it occurs (which is also nice of course)?

And so are you doing this during surface extraction or afterwards? I would imagine that during extraction would be the easiest time to switch the order of the triangles but you'd have had to dive a little deeper into PolyVox.

Author:  Dynasty [ Sat Feb 23, 2013 2:28 am ]
Post subject:  Re: Per vertex ambient occlusion

David Williams wrote:
Very interesting! But it's not clear to me if this really fixes the problem or simply minimizes the extent to which it occurs (which is also nice of course)?

And so are you doing this during surface extraction or afterwards? I would imagine that during extraction would be the easiest time to switch the order of the triangles but you'd have had to dive a little deeper into PolyVox.


It minimizes the problem to the point where it is unnoticeable. I am calculating the lighting level for each block after the map is loaded and saving it in each voxel. I modified CubicSurfaceExtractorWithNormals.inl to apply the lighting to each vertex and also to make sure that the triangles are divided correctly.

Page 2 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/