It is currently Sat Aug 22, 2020 1:53 pm


All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Understanding PolyVox
PostPosted: Mon Mar 05, 2012 1:56 pm 

Joined: Mon Mar 05, 2012 1:10 pm
Posts: 2
Hi all,

first, i hope i didn't miss important information somewhere hidden in this forum. i spend last Sunday informing myself about voxels and stumbled about polyvox.

i've used the quake3 engine for years, coding mods, games and little experiments. i was always distracted by the "stiffness" of the environment limiting players capabilities.

after learning about voxels some years ago( hell, i played outcast as a child without knowing that these are voxels!) i googled and found some impressive videos on youtube and other tools/graphical experiments.

to make it short:

1. Quake 3 Arena has very limited dimensions of the worlds. The worlds are not changeable ( due to the stiff BSP Tree and the precalculated lighting ). As i understood, polyvox can provide geometry, which is changeable during gameplay. But is this all "Boxes" like in minecraft? I understand that its funny to have retro-looks like minecraft, but how about more "unblocky" look and feel, like simple shapes used in BSP-type engines?
I read about the surface extractor which provides smooth surfaces. Is polyvox capable of having voxel-type representations of an enviroment, while giving enough data to an external render to have a more realistic look and feel ( im not talking about high end visuals. what i mean are curves, patches etc. ).
Look at this video: http://www.youtube.com/watch?v=PzmsCC6hetM&feature=related. Is this possible with polyvox with the feature of deformable terrain, like digging, explosion craters etc. ?

2. The q3 engine has a basic, but solid physic representation. its actualy not a physic engine, because it just gives some objects a physical touch, like bouncing grenades. Since polyvox is written in c++, an integration of bullet or newton should be easy. Is polyvox able to give a simplified representation of the voxels to an external physic engine? i mean, we dont need all data, just a few surfaces to calculate physics for bouncing balls.
Is there anyone out there already having bullet/newton in combination with polyvox?

3. John Carmacks netcode for all quake games is awesome. As in quake3 it follows a simple server/client model with interpolation between gamestates and "guessing" of upcoming events ( like movement direction). The world is static, booth on client and on server, sharing the same code for physics and movement prediction.
My quick thoughts brought me to the conclusion that it should be relatively simple to represent a world with polyvox on serverside for deformation calculations, AI pathfinding etc and giving the player just updates of any changes.
Has anyone made something like that before? Are there any ideas/experiments how to combine polyvox with network capabilities?
I thought about something like cube2's cooperative editing, or even the minecraft online play.


thank you for reading. hope that is not to much to answer ;) i'm not planning to create a game or something which disappears after spamming a forum. i just want to learn new things, and voxels are new for me.

regards,
otty


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Understanding PolyVox
PostPosted: Mon Mar 05, 2012 5:06 pm 

Joined: Wed Apr 27, 2011 7:10 am
Posts: 43
otty wrote:
But is this all "Boxes" like in minecraft?

