Sign in to follow this  
ChristOwnsMe

Noise and 3D Textures

Recommended Posts

ChristOwnsMe    374
I am wondering if anyone could lead me in the right direction on how I would go about generating a minecraft style voxel volume on the GPU. I am generating heightmaps using 2d geometry maps, but for a 3d volume of voxels, would you produce a 3d texture that represents a "chunk" of voxels, send it back to the cpu and iterate over this volume and render the noise?

Share this post


Link to post
Share on other sites
Ashaman73    13715
[quote name='ShadowMan777' timestamp='1339581987' post='4948774']
I am wondering if anyone could lead me in the right direction on how I would go about generating a minecraft style voxel volume on the GPU.
[/quote]
When you use the GPU over a graphical API (no OpenCL or similiar), then you can only render 2d images, that is, if you want to [i]render [/i]a 3d texture, you actually render it layer for layer. When you render it layer for layer, you don't need any 3d texture at all (it actually helps only if you want to use this 3d texture to render something while utilizing hardware filtering).

So, either render single layers of your 3d world on a single texture and read it back from video memory or render multiple layers on single texture and read it back. But I don't think that it really matters at all, as long as you render it layer for layer.

[quote name='ShadowMan777' timestamp='1339581987' post='4948774']
it back to the cpu and iterate over this volume and render the noise?
[/quote]
What do you mean to render the noise ? Noise as surface property or noise to generate your 3d world ? Take a look at [url="http://en.wikipedia.org/wiki/Perlin_noise"]perlin noise[/url], it is applyable to 3d and it can run completly in a shader. Edited by Ashaman73

Share this post


Link to post
Share on other sites
ChristOwnsMe    374
I have 3d perlin noise programmed in my GPU already. I just was trying to think of how to pass the noise from the GPU back to the application to then render voxels based on the noise the GPU returned. So if I want to render a voxel volume at [0,0,0] to [32,32,32],the noise should run once for each voxel POINT, not for each vertice(which I don't know how I would do). That is what is confusing me a little.

basically I am trying to think of what it the best way to return the noise data from the gpu for a voxel chunk I want to render. Thanks. Edited by ShadowMan777

Share this post


Link to post
Share on other sites
winsrp    277
normally you create an array of values in the CPU, and then pass them to the GPU, and have the gpu build all the graphics GS, so you always have the representation of what the landscape is on mem.

[sharedmedia=core:attachments:9449]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this