• Advertisement
Sign in to follow this  

Noise and 3D Textures

This topic is 2075 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

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
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. Edited by Ashaman73

Share this post


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

  • Advertisement