Comment by xyzsparetimexyz

2 days ago

It's really not that hard to ray trace the voxels instead of using rasterization and allows for way higher voxel counts.

https://dubiousconst282.github.io/2024/10/03/voxel-ray-traci...

Hello, author here.

It's actually more efficient to do a hybrid approach, especially at high view distances. Rasterizing triangles is extremely fast, and is basically a perfect primary-ray intersection. Ethan Gore recently did some experiments with raytracing and said that for large scene volumes (his engine comfortably renders the entire 32-bit range, or 4B^3) it turns out to be faster to do raster for primary rays and raytrace shadows/GI.

I've always wondered why voxel engines tend to produce output that looks so blocky. I didn't realize it was a performance issue.

Still, games like "C&C: Red Alert" used voxels, but with a normal mapping that resulted in a much less blocky appearance. Are normal maps also a performance bottleneck?

  • Hello, author here :)

    I originally chose to go with axis-aligned blocks and hard axis-aligned normals because I liked the aesthetic. I've since slightly course-corrected; each voxel has bent normals which follow the surface. How much the normals are bent is artist configurable. This has the effect of smoothing out the look of the surface when viewing from a distance, but still gives the distinct blocky look when up close.

    In terms of performance, there is a cost to having fully 3D normals per voxel, but it's certainly manageable. There's a lot of other, more expensive, stuff going on.

  • Before Minecraft, basically all voxel engines used some form of non-axis-aligned normals to hide the sharp blocks. Those engines did this either through explicit normal mapping, or at the very least, by deriving intermediate angles from the Marching Cubes algorithm. Nowadays, the blocky look has become stylish, and I don't think it really even occurs to people that they could try to make the voxels smooth.

    • Voxels have been around since the 1980s. The smoothness came from that beautiful CRT and its inability to display crisp images. Normals weren’t really used until early 90s and used heavily by games like Comanche by NovaLogic.

      The reason why Minecraft voxels are blocks is because Notch (Markus Persson) famously said he was “Not good at art”. He didn’t implement the triangulation and kept them unit blocks. Games that had voxels AND were triangulated that came before Minecraft were Red Faction, Delta Force, Outcast just to name a few.

      The point is, voxels aren’t anything special, no more than a texel, or a vertex, or a splat, a normal, or a uv. It’s just a representation of 3D space (occupied/not occupied) and can just as easily be used for culling as it can for rendering. The Minecraft style because popular because it reminds people of pixels, it reminded people of legos, and Minecraft was so popular

      5 replies →

    • I think marching cubes is still decently popular in games with modifiable terrain, we just stopped referring to it as voxels

It's way more performant though and looks fine so I see the reasoning why you would do rasterization instead

  • Can you add more details? This seems to directly contradict GP. GP said ray tracing can do higher voxel counts = ray tracing is more performant (than rasterization).