It is currently Tue Nov 12, 2019 11:30 am


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Irregular low poly mesh
PostPosted: Thu Oct 27, 2016 11:47 am 

Joined: Thu Oct 27, 2016 6:04 am
Posts: 4
Hello! I've been working with PolyVox in UE4. I'm trying to achieve a certain appearance with the mesh and was hoping maybe I can get some input/advice. It is an appearance similar to the ground in the picture below. Ignore the rocks/trees.
A few questions:
  • Is there any suggested documentation on density for material density pairs? I feel I don't have a sufficient understanding of how it functions.
  • Do you think writing my own surface extractor would be necessary to achieve a similar appearance? I'm sure I can get something fairly close with the marching cubes extractor, but I'm wondering if the more irregular shapes would require some extra modification. If that's the case, I'm guessing it probably wouldn't be worth the extra effort required.

Any other advice is appreciated! Thanks!

Image


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Irregular low poly mesh
PostPosted: Fri Oct 28, 2016 6:48 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Hi, welcome to the forum.

Askori wrote:
Ignore the rocks/trees.

I'm afraid the rocks and trees make it rather hard to see the underlying terrain :-)

To me, the most visually striking aspect of the image is the flat shading, which is what gives it a low-poly look. This is really independent of the actual geometry and can be achieved with meshes generated by PolyVox, though depending on how you do it you might need to regenerate the mesh normals.

Askori wrote:
Is there any suggested documentation on density for material density pairs? I feel I don't have a sufficient understanding of how it functions.

I'm afraid there's not much. You can consider the two elements separately though - the density is entirely responsible for defining the shape of the object and the material is entirely responsible for its appearance. I would encourage you to forget about materials and MaterialDensityPair for now and just work with a volume of ints or floats (which then represent density), at least until you understand how to get your desired shape.

Askori wrote:
Do you think writing my own surface extractor would be necessary to achieve a similar appearance? I'm sure I can get something fairly close with the marching cubes extractor, but I'm wondering if the more irregular shapes would require some extra modification.


I don't think you'll significantly beat Marching Cubes for meshing density fields. More advanced surface extraction algorithms (dual contouring, etc) usually operate on more advanced voxel types (e.g. Hermite data) and at this point you are outside the current scope of PolyVox.

Askori wrote:
Any other advice is appreciated!

If you want to investigate other algorithms then this page is a useful starting point: https://swiftcoder.wordpress.com/planet ... xtraction/


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Irregular low poly mesh
PostPosted: Fri Oct 28, 2016 7:19 pm 

Joined: Thu Oct 27, 2016 6:04 am
Posts: 4
Thanks for the welcome and response!

Quote:
I'm afraid the rocks and trees make it rather hard to see the underlying terrain

Yea, sorry about that. One of the few examples that seems to have the shape I'm trying to get.

Quote:
I would encourage you to forget about materials and MaterialDensityPair for now and just work with a volume of ints or floats (which then represent density), at least until you understand how to get your desired shape.


Will do! The information you linked is also pretty interesting.

Thanks again for the help!


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Irregular low poly mesh
PostPosted: Fri Oct 28, 2016 8:47 pm 

Joined: Thu Oct 27, 2016 6:04 am
Posts: 4
Turns out, the values I was passing in for density were different than what I expected them to be, and just didn't catch it before. Woops!


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net