It is currently Wed Dec 11, 2019 4:29 am


All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Mesh decimation in PolyVox
PostPosted: Thu Jan 06, 2011 10:25 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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...


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Mesh decimation in PolyVox
PostPosted: Fri Jan 07, 2011 10:57 am 

Joined: Sun Oct 03, 2010 10:13 pm
Posts: 73
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Mesh decimation in PolyVox
PostPosted: Fri Jan 07, 2011 6:21 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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 :-)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Mesh decimation in PolyVox
PostPosted: Fri Jan 07, 2011 10:43 pm 

Joined: Sun Oct 03, 2010 10:13 pm
Posts: 73
Just make sure it's in an useable state (otherwise your work would be in vain) and then take your time for other things. :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Mesh decimation in PolyVox
PostPosted: Sat Jan 08, 2011 12:17 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Mesh decimation in PolyVox
PostPosted: Thu Apr 21, 2011 9:54 am 

Joined: Thu Apr 21, 2011 1:13 am
Posts: 18
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Mesh decimation in PolyVox
PostPosted: Thu Apr 21, 2011 5:42 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Mesh decimation in PolyVox
PostPosted: Fri Apr 22, 2011 3:58 am 

Joined: Sun Jan 23, 2011 6:06 am
Posts: 92
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Mesh decimation in PolyVox
PostPosted: Wed Aug 08, 2012 5:57 am 

Joined: Sun Aug 05, 2012 2:14 am
Posts: 1
Image in first post dos't show.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Mesh decimation in PolyVox
PostPosted: Wed Aug 08, 2012 1:04 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 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