Noise and 3D Textures

Started by
2 comments, last by winsrp 11 years, 10 months ago
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?
Advertisement

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.

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 render 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.


it back to the cpu and iterate over this volume and render the noise?

What do you mean to render the noise ? Noise as surface property or noise to generate your 3d world ? Take a look at perlin noise, it is applyable to 3d and it can run completly in a shader.
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.
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]

This topic is closed to new replies.

Advertisement