It is currently Sat Aug 22, 2020 2:02 pm


All times are UTC




Post new topic Reply to topic  [ 13 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: How to boost FPS? (main problem: PolyVox!)
PostPosted: Wed Apr 27, 2011 5:48 pm 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
Nice, to it seems to be quite a popular request here, which I'd think is quite expectable :)

About your suggestion, what do you mean? Something like:

1. Downsample volume.
2. Create mesh (apply scale matrix to vertex buffer)
3. IF region intersects different LOD of higher resolution:
* - Create the geometry for the intersecting border using the higher resolution LoD and add the border geometry to the vertex buffer (unscaled of course)

Is that your idea?

Edit: I think I will experiment with this idea for now (correct me for any mistakes or anything you might want to add) though considering it's a returning request here I am confident that TransVoxel will find its way into PolyVox in the near future and then I will be ready to use it in MLE :)

P.S. I managed to optimize the engine somewhat, rendering a map of the size of 1280 x 64 x 1280 with graphics settings on highest, no LoD or downsampling still, but will be needed for sure as complexity increases.

I also found that the decimator can worked instantly if I half the size of a chunk to 32x64x32 instead of 64x64x64, problem is draw calls increase by about 4 for achieving the same size of terrain. Problem.

Which gives me another reason to look into downsampling/lod/different extraction methods for lower resolution, reduced draw calls.

I am aiming for a terrain with the size of 4k x 128 x 4k at a point. With a size of 32x64x32 that is way too many draw calls (unless more efficient culling/batching can be added to the terrain) and way too much geometry. Yet this is a goal for the engine to be capable of, our game we hope to have in a size of 4km (although we might need to expand it anywhere to 6k or a maximum of 8k but 4km is our goal for now).


Top
Offline Profile  
Reply with quote  
 Post subject: Re: How to boost FPS? (main problem: PolyVox!)
PostPosted: Wed Apr 27, 2011 9:58 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
I don't want to tell you exactly what to do, because I haven't tried this myself and it's useful to get different perspectives on the same problem. But this is the way I imagine it:

  • Lets say you have a region size of 64x64x64. For each of these regions you generate a high resolution mesh the same as you are doing now.
  • Each region also gets downsampled, and you extract a mesh of size 32x32x32. However, this corresponds to the same part of space as the 64x64x64 high resolution mesh.
  • Looking in a particular direction, you might decide that the first 10 regions you can see get drawn with the high LOD, and that regions 11 to 20 get drawn with the low LOD.
  • This means there may be a visible discontinuity between regions 10 and 11. I would solve this by drawning region 10 twice - once with the high LOD and once with the low LOD.

The above doesn't actually decrease the batch count, because you have the same number of regions regardless of the LOD level. So next you might want to try making the lower LOD levels cover a larger area, so there are less of them.

Also, you generally won't need all the LOD levels present at once. So you can probably generate them on demand and discard them later.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: How to boost FPS? (main problem: PolyVox!)
PostPosted: Thu Apr 28, 2011 3:27 am 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
Oh, my idea is to combine 4 regions into one 64x64x64, downsampled version of all 4 (so 4 times your downsampled 32) which does reduce batching.

And I usually generated the polyvox geometry when "close enough" and discard it afterwards considering how fast it is to do so anyway :)


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

All times are UTC


Who is online

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