Jump to content
  • Advertisement
Sign in to follow this  
rouncer

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.

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

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
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.

We need more information.

Share this post


Link to post
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.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!