It is currently Sat Aug 22, 2020 12:25 pm


All times are UTC




Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject: Re: PolyVox as Terrain builder
PostPosted: Wed Jul 14, 2010 7:32 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
It looks very nice! The smoothing between materials is really quite effective :-)

I've had a quick read of your GameDev thread and it looks like you are heading in the right direction. In general I would prefer a bigger pixel shader over a large number of passes/batches (i.e. I prefer option 2 to option 1), but it will also be interesting to see how the deferred shading helps. If you do end up with a large pixel shader then of course deferred shading is beneficial because you avoid processing the hidden fragments. I haven't implemented one myself though, as Thermite uses forward shading.

Let us know how it works out!


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox as Terrain builder
PostPosted: Wed Jul 14, 2010 8:35 pm 

Joined: Wed Jun 02, 2010 8:52 pm
Posts: 37
I am nearly finished with the deferred renderer for the terrain layers.
This is how it looks like now:
Attachment:
layeredTerrain.jpg
layeredTerrain.jpg [ 80.86 KiB | Viewed 3823 times ]


Yes, looks like the other picture, but the way how it was made differs much. In the last picture I was just using the vertexcolors.
This screenshot uses the deferred renderer. Although it runs only one shader (Which shows the layers) but I wanted to show
that the DR is set up and successfully build in into the rendering pipeline (Lighting works with is as well). There are some minor disign issues with the
terrain shader (quite messy :mrgreen: ) but I'm going to rewrite this part completely, so that I can have different shader includes which I just need to
swap and the shader template is ready for the terrain. Once it is finished you'll understand what I mean :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox as Terrain builder
PostPosted: Fri Jul 16, 2010 9:19 pm 

Joined: Wed Jun 02, 2010 8:52 pm
Posts: 37
Here you go!
Attachment:
layered_terrain2.jpg
layered_terrain2.jpg [ 45.76 KiB | Viewed 3813 times ]

(Let a real artist play with it and it'll look even better ;) )

I've just rewritten my shader-headers, so writing such a terrain shader is as easy as writing a normal shader :)
The news posting for ModDB is also nearly finished (Just needs to get translated + needs still some pictures) and after then I will write
the article for your "Projects using PolyVox" page.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox as Terrain builder
PostPosted: Sat Jul 17, 2010 7:41 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Hey, that looks seriously cool! Nice you see you have lighting in there as well. Actually I have to admit it makes me a bit jealous... I wish I had more time to work on the renderer of Thermite! There's so much fun stuff I want to try.

Actually I do see a couple of artefacts in the terrain - maybe missing/mismatched polygons. Is this an issue with PolyVox?

And yes, send me whatever you want on the 'projects using PolyVox' page (you can email that). It would be great if it has a similar format to the existing projects but there is some flexibility here.

Sorry I'm being slow to reply at the moment - I have a busy few weeks. I should have more time in a month or so.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox as Terrain builder
PostPosted: Mon Jul 19, 2010 1:50 pm 

Joined: Wed Jun 02, 2010 8:52 pm
Posts: 37
Thank you! :D

Hm. The hole you see on the right was caused by me when I placed a sphere near to the bounds. That black thing in the middle of the picture could be either such a Bug-caused-Hole or a issue with the smoothing when not all neighboring chunks got updated.

By the way, here is the news posting on ModDB (With a video :) ):
http://www.indiedb.com/engines/wtech/ne ... nd-polyvox
I hope the explanation isn't too wrong...

In the video you'll see some holes popping up as well. My teammate (Who made the Video) tried to click them away everywhere they appeared ;)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox as Terrain builder
PostPosted: Mon Jul 19, 2010 7:10 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
[WuTz]! wrote:
...a issue with the smoothing when not all neighboring chunks got updated.


I see... It does look like the kind of artefact that the mesh smoothing algorithm would produce, but actually the idea of using the greyscale density values is that you don't need to perform any smoothing on the mesh (provided your voxels change slowly from the maximum density to zero). Does it not seem to work? Of course, I haven't really tested that density stuff much myself but hopefully I will do so in a couple of months ( I'm working on scripting at the moment).

[WuTz]! wrote:
By the way, here is the news posting on ModDB (With a video :) ):
http://www.indiedb.com/engines/wtech/ne ... nd-polyvox
I hope the explanation isn't too wrong...


Yep, I already saw it. Looks very nice! I will give it a test when I get a chance.

Also I got your email and will update the 'projects using polyvox' page. It might be a few days before I get a round to it though.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox as Terrain builder
PostPosted: Mon Jul 19, 2010 7:25 pm 

Joined: Wed Jun 02, 2010 8:52 pm
Posts: 37
Quote:
I see... It does look like the kind of artefact that the mesh smoothing algorithm would produce, but actually the idea of using the greyscale density values is that you don't need to perform any smoothing on the mesh (provided your voxels change slowly from the maximum density to zero). Does it not seem to work? Of course, I haven't really tested that density stuff much myself but hopefully I will do so in a couple of months ( I'm working on scripting at the moment).


No, that is not the problem. The smoothing works fine. But let me explain more. When you place some voxels at the border of a chunk, this chunk gets updated, but it's neighbor (Which may got some of the volume-smoothing, too) gets not. This is how those gaps between the chunks get created. I allready minimized the cases where this can happen, but I didn't catch all...


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox as Terrain builder
PostPosted: Tue Jul 20, 2010 9:29 pm 

Joined: Wed Jun 02, 2010 8:52 pm
Posts: 37
Oh man, I just checked out this Forever War demo. How is this guy able to regenerate the mesh that fast?? It looks like realtime when you use the smoothing tool!

I have added threading to my terrain editor, but it isn't as fast as this is! :(


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox as Terrain builder
PostPosted: Thu Jul 22, 2010 9:30 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Yep, Forever War is pretty impressive :-) I can shed some light on what they are doing:

1) They forked from a version of Thermite about two years ago. At the time there was no support for density values (as I added this for you) but actually they implemented the density values themselves in order to get the smooth surfaces.

2) They do not perform any surface smoothing (the smooth surace come from having the density values).

3) I don't think they use any threading (unless they added it themselves) as Thermite did not use threads for surface extraction at the time (it does now).

4) Like Thermite, they store a material per voxel which gets written into the generated vertices. Most triangles have just one texture (unlike your approach of using the alpha texture). Where two materials meet, these triangles are rendered once with each texture and blended together.

5) They use texture atlases to minimise state changes. Because you are using DirectX11 you can use texture arrays instead.

You can read more here: http://www.thermite3d.org/phpBB3/viewtopic.php?f=2&t=7

If you are having performance issues when regenerating the mesh the you need to do some profiling to determine where the bottle neck is. Is it in the call to extractSurface(), the processing you do, or the uploading to the graphics card? If you can't make it faster then you can make the regions smaller instead. Forever War had a volume size of 192x192x192 and a region size of 16x16x16.

I hope that helps. I'm going to be away for a week or two starting tomorrow so I won't be online I'm afraid. I can help some more when I return.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox as Terrain builder
PostPosted: Wed Aug 04, 2010 1:13 pm 

Joined: Wed Jun 02, 2010 8:52 pm
Posts: 37
Sorry for the long delay. I simply had no questions :)

Here's more progress (This time not made by me):
Image


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

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