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

Mesh decimation in PolyVox
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=2&t=106
Page 2 of 2

Author:  David Williams [ Thu Jan 06, 2011 10:25 pm ]
Post subject:  Re: Mesh decimation in PolyVox

Ok, I've done some optimisation and the mesh I mentioned previsouly is now taking a more reasonable 42ms to decimate. It's pretty close to real time even if you don't do the decimation in the background - I'm blowing holes in the terrain in Thermite and it's working nicely. That said, it's still rather slow in debug builds. Anyway, I think you guys can give it a test if you like :-)

There is some class documentation available here, but the bit you really want to know is:
Quote:
Given a mesh called 'mesh', you can create a decimated version as follows:
Code:
SurfaceMesh<PositionMaterial> decimatedMesh;
MeshDecimator<PositionMaterial> decimator(&mesh, &decimatedMesh);
decimator.execute();

Let me know how it works out, and if you do see any rendering performance improvements. I haven't even tested that aspect in Thermite yet.
onimatrix wrote:
Nice work David! I left my project on standby after starting to work in Facebook games (Yeah... I have to eat). I need every minute I have to get inside the social game mindset. Hopefully, the games with which I have grown will overthrow this... thing.

I've never played a Facebook game - I guess I'm not 'Web 2.0' enough for that kind of thing ;-) Still, I've wondered whether there's some potential for voxels with WebGL...

Author:  AndiNo [ Fri Jan 07, 2011 10:57 am ]
Post subject:  Re: Mesh decimation in PolyVox

Actually that sounds very promising: Going from 380ms to 42ms is a speed increase of about 900% :) Was this only in that specific case or did you speed up the algorithm for any mesh (which I assume)?
Anyway, thanks for your continued efforts. As mentioned earlier I think this will (technically) fit into my game perfectly.

Author:  David Williams [ Fri Jan 07, 2011 6:21 pm ]
Post subject:  Re: Mesh decimation in PolyVox

Sure, it's a general improvement so should help all the meshes. I'm pretty sure there's more that can be done so I expect I'll come back to it in the future. But there's just too many other exciting things to work on now :-)

Author:  AndiNo [ Fri Jan 07, 2011 10:43 pm ]
Post subject:  Re: Mesh decimation in PolyVox

Just make sure it's in an useable state (otherwise your work would be in vain) and then take your time for other things. :)

Author:  David Williams [ Sat Jan 08, 2011 12:17 am ]
Post subject:  Re: Mesh decimation in PolyVox

Yep, it's definately usable now. It's just a few lines of code to use, so give it a go when you get a chance and let me know what difference it makes.

Author:  Will Smith [ Thu Apr 21, 2011 9:54 am ]
Post subject:  Re: Mesh decimation in PolyVox

I've ran into a small issues with basic use of decimation. I love the concept and I can see huge performance gains though using it, Very exciting stuff.

Here is an image before and after decimation.
Image

As you can see the left and right sides in the picture only have 1 vertex.

I'm using Ogre3D, and Ogre::ManualObject for the surface mesh data and just wondering if perhaps I am doing something wrong? without decimation seems to be working just fine.

Author:  David Williams [ Thu Apr 21, 2011 5:42 pm ]
Post subject:  Re: Mesh decimation in PolyVox

This sounds like the bug described here: http://www.thermite3d.org/phpBB3/viewtopic.php?f=15&t=195

Just read the first two posts - the rest of the thread goes on to describe a different issue. You can try making the suggested change to 'canCollapseRegionEdge' to see if it helps, though you may not get as much decimation then. You can also try changing the other 'canCollapseXXXEdge' functions to return false to see which one of them makes a difference.

Anyway, it's something I need to look at, though as discussed in this thread there are some issues with the MeshDecimator which mean I might end up rewriting it differently.

Author:  DefiniteIntegral [ Fri Apr 22, 2011 3:58 am ]
Post subject:  Re: Mesh decimation in PolyVox

Yeah that looks like the same bug I encountered. Sorry I haven't had time to edit/re-compile PolyVox to test yet due to computer issues.

If I can get my computer working again today I will look at it and post the result.

Edit:

Have a look at this thread.

Author:  RiderV [ Wed Aug 08, 2012 5:57 am ]
Post subject:  Re: Mesh decimation in PolyVox

Image in first post dos't show.

Author:  David Williams [ Wed Aug 08, 2012 1:04 pm ]
Post subject:  Re: Mesh decimation in PolyVox

The images are hosted on ImageShack and it looks like it might be running slow or have a problem. This thread is pretty old though, and we'll probably remove this approach to decimation as it's slow/buggy. The CubicSurfaceExtractor already has much better decimation built in.

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