#23140 - poslundc - Mon Jul 05, 2004 1:51 pm
Hey all,
I'm toying with the notion of doing some stuff with voxel landscapes as a bit of a side-project. I've been reading up on them, both in the forum and out on the net, and I want to write a voxel raycaster but there are a few things I am unsure of.
- Since unlike a traditional raycaster you can't just check along the map's gridlines, how do you determine the step size you use when casting a ray? Is it just trial and error to see what looks good?
- Assume no texture mapping for the moment, just simple flat shading. Once I've obtained the height of a span, would I just adjust the brightness of the terrain colour so that it is lit according to its distance, and then print the column?
- Now assume texture mapping. If I determine that there is a visible span, should I just check to see what texel would appear at that x/y coordinate, light it according to distance, and smear that texel for the entire length of the span?
Thanks,
Dan.
I'm toying with the notion of doing some stuff with voxel landscapes as a bit of a side-project. I've been reading up on them, both in the forum and out on the net, and I want to write a voxel raycaster but there are a few things I am unsure of.
- Since unlike a traditional raycaster you can't just check along the map's gridlines, how do you determine the step size you use when casting a ray? Is it just trial and error to see what looks good?
- Assume no texture mapping for the moment, just simple flat shading. Once I've obtained the height of a span, would I just adjust the brightness of the terrain colour so that it is lit according to its distance, and then print the column?
- Now assume texture mapping. If I determine that there is a visible span, should I just check to see what texel would appear at that x/y coordinate, light it according to distance, and smear that texel for the entire length of the span?
Thanks,
Dan.