It is currently Sun Nov 17, 2019 12:19 pm


All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: A test using PolyVox/Irrlicht/and LibNoise
PostPosted: Tue Feb 11, 2014 12:25 am 

Joined: Thu Feb 06, 2014 3:02 am
Posts: 14
As the title states, I made a small test in just a few days (actually most of the time I was concerned about a memory leak from irrlicht and I was fixing that 2/3 of the time) I have made a small scale example of how easy it is to use PolyVox.

If any of you are wondering how I did this:
I'm using a custom Voxel that supports density/material in a float form,
I'm using a simple volume (100x100x100)
I'm using the Marching Cubes Extractor with a threshold of 0.0f (nothing else modified there)
Also, for deconstruction/construction of the mesh I'm using the built in RayCaster and only accepting values with a density > 0.0f as an intersection.

Two Images:

Image
Image

and a YouTube video link:
http://www.youtube.com/watch?v=OeELhk9TqkA


Top
Offline Profile  
Reply with quote  
 Post subject: Re: A test using PolyVox/Irrlicht/and LibNoise
PostPosted: Tue Feb 11, 2014 8:34 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
That video looks great. I'm curious, how did you implement the adding and removing of material? One approach is too add or subtract a small amount to each voxel within the range of the brush, whereas another approach is to multiply the voxels by an amount slightly more or slightly less than 1.0f. I found both had their limitations, but I'm working at limited precision (8 bits) and I suspect that is the problem.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: A test using PolyVox/Irrlicht/and LibNoise
PostPosted: Wed Feb 12, 2014 12:05 am 

Joined: Thu Feb 06, 2014 3:02 am
Posts: 14
David Williams wrote:
That video looks great. I'm curious, how did you implement the adding and removing of material? One approach is too add or subtract a small amount to each voxel within the range of the brush, whereas another approach is to multiply the voxels by an amount slightly more or slightly less than 1.0f. I found both had their limitations, but I'm working at limited precision (8 bits) and I suspect that is the problem.


It's quite simple:

A material consists of a float between -255 and 255, this is simply added by taking density * 255
Next, I make a list of values 0 and below is air, next anything greater than 0 = a material and 255 = another material, anything in between is a mixture of the 2 materials, (note that I could have made more materials, but I was being lazy and had a lack of textures)

I'm actually looking for a new system for my materials, because I don't just want to rely on two materials, what if I have let's say 3 materials: sand, dirt, and stone, with my current technique you can only have two different materials blending (sand and dirt, sand and stone, and dirt and stone)
but, I can't blend all three together at the same time... Nor can this system produce both: [dirt and stone blends] and [dirt and sand blends], this is because I am using only a single in-between point made for two materials, and only two.

Also, I made a lot of improvements, mainly using a triplanar texture system (not mine, I just found a shader)

Image


Top
Offline Profile  
Reply with quote  
 Post subject: Re: A test using PolyVox/Irrlicht/and LibNoise
PostPosted: Thu Feb 13, 2014 8:37 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Very interesting, and it's nice to see you are being imaginitive with materials and custom voxel types. You might want to read some of Eric Lengyel's work. We don't implement any of his transvoxel stuff but in his thesis he does talk a bit about how he handles multiple materials: http://www.terathon.com/voxels/

Also, you can also get some insight into how we do it in Cubiquity: https://bitbucket.org/volumesoffun/cubi ... ?at=master


Top
Offline Profile  
Reply with quote  
 Post subject: Re: A test using PolyVox/Irrlicht/and LibNoise
PostPosted: Fri Feb 14, 2014 12:14 am 

Joined: Thu Feb 06, 2014 3:02 am
Posts: 14
David Williams wrote:
Very interesting, and it's nice to see you are being imaginitive with materials and custom voxel types. You might want to read some of Eric Lengyel's work. We don't implement any of his transvoxel stuff but in his thesis he does talk a bit about how he handles multiple materials: http://www.terathon.com/voxels/

Also, you can also get some insight into how we do it in Cubiquity: https://bitbucket.org/volumesoffun/cubi ... ?at=master


Alright thanks! I'll be looking into these


Top
Offline Profile  
Reply with quote  
 Post subject: Re: A test using PolyVox/Irrlicht/and LibNoise
PostPosted: Mon Feb 17, 2014 2:45 pm 

Joined: Mon Feb 17, 2014 2:27 pm
Posts: 6
Hey Hansiec!

I am another person that integrated Irrlicht with PolyVox recently and have been having fun with it. I think I know which triplaner shader you are using and it has some problems on the GLSL version that needs fixing ( as well as other issues, just a heads up, I have re-writing the entire thing on my TODO list ).

For my integration I'm also using marching cubes but am using a threaded chunk system with multiple volumes so that I can play with generating new terrain on the fly and use occlusion culling.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: A test using PolyVox/Irrlicht/and LibNoise
PostPosted: Tue Feb 18, 2014 3:07 am 

Joined: Thu Feb 06, 2014 3:02 am
Posts: 14
mordentral wrote:
Hey Hansiec!

I am another person that integrated Irrlicht with PolyVox recently and have been having fun with it. I think I know which triplaner shader you are using and it has some problems on the GLSL version that needs fixing ( as well as other issues, just a heads up, I have re-writing the entire thing on my TODO list ).

For my integration I'm also using marching cubes but am using a threaded chunk system with multiple volumes so that I can play with generating new terrain on the fly and use occlusion culling.


Well thanks, but this was just a little thing I did, this isn't any sort of project I was working on (until I ported it to OGRE that is) so basically what you're (I assume) offering/informing me is not really of any concern to me.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: A test using PolyVox/Irrlicht/and LibNoise
PostPosted: Tue Feb 18, 2014 1:17 pm 

Joined: Mon Feb 17, 2014 2:27 pm
Posts: 6
I wasn't offering you anything, just saying hello to another Irrlicht user and mentioning that the freely available Triplaner Shader for the engine has some serious problems.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: A test using PolyVox/Irrlicht/and LibNoise
PostPosted: Wed Feb 19, 2014 12:34 am 

Joined: Thu Feb 06, 2014 3:02 am
Posts: 14
mordentral wrote:
I wasn't offering you anything, just saying hello to another Irrlicht user and mentioning that the freely available Triplaner Shader for the engine has some serious problems.


Okay, sorry for the misunderstanding, and thanks for the heads up.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net