That's only because you're not using ray tracing to its full potential. Ray tracing is perfect. It can calculate images exactly as they should be constructed from light*. The problem is that level of quality is too damned expensive! In reality in a foggy cloud, you'd have billions of tiny particles. Pure ray tracing would trace through this cloud computing intersects with particles and reflections and determining blocked light from reflected particles in an insanely complex interaction that's impossible to calculate in human lifetimes. So instead, we use approximations for volumetrics. One option is to sample at discrete points along the ray. At you point, you could cast secondary rays for things like subsurface scattering. Another is take the bounding volume (length of ray between entry and exit volume surfaces) and compute an amount of reflected and transmitted light calculated as probabilities of hitting a particle within the cloud. Importantly, you use exact surface tests (either a surface is hit, or when it's not, you try the next step). Another option is to use volumetric samples but then you're using a different algorithm to the 'perfect' ray tracing algorithm. It would appear that in CGI parlance, Ray Marching is used to described a volumetric sampling process.In my experience, raymarching volumes to achieve very good results has always been more expensive than raytracing itself.
To answer LB's original question more directly, ray tracing (ray casting on a single iteration) calculates a surface hit by a ray and yields the surface and its normals and any other details in the surface description. Ray marching performs an iterative search along a ray in discrete steps until it determines it is inside an object, and as such is both lower resolution in terms of depth and doesn't yield surface details (although you could approximate them). I've read ray marching is a better fit for GPUs, but don't know for sure. And PowerVR includes a raytracing unit for Total Awesomeness!
Ray Tracing
Shoot a laser in a direction. Does it hit anything? Yes - that's your surface.
Ray Marching
Get a 30 cm ruler and point it in a direction. Is the end of that 30 cm ruler penetrating something? No - advance along another 30 cms. Keep repeating until the end of the ruler penetrates a surface - there's your object.
Obviously ray marching is too dangerous to use for rendering humans.
* You'd need to add refraction and diffraction on top of the traditional straight-line rays to truly nail it, and have a suitably solvable representation of your scene data for the ray intersects which we have with triangle based geometry. Ideal case, represent your data as atoms and trace light from atom to atom...
Last edited: