# 256^3 brute volume to sparse voxel octree on gpu

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

## Recommended Posts

Say I have a 256^3 brute volume and id like to convert this to a pixel shader readable svo texture, I could think of how I could do it on cpu, but not how it could be possible on gpu... can someone give me some hints? Its naturally a recursive algorythm, and these are the hardest algorythms to get to work parallel...

##### Share on other sites
Well just storing it as a texture shouldn't be problem at all? sqrt(256*256*256)=4096 ... so a texture 4096*4096 and just calculate the XY<>XYZ yourself with basic math. Or am I missing something?

##### Share on other sites
well the problem is, theres alot of them, so i need to use as least ram as possible, im sorta breaking my world up into 256^3 chunks, but i need a fair load of them.

##### Share on other sites
You can't get anymore efficient than storing 256^3 bytes as 256^3 bytes really unless you start compressing or restructuring the data on the GPU... if what you want to do is something like minecraft then you are better off only storing the visible surfaces as a trianglelist instead and computing them on the CPU, and from there there are several easy and fast ways of keeping the data compressed in RAM if necessary, simplest being some like google snappy, super fast compression and decompression with rather good compression ratios. But from my own experiements into this, it wasn't really all that necessary.

Depending on what you're doing, I would recommend something less than 256^3, like say blocks of 64^3 instead... but it really depends.

##### Share on other sites
Anyway, doesnt matter, I think ive figured out its possible with a geometry shader here, pixel shader there, should be able to craft an svo on gpu.

1. 1
2. 2
Rutin
21
3. 3
4. 4
A4L
15
5. 5
khawk
14

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633742
• Total Posts
3013636
×