PolyVox provides voxel storage and, currently two polygonization anglorithms. The CubicExtractor extracts a "boxy" minecraft-like mesh. There is also a Marching Cubes extractor (https://secure.wikimedia.org/wikipedia/ ... hing_cubes), which is useful for smooth terrain-like environments. So, it isn't necessarily just "boxes".

Quote:
Look at this video: http://www.youtube.com/watch?v=PzmsCC6hetM&feature=related. Is this possible with polyvox with the feature of deformable terrain, like digging, explosion craters etc. ?

That guy has some impressive implementation that everyone on the internet drools at. IIRC he uses a Dual Contouring extraction algorithm, and has some impressive shading. IIRC Dual Contouring allows for some things that Marching Cubes cannot express, like sharp corners. Aside from some technical issues, I'd say it's possible yes, but putting it together would be nice amount of work. Also, it would be impossible with Marching Cubes to represent general shapes like buildings (no sharp corners, unless ofc you do *really* high resolution voxels where it doesn't matter, not useful for a game), but it would be generally possible for (finite) terrain.

Quote:
2. The q3 engine has a basic, but solid physic representation. its actualy not a physic engine, because it just gives some objects a physical touch, like bouncing grenades. Since polyvox is written in c++, an integration of bullet or newton should be easy. Is polyvox able to give a simplified representation of the voxels to an external physic engine? i mean, we dont need all data, just a few surfaces to calculate physics for bouncing balls.
Is there anyone out there already having bullet/newton in combination with polyvox?

Dunno for sure, but most physics engines allow you to send triangle lists to them, so it shouldn't be too hard.

Quote:
3. John Carmacks netcode for all quake games is awesome. As in quake3 it follows a simple server/client model with interpolation between gamestates and "guessing" of upcoming events ( like movement direction). The world is static, booth on client and on server, sharing the same code for physics and movement prediction.
My quick thoughts brought me to the conclusion that it should be relatively simple to represent a world with polyvox on serverside for deformation calculations, AI pathfinding etc and giving the player just updates of any changes.
Has anyone made something like that before? Are there any ideas/experiments how to combine polyvox with network capabilities?
I thought about something like cube2's cooperative editing, or even the minecraft online play.

I've seen ker's minecraft client (viewtopic.php?f=18&t=256) and there is the VolumeChangeTracker (http://www.volumesoffun.com/polyvox/doc ... acker.html). Though putting it together with the Marching Cubes algorithm is something I haven't seen done much, but theoretically possible.

_________________
irc://irc.freenode.net/#polyvox


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Understanding PolyVox
PostPosted: Mon Mar 05, 2012 9:28 pm 

Joined: Mon Mar 05, 2012 1:10 pm
Posts: 2
Thank you for your detailed answers.

realazthat wrote:
PolyVox provides voxel storage and, currently two polygonization anglorithms. The CubicExtractor extracts a "boxy" minecraft-like mesh. There is also a Marching Cubes extractor (https://secure.wikimedia.org/wikipedia/ ... hing_cubes), which is useful for smooth terrain-like environments. So, it isn't necessarily just "boxes".


I've read in this forum something about the "Transvoxelâ„¢ Algorithm" and a dual contor algorithm. So there are ways for optimizing terrain polygonization. Despite that, i think a capable graphic programmer can make use of several tessellation methods provided by modern GPU's.

realazthat wrote:
That guy has some impressive implementation that everyone on the internet drools at. IIRC he uses a Dual Contouring extraction algorithm, and has some impressive shading. IIRC Dual Contouring allows for some things that Marching Cubes cannot express, like sharp corners. Aside from some technical issues, I'd say it's possible yes, but putting it together would be nice amount of work. Also, it would be impossible with Marching Cubes to represent general shapes like buildings (no sharp corners, unless ofc you do *really* high resolution voxels where it doesn't matter, not useful for a game), but it would be generally possible for (finite) terrain.


Didn't know that the guy is working on "something big", saw his voxel studio. I think he is going commercial,but maybe the community can learn something from this as well. Still, there is a long way from some vids and screens to a real useful product.

I'm not sure if it is true, but i read that ID is using some voxel technology for ID Tech 6, the Rage Engine. If they did, they did it bad. ID Tech 6 looks ugly. And still very polygonal :P ( Sorry JC, but with doom and quake you let people scream out loud "awwweeesome", but Rage? Just...mhm...)

The advantage of Voxels is IMHO the flexibility in changing structure of complex objects. Like destructible environment, or random generated terrain ( AHL, LibNoise etc. ) or the ability of applying physics to them. The disadvantage is the "cubic" look. Even the videos of this guy mentioned above look very cubic.

I came up with the idea of applying geometry shaders to the pure voxel representation. maybe this is the way to go, to have something like real-time-polygonization directly on the gpu.


realazthat wrote:
Dunno for sure, but most physics engines allow you to send triangle lists to them, so it shouldn't be too hard.


You are right. I've made some experiments with bullet and quake3, but i didnt went further down the road, because quake3 is just quake3: you dont need real physics ;)

realazthat wrote:
I've seen ker's minecraft client (viewtopic.php?f=18&t=256) and there is the VolumeChangeTracker (http://www.volumesoffun.com/polyvox/doc ... acker.html). Though putting it together with the Marching Cubes algorithm is something I haven't seen done much, but theoretically possible.


Sounds interesting. I think i'll have a look at the code.

In general, my thoughts went into the direction to have a dynamic environment which is changeable during gameplay, while keeping the amount of realism higher than usual approaches ( like in Minecraft).

IMHO this means, you need a simplyfied layer like a voxel representation of the world, which should be able to paginate for flexible network transfer. As well as the render should create a more realistic look and feel ( like polygonization, dynamic LOD and GPU Tesselation ) a server should provide a solid physical representation of the world for simulations like flowing water or bouncing elements.

Ok, thanks again for the answers. As i already said, i'm not trying to make a game. Just thoughts ;)

regards,
otty


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Understanding PolyVox
PostPosted: Tue Mar 06, 2012 12:57 am 

Joined: Wed Apr 27, 2011 7:10 am
Posts: 43
otty wrote:
I've read in this forum something about the "Transvoxelâ„¢ Algorithm" and a dual contor algorithm. So there are ways for optimizing terrain polygonization. Despite that, i think a capable graphic programmer can make use of several tessellation methods provided by modern GPU's.

Yes, there are a few TVA implementations floating around, including mine which I am hoping will join PolyVox. Just so you don't confuse yourself about its purpose I'll give a short summary of the different algorithms and their purpose:

  • Cubic Extractor This will take a volume, and will output a blocky mesh based on the material (rock, grass, etc., air is empty)
  • Marching Cubes This will take a volume and based on the density will put polygons where it determines the density should be 0 (or the threshold). This can result in smooth meshes suitable for terrain.
  • Transvoxel Algorithm The problem with normal voxel extraction is that it has O(n^3) computation complexity, which means it scales very badly. For example, in minecraft, if it were to have no height limit as it does now, to obtain a view distance of n, one would have to theoretically draw 6(n^3) voxels. Double the distance, and it becomes 8x as many voxels. Double it again, and it becomes 256x as many as the original n. Another way of looking at this problem: in minecraft, chunks that are very far will have lots of triangles/cm^2 on the screen. Wouldn't it be nice if we could distance mountains with less detail? Well, of course there is the idea of Level of Detail, and voxels can be rendered with lower level of detail in distant chunks, but this results in cracks in the meshes between two chunks of different LOD. TVA is basically a crack-patching algorithm for this problem.
  • Dual Contouring is an alternative polygonization algorithm to Marching Cubes. I intend to look into it one day, but I have not yet determined all of its pros and cons.

Quote:
I'm not sure if it is true, but i read that ID is using some voxel technology for ID Tech 6, the Rage Engine. If they did, they did it bad. ID Tech 6 looks ugly. And still very polygonal :P ( Sorry JC, but with doom and quake you let people scream out loud "awwweeesome", but Rage? Just...mhm...)

I think id tech 5 is "Rage Engine". I've not seen it, and I have heard the rumors about id tech 6. The things I've heard are sound something like SVO (sparse voxel octree), which is actually ray traced. So the tech for that isn't around yet, but it can also possibly be adapted for LOD on marching cubes. So I dunno.

Quote:
The advantage of Voxels is IMHO the flexibility in changing structure of complex objects. Like destructible environment, or random generated terrain ( AHL, LibNoise etc. ) or the ability of applying physics to them.

The two apparent advantages to me are the sandbox ability (construction, destruction) and more importantly to me, it is a general description of landscape that allows overhangs (such as caves etc.).

Quote:
The disadvantage is the "cubic" look. Even the videos of this guy mentioned above look very cubic.

The reason that had a "very cubic" look is because minecraft voxels are just "solid" and "empty". To get a smooth look, you need varying density fields, otherwise it will have sharp angles like that. If you want to see what smooth voxels look like: http://www.youtube.com/results?search_q ... hing+cubes .

Quote:
I came up with the idea of applying geometry shaders to the pure voxel representation. maybe this is the way to go, to have something like real-time-polygonization directly on the gpu.

Yes, but I shy away from relying on the GPU. Dunno why, I just have an aversion to requiring the latest graphics, and worry about putting game logic on the GPU, and having access to this data on a server with no GPU, for example.

Quote:
In general, my thoughts went into the direction to have a dynamic environment which is changeable during gameplay, while keeping the amount of realism higher than usual approaches ( like in Minecraft).

First off, Minecraft begins to look quite realistic when you look at a landscape (far away). Marching cubes and other algorithms can smooth out the terrain, but then it would be much harder to construct other things, like buildings for example.

Quote:
IMHO this means, you need a simplyfied layer like a voxel representation of the world, which should be able to paginate for flexible network transfer. As well as the render should create a more realistic look and feel ( like polygonization, dynamic LOD and GPU Tesselation ) a server should provide a solid physical representation of the world for simulations like flowing water or bouncing elements.

LOD sort of overcomes the need for Paging in some aspects. Not sure what you are saying about the server here though.

_________________
irc://irc.freenode.net/#polyvox


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Understanding PolyVox
PostPosted: Thu Mar 08, 2012 9:49 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Just a few thoughts from my side:

otty wrote:
Is there anyone out there already having bullet/newton in combination with polyvox?


Yep, I did this myself for a tech demo a few years ago: http://www.youtube.com/watch?v=5XTJABlV9zw

More recent work by a member of our forums: http://youtu.be/KHMtuLEMbbI?t=1m5s

otty wrote:
Has anyone made something like that before? Are there any ideas/experiments how to combine polyvox with network capabilities?


Unfortunatly I don't have much networking experience myself. Minecraft shows that it is at least possible though.

otty wrote:
I came up with the idea of applying geometry shaders to the pure voxel representation. maybe this is the way to go, to have something like real-time-polygonization directly on the gpu.


Have a look at this: http://www.geisswerks.com/about_terrain.html


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Understanding PolyVox
PostPosted: Fri Mar 09, 2012 7:53 am 
User avatar

Joined: Wed Jan 26, 2011 3:20 pm
Posts: 203
Location: Germany
otty wrote:
My quick thoughts brought me to the conclusion that it should be relatively simple to represent a world with polyvox on serverside for deformation calculations, AI pathfinding etc and giving the player just updates of any changes.Has anyone made something like that before? Are there any ideas/experiments how to combine polyvox with network capabilities? I thought about something like cube2's cooperative editing, or even the minecraft online play.


I am troubled by the same question...
I have actually implemented 3 methods so far, and I cannot tell you which one is the best, as all of them have advantages disadvantages...
Maybe you have (or anyone else here has) a good idea...

My Methods:

1. server passes only voxels/volume chunks to the client. client renders and does NO physics, just gets positions from the server.
works great in LAN, lags become very apparent due to objects standing still and suddenly jumping very far, only bad for laggy clients, fast clients don't notice much.

2. a group of equal clients. no voxel transformations are passed, instead a deterministic simulation is used, which gets player inputs at certain frames. A player's own input is delayed by the rounded up average number of frames a packet needs to get to the player with the highest ping.
this will delay your inputs. if you press jump, you will jump around 50-100ms later.
it's really hard to create a deterministic simulation.
also, when lags happen, you need to synchronize between the players, b/c one might have gotten a command too late, and could not enter the command in the right simulation frame... (running the simulation backwards a few frames, entering the command and running forward would work, too)

3. server does all the extraction and sends meshes to the players... physics on both server and client...
I did not find a method to make real time changes to the world in this...

I know that the second version is proven to work really well in a game called "clonk".
(which is a 2d game with an editable world)... but as I said... creating such a deterministic simulation is not the easiest task... especially with different CPUs and operating systems.


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

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