• Advertisement
Sign in to follow this  

Voxel engine pros and cons

This topic is 2139 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on a raycasting voxel engine right now all in software. It's somewhat similar to voxlap except mine isn't 6DOF. You can move in all directions and yaw 360 degrees and look up and down 55 degrees.

Anyways, I'm wondering if I should continue work on it or try to make a voxel engine that converts voxels to polygons.

The reason I'm wondering is because what I have done is fairly ugly and has a pretty limited viewing distance. There's also the degrees of freedom thing.

What are some pros and cons of a pure voxel engine vs a polygon hybrid?

Share this post


Link to post
Share on other sites
Advertisement
for practical applications i'd recommend polygons, but this depends on what u want to use your engine for
also raycasting is mostly too slow for real time applications

Share this post


Link to post
Share on other sites
That's one of the limiting factors I'm having with it... I can render at 60 fps at low resolution and limited viewing distance but I'd like both to be better.

Share this post


Link to post
Share on other sites
Wait how are you even rendering? Can you paste your algorithm. It sounds like you're using an inefficient algorithm for raycasting. Look into 3DDDA and write your code if you can without branch statements. Or look into an octree traversal or nested grid traversal to limit your look-ups. More often than not you're going to end up with a tree data structure for your encoding to limit the number of look-ups and jump over empty spaces. For instance, with nested grids in 2D, [url="http://sirisian.com/javascript/chunktraversal3.html"]this is to show some worst-case scenarios with almost random voxel placement[/url]. That's three levels though. An octree in 3D is similar, but the algorithm is very different. Look at Laine's work on [url="http://research.nvidia.com/users/samuli-laine"]Sparse Voxel Octrees[/url] (SVO).

The pros of a polygon based one is that you're hardware accelerated for rasterization.
The cons is that you're forced to store vertex position data in buffers instead of just voxel data which is often far more overhead.

The pros of a raycasted one done on the GPU using a 3DDDA algorithm (or nested grid or octree traversal algorithm) is that you can efficiently use memory. Especially on modern hardware since you can just upload and structure the data in read/write buffers.
The cons are you're limited by the number of look-ups per pixel. Lots of tricks to negate those costs though as already mentioned.

Share this post


Link to post
Share on other sites
I'm not using SVO. what I was doing is pretty much just casting a ray per vertical column and performing small steps up close and larger ones farther away, I had mip levels stored of objects column locations stored so it could render the right column for the mip level. I was placing the y image coordinate by using longitude to image space. There is a number of divides in it... I've messed with taking some out but it didn't seem to have a very big impact on performance.

I pretty much just rendered vertical stripes for each voxel/ray intersection, but the loop would break if there was already something rendered at the image buffer coordinate.

I think I am actually just gonna switch to a polygon version. I don't think I can get the quality, performance, and dynamics I want without it.


Here's a vid of how it looks... I think it's pretty ugly and the render resolution is also only 64x128, the viewing distance is also real short.

[url="http://www.youtube.com/watch?v=R5ICrNYdNlk"]http://www.youtube.com/watch?v=R5ICrNYdNlk[/url]

Share this post


Link to post
Share on other sites
Reminds me of [url="http://www.drobot.org/pub/M_Drobot_Programming_Quadtree%20Displacement%20Mapping.pdf"]quadtree displacment mapping[/url]. It's good for rendering similar images.

Also yeah it sounds like your algorithm might not be optimal for such sitatuons. In a modern raycaster you'd jump over large areas. (QDM is good if your camera is above the maximum height plane and uses mipmaps to cull huge regions as the ray enters the object).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement