Title: Ray Marching Voxel based Cube World ? Post by: glennmarshall on August 29, 2013, 11:59:26 AM Hi
I'm trying to implement a Minecraft type Voxel world using cubes - using Ray Marching. I'm using 3d perlin noise to 'cut' away areas in an infinite field of cubes. My problem is that I'm getting lots of unpleasant artifacts like banding and rough, broken looking edges around the geometry. Pictures attached. The Ray Marching engine I'm using was written by someone else, so most of the variables look alien to me, and I'm having to guess what the problem might be by changing various constants I see. Here's my method for cube voxels. Maybe there is a better way, that will get rid of the artifacts, or maybe someone could suggest which parts of the Ray Marching engine I should look at which is responsible. Thanks. Code:
Title: Re: Ray Marching Voxel based Cube World ? Post by: eiffie on August 29, 2013, 05:56:54 PM The renderer is expecting a distance estimate that is continuous. Meaning return values won't jump drastically when comparing points that are close to each other. When you see cuts in the surface that is typically the problem.
Title: Re: Ray Marching Voxel based Cube World ? Post by: glennmarshall on August 29, 2013, 09:56:34 PM actually, I was just checking things, I think I had my camera stuck in the middle of the geometry - giving wired results, so I made sure the camera was safely away from the bounded area, and everything looks as it should.. sorry for wasting your time!
Title: Re: Ray Marching Voxel based Cube World ? Post by: eiffie on August 29, 2013, 10:40:26 PM Glad it works. Looks nice! |