Ray tracing Voxels made out of Glass
voxelchain.app
voxelchain.app
https://bugfix-66.com/e2d9aaf5b7f285b4d35c46e87fcf6f7e25d338...
You can then cast rays through 3D space mapped onto 1D space, with one ray per GPU thread.
The space-filling curve gives you locality of reference (just like an octree), and the simple linear nature of the data means you can use a sparse bit vector to represent it. Huge regions without voxels are represented implicitly:
https://bugfix-66.com/7256e0772dc3b02d72abf15b171731c933fd44...
Of course, you want a much larger branching factor (to get a shallower tree) for rendering.
You can step your ray through the space without deinterleaving the bits, like this:
https://bugfix-66.com/d6907b4d3eb6330241128ffbaeef6194ddeecc...
This technique allows extremely detailed (and real-time editable!) voxel worlds with tiny code.
Each lidar return (a 3D point) provides a line of empty voxels from the lidar origin to the location where the laser hit a surface. Because you know the light followed that line uninterrupted, you know all the voxels on the line are empty.
The lidar is giving you thousands of points per second and the lines (derived from the points) carve the voxel space. The voxel space is rendered continuously. It's very satisfying to watch the space being carved out.
I don't know of anyone else using this technique before me, and I don't know of anyone doing it now.
But thanks for taking the time to post a comment!
It can be used for live 3d models with single (tracked and moving) or multiple (known and fixed) cameras.
If it was the same that I read, it was a neat paper, but I’m having trouble finding it within a few searches. I don’t recall I’d they used a point cloud or voxels, but the difference between the storage of the 3d structure as a point cloud or voxel doesn’t seem to warrant your response. They’re trivially converted to one another, in this context.
Thanks for the inspiration
BTW, on the GPU Morton is handy and convenient but not the absolute fastest. You can do simple tiling and get all the cache benefits in fewer instructions. It’s kind-of like one single Morton interleave step, say, for example, interleave the bottom 3 bits and then the top 7 bits. (But note you can’t blindly interleave any number of top bits anymore, it needs to be the exact number of bits you’re using, or a row-major indexing calculation using a multiply instead of bit shifting.)
filled = to & mask
to filled = to | ^mask
In other words, to OR in 1-bits so the carry can travel across the irrelevant part of the register.Subtraction is similar:
https://bugfix-66.com/adbc40fa7c8c838d8d34bcd35525313dc91dea...
But for subtraction you want to AND in 0-bits so the borrow can travel.
> You can then cast rays through 3D space mapped onto 1D space, with one ray per GPU thread.
I can’t figure out what this actually means, to map a 3D space onto a 1D space?
It also gives a potentially better alternative.
Seems like it uses a WebGL feature that Firefox doesn't support? Whatever the boolean "isManualMipMappingSupported" refers to probably doesn't work in my browser (because EXT_color_buffer_float is supported by Firefox and so is normal WebGL and those are the three checks that make "WebGL is not available" appear). At least the detection is done based on feature detection rather than simple user agent filtering, so this demo should work when Firefox eventually adds whatever feature this site is relying on.
There's a line in the console that says "https://stackoverflow.com/questions/71247789/how-do-you-rend...". This leads me to https://stackoverflow.com/questions/71247789/how-do-you-rend... which appears to be a Firefox bug?
GNOME Web gives me a completely blank page so whatever version of WebKit that's running is utterly unsupported as well...
Looks like WebGL isn't as broadly supported as I thought!
Got an RTX 2070.
https://www.youtube.com/watch?v=9SplEU05z64
Using Deformations for Browsing Volumetric Data
1,367 views Jul 31, 2009: A prototype user interface for browsing volume data. Presented at IEEE VIS 2003 by Michael J. McGuffin, Liviu Tancau, and Ravin Balakrishnan. For more information, see
https://profs.etsmtl.ca/mmcguffin/research/#mcguffin_vis2003
https://profs.etsmtl.ca/mmcguffin/research/volumetricBrowsin...
WebGL is absolutely available in my browser. The issue, unlike what the site logs to console and does not tell the user (in this case), is:
> WebGL warning: readPixels: Format and type RGBA_INTEGER/UNSIGNED_BYTE incompatible with this RGBA8UI attachment. This framebuffer requires either RGBA_INTEGER/UNSIGNED_INT or getParameter(IMPLEMENTATION_COLOR_READ_FORMAT/_TYPE) RGBA_INTEGER/UNSIGNED_INT.
Which is gibberish to me, but in fact less confusing than the presented error.
Is this really ray tracing the glass bits? The way it turns on & off when passing through the glass surface hints at some hybrid shader tricks, perhaps?
Is this broken?