Monday 25 November 2013

Voxel Engine Update - DirectX

As part of my honours project I have been rejigging the particle engine I made last year to a voxel engine. The plan for this project is to optimise the engine for use with the GPU, investigating the effectiveness of the Geometry shader for rendering cubes and perhaps using other elements such as Computer shaders to provide further speedups.

Currently I have a 64^3 (262144 cubes) data set rendered at a steady 30fps on GTX 550 Ti. This is currently without optimisations. I can increase the total to 128 ^3 or 256^3 successfully but these suffer significant slowdown, resulting in 5fps and less than 1fps which are difficult/impossible to interact with.

The images below show 128*64*64 cubes. The image on the left has some cubes removed to demonstrate that there are cubes below the surface and each coloured dot is an individual cube. Click on the images for higher resolution versions.


I have several things that I need to work on next, namely arrays over 512^3 run out of memory or cannot be defined and as such I will have to find a way to deal with this. After performing several calculations as well many optimisations will have to be performed to achieve a dataset much larger that 512^3, to simply store all of the vertices required for the number of vertices for a 1024^3 grid we would need 128GB. This would be a feat using even HDDs let alone in memory. As such to have a world of 1024^3 we would need to store this info on disc and perhaps load chunks of it into memory.

I also need to get some more interesting volume data sets to render to make it most interesting. Noise or other 3D models etc.

Anyways enjoy these close ups and I will have some more updates in future once I've finished some of my other courseworks.


128*64*64 - 524288 cubes
For the vertices alone we are using approximately 64MB on the GPU, this is being generated for every frame.


Email: markmmiller@hotmail.co.uk
Xbox Live: Dr Death MK 2
Steam: 7thsanctum

Origin: 7thsanctum
Youtube: 7thsanctum
Github: 7thsanctum

No comments:

Post a Comment