Page 11 of 12

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Thu Aug 19, 2010 10:10 pm
by PolyVox
Great, you'll probably frin the interface is rather lacking/fiddly in the last release. But as I write this I'm also working on scripting support (via QtScript) which is going well. The idea is that when you run Thermite you'll just get a black window, and then you can write QtScript code to create volumes, modify voxels, etc. You can also create/edit Ogre entities and lights. A release demonstrating this is probably just a few weeks away...

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Sun Sep 05, 2010 3:29 am
by LBDude
So how do you do pathfinding using this thing?

Do you provide a method to compute distance fields?

What is the performance like?

Thanks.

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Sun Sep 05, 2010 9:03 am
by PolyVox
Hi,

I haven't implemented any kind of pathfinding/AI, and I would expect it to be quite application specific. The use of a disance field would certainly be useful in may cases and I may well add this in the future. My experience in the past was that you can generate a distance field of a 256^3 image in about a second, but that was a couple of years ago so I might be remembering it wrong.

The problem is that the whole distance feld can be invalidated when a single voxel changes. Most likely I would down sample the volume to a lower resolution and generate the distance field from that.

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Tue Sep 14, 2010 7:15 pm
by LBDude
Cool. You seriously kick ass!

So I assume Polyvox (sorry haven't checked it out yet, plan to spend today downloading and compile; already played with Thermite demo) supports down sampling. (Don't worry about it, I will figure it out.)

You said it supports "cubing" the world right like Minecraft? My question is what happens when you restrict your modifying shape to cubic only and of constant size (say size of the 'atomic' block size of the world) and that you use it in conjunction with surface extraction via Marching Cubes (simply asking here for a quick answer; I should try to figure that out myself). Will that still work? Or should I just forget about surface extraction and go with a pure voxel approach via rendering cubes. Also, does your engine (either Polyvox or Thermite) support efficient rendering of voxels as cubes? Actually this is a dumb question, I assume if I use Polyvox then I have to write my own voxel renderer and query it for the world. I'm hoping Thermite does this already--efficiently rendering the world using cubes.

Either way, thanks so much for this!

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Tue Sep 14, 2010 9:32 pm
by LBDude
Well, I think the surface around the cube in question would intersect the cube. So it should work. However, I'm not sure how that would look, I guess I will have to try it out to see. I guess another option is when generating the world simply discretize the world into cubes to begin with. I think this would give me the Minecraft look also. I'm not sure about efficiency issues when generating the world as cubes. I guess it would be the same right? It's just now the surface is made purely out of cubes.

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Tue Sep 14, 2010 9:33 pm
by PolyVox
LBDude wrote:Cool. You seriously kick ass!
Thanks :-D
LBDude wrote:So I assume Polyvox (sorry haven't checked it out yet, plan to spend today downloading and compile; already played with Thermite demo) supports down sampling. (Don't worry about it, I will figure it out.)
Kind of... there is a VolumeSampler::getSubSampledVoxel function which I used to use for LOD before deciding it didn't really work out that well. It computes the voxels value on the fly but I doesn't take account of densities (it just returns the min material value). It fact I don't think I've used it since I added support for voxel densities, so it probably won't work at all...
LBDude wrote:You said it supports "cubing" the world right like Minecraft? My question is what happens when you restrict your modifying shape to cubic only and of constant size (say size of the 'atomic' block size of the world) and that you use it in conjunction with surface extraction via Marching Cubes (simply asking here for a quick answer; I should try to figure that out myself). Will that still work? Or should I just forget about surface extraction and go with a pure voxel approach via rendering cubes. Also, does your engine (either Polyvox or Thermite) support efficient rendering of voxels as cubes? Actually this is a dumb question, I assume if I use Polyvox then I have to write my own voxel renderer and query it for the world. I'm hoping Thermite does this already--efficiently rendering the world using cubes.
PolyVox always uses surface extraction. But it has two kinds of surface extractor - one gets a nice smooth surface via marching cubes while the other gets a 'jagged' mesh which looks exactly like cubes (but isn't). There is currently no demo showing the cube like version (but hopefully within the month). Thermite uses PolyVox for the surface extraction and for any scene it uses only one of the extractors. I think it would be possible to combine the two but I haven't tried it yet, in theory this would allow a nice smooth terrain covered with building built from cubes.

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Tue Oct 12, 2010 8:10 am
by EricB
Good morning Mr. Polyvox, or evening, depending on the time you read this :D

i'm putting together a tech demo for someone who wishes to use polyvox,
I was wondering, being that there is a lack of tutorials/literature/or example code for polyvox, If you had a simple example of polyvox in ogre laying around anywhere?

I'm finding the usage of QT :evil: and the layout in Thermite much harder to follow than It should be. (Then again, it might be because it's 3am, and i've had like 4 hours of sleep in the last 30 hours :lol: )

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Tue Oct 12, 2010 6:49 pm
by PolyVox
Hi, Thermite is indeed quite complex as it includes support for scripting, threading, etc. But PolyVox itself is quite simple. In particular you should look at the BasicExample which comes with PolyVox and is documented here. The documentation isn't quite up to date but if you look at the BasicExample as well you should understand how it works.

The easiest way to combine it with Ogre is using the ManualObject class and you can see some example code here. You might want to read some more of the thread. Just ask if you have any questions.

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Wed Oct 13, 2010 6:09 am
by EricB
PolyVox wrote:Hi, Thermite is indeed quite complex as it includes support for scripting, threading, etc. But PolyVox itself is quite simple. In particular you should look at the BasicExample which comes with PolyVox and is documented here. The documentation isn't quite up to date but if you look at the BasicExample as well you should understand how it works.

The easiest way to combine it with Ogre is using the ManualObject class and you can see some example code here. You might want to read some more of the thread. Just ask if you have any questions.

Thank you much, That's exactly what I was looking for.

Works pretty well :D You'll probably be hearing from me soon again :)

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Fri Dec 10, 2010 1:07 pm
by yaxinhoo
i can't download the http://www.david-williams.info/VoxelSce ... -0.0.1.zip . anyone can provide the other address. let me download it ?

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Fri Dec 10, 2010 7:54 pm
by PolyVox
Sorry, it looks like it's got lost. I don't have it anymore. But it's just an older version of the code from SVN if you check out a version from four years ago. See also the post you made on the Themite forums.

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Fri Dec 17, 2010 8:48 pm
by fayt
Nice! reminds me of the classic game Worms.

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Fri Dec 24, 2010 6:15 am
by tdev
just wanted to say that the polyvox engine is great :)

hacked together a minecraft -> polyvox importer, which runs great performance wise:



slow framerate because of fraps, was super fluid otherwise :)

Code: Select all

voxels used: 2654208
Tidying memory...done.
Time taken = 1.123s
setting the voxels and iterating over the map data took however some 5 minutes...

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Sun Dec 26, 2010 11:32 am
by PolyVox
Hey, cool stuff! Minecraft has created a lot of publicity for this project :-) I know the Minecraft format is publically available but I haven't looked at it... was the code to convert from Minecraft to PolyVox complex? If not then I'd be interested to see it or even add it to the PolyVox Wiki.
tdev wrote:setting the voxels and iterating over the map data took however some 5 minutes...
Really? And was this because of PolyVox? It seems unlikely... I usually fill a few million voxels in a second or so.

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Mon Dec 27, 2010 11:00 pm
by tdev
PolyVox wrote: Hey, cool stuff! Minecraft has created a lot of publicity for this project :-)
yes, cause minecraft is the first "voxel" project that is a huge success (see http://minecraft.net/stats.jsp)
PolyVox wrote: I know the Minecraft format is publically available but I haven't looked at it...
i was reusing code from this project:
https://github.com/udoprog/c10t

i spoke with the author and we might create a minecraft import library.
PolyVox wrote: was the code to convert from Minecraft to PolyVox complex? If not then I'd be interested to see it or even add it to the PolyVox Wiki.
was straight forward i would say, based it on your opengl example:
http://modclub.rigsofrods.com/thomas/mi ... olyvox.zip
PolyVox wrote:
tdev wrote:setting the voxels and iterating over the map data took however some 5 minutes...
Really? And was this because of PolyVox? It seems unlikely... I usually fill a few million voxels in a second or so.
well, this was a 3 hour hack-together thing, haven't even analysed where the performance went. Also, unsolved would be the paging of voxel pages in the background. (do you have something for that already?)

maybe this hack could involve into a nice ogre-polyvox-minecraft viewer :)

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Tue Dec 28, 2010 12:24 pm
by PolyVox
tdev wrote:i spoke with the author and we might create a minecraft import library.
Yep, I'm sure lots of people would like that. There's so many Minecraft-related projects around that I'm sure it would get used by someone.
tdev wrote:Also, unsolved would be the paging of voxel pages in the background. (do you have something for that already?)
Not really, but the question has come up a few time before on our forums. I'm planning to vastly improve the volume compression in PolyVox to allow very large volumes, but I'm not currently looking at infinite volumes and/or streaming. But maybe very large volumes are enough?

Re: Fully Destructible Levels - Now in Game Engine Gems 1

Posted: Sat Mar 05, 2011 9:09 pm
by PolyVox
I haven't been very good at updating this thread recently, which is a shame because the project has never been more active (visit http://www.thermite3d.org if you want to get involved). However, I mentioned a year ago that I had written an article in Game Engine Gems Volume 1 about the work I had been doing, and recently I discovered that this article is actually now on Google Books so anyone can view it :-)

You can read the article here: http://books.google.com/books?id=WNfD2u ... &q&f=false

Hope someone finds it intresting!

Re: Fully Destructible Levels - Book chapter now on Google B

Posted: Wed Nov 09, 2011 1:25 am
by PolyVox
After a long quiet period I can now announce that this project has moved to a new website and domain! You can find full details and downloads at http://www.volumesoffun.com. In particular you should see this page.

Up until this point there have been two parts to the project - the PolyVox voxel terrain library and the Thermite3D engine which uses it. Going forward the focus will be shifted to PolyVox only, although we also have a game built on PolyVox which will be announced soon. It uses Ogre, so you'll hear about it here :-)

Re: Fully Destructible Levels - Book chapter now on Google B

Posted: Wed Nov 09, 2011 6:46 am
by Mind Calamity
I take it it works with OGRE 1.8 ?

Re: Fully Destructible Levels - New website and domain!

Posted: Wed Nov 09, 2011 5:08 pm
by LBDude
PolyVox is rendering agnostic. It has a few templatized Volume class which is used to manage Volumetric data. It has several extractors which one can use to extract a polygonal mesh from via different mesh extraction algorithms (marching cubes, cubic). After you have the mesh, you can plug that into any ol' rendering pipeline.

Check out a screen of my project: http://twitpic.com/7cbk67. All running in 1.8.

Re: Fully Destructible Levels - New website and domain!

Posted: Wed Nov 09, 2011 10:10 pm
by PolyVox
Yes, what LBDude says is true. PolyVox just provide vertex/index data for you to pass to the API/engine of your choice. I know people are using it with OpenGL, Direct3D and Irrlicht, but I think Ogre is the most popular choice.

Re: Fully Destructible Levels - New website and domain!

Posted: Wed Nov 16, 2011 4:41 am
by drwbns
I get an error when trying to compile PolyVox - OpenGLExample

Code: Select all

error C2782: 'PolyVox::Vector<Size,Type> PolyVox::operator /(const PolyVox::Vector<Size,Type> &,const Type &) throw()' : template parameter 'Type' is ambiguous	c:\Users\Andrew\Downloads\polyvox-polyvox-master\polyvox-polyvox\examples\OpenGL\Shapes.cpp

Re: Fully Destructible Levels - New website and domain!

Posted: Wed Nov 16, 2011 5:06 am
by drwbns
Is there a small example of how PolyVox can be used for terrain editing?

Re: Fully Destructible Levels - New website and domain!

Posted: Wed Nov 16, 2011 9:49 pm
by PolyVox
drwbns wrote:I get an error when trying to compile PolyVox - OpenGLExample
Can you give the complete compiler output, rather than just that one line? And which compiler are you using?
drwbns wrote:Is there a small example of how PolyVox can be used for terrain editing?
Not really, but the principle is quite simple. You load whatever data you want into the volume and then generate the mesh and use it for rendering (the tutorial covers this much). If you then make any further changes to the volume then you need to regenerate the surface and render the new one instead.

Re: Fully Destructible Levels - New website and domain!

Posted: Wed Nov 21, 2012 10:34 am
by PolyVox
For those who are interested, we just released a new version of our PolyVox voxel terrain library. This isn't really Ogre related anymore as PolyVox is now standalone (and Ogre has it's own voxel terrain implementation), but this thread is where it began six years ago so I thought it was worth mentioning. It can still be integrated with Ogre of course as it's engine/API independent.