4 ms·
Here is my wishlist: Something like GVDB that runs in WebGL and can handle arbitrary dimensional volumes. It's a very tall order!
by macawfish 9y ago
Here is my wishlist:
Something like GVDB that runs in WebGL and can handle arbitrary dimensional volumes.
It's a very tall order!
- saltcured 9y agoBy arbitrary dimensional, do you really mean N-dimensional, or just 3D with more channels of data (than just RGBA), or just larger 3D spans? The OpenGL and WebGL primitives aren't really suited for N-dimensional data since there are specific buffer types and intrinsics for 1D, 2D, and 3D texture handling. You can fake more than 4 channels using more than one texture. You can't really get around the per-axis size limits because these are points of portability and also directly related to resource allocation limits in practice, i.e. GPU RAM is consumed as the cube of 3D texture span. You can abuse WebGL textures a little bit by turning off interpolation and using nearest sampling as if it were a basic array access. But then you still have to write your own array packer and N-dimensional array addressing arithmetic to map the ND coordinate into the 3D coordinate needed by the texture sampler. And you still have to live with such tiny texture size limits that it seems quite pointless except as an academic exercise. I've used this to fit larger 1D arrays into a 3D texture without exceeding a 1024 or 2048 per-axis limit. Actual ND techniques are more feasible in a GPGPU language like OpenCL, where you have more basic memory access and SIMD intrinsics. But I think it will be quite some time before these capabilities are exposed in a web language and also with sufficiently high resource limits to do anything non-trivial.
- macawfish 9y agoI do :) I've written a tool that bakes out clifford algebra functions into glsl (using sympy/sage to generate the clifford algebra). I want to use it to play with volumetric data... in the web browser! Obviously that's very lofty... foolish even. If it's even possible, it'd be hard. I don't have the chops at the moment, and neither does chrome! "But I think it will be quite some time before these capabilities are exposed in a web language and also with sufficiently high resource limits to do anything non-trivial." Realistically, that's probably more what I'm actually waiting for. And GVDB could be perfect, except for its super awkward licensing and platform lock. Ugh! I think there are some other realtime VDB projects out there, so I might check into those some time. In the meanwhile, when I get around to it, I'll probably end up doing low poly ("low-simplex") stuff. A more realistic goal for the browser of today (and for my skillset) is something that can intersect lower dimensional manifolds with simplices embedded in higher dimensions. Dealing with normals will be mind bending. But I believe it can be done! My project is to play with 4D (and higher) Moebius transformations of animated polygon scenes. First, the animated polygons need to be converted into 4d polytopes. Using the intersection tool described above, the 4d scene can be "scrubbed" in a time-like way by transforming the intersecting manifold. Except that now it's possible to apply conformal transformations to the 4d polytopes before scrubbing through! This is an old demo of 3d Moebius transformations applied to key-framed polygons: http://hyperspectives.wondering.xyz/moebius/hyperhorse.html http://hyperspectives.wondering.xyz/moebius/hyperhorse.html Except that now I'm wondering about what 4d Moebius transformations look like. How do they deform animation? I'm pretty sure that under a 4d moebius transformation, all four of the horse's legs could be running at different rates without ever interfering with one another. Of course they'd all be different sizes too. Also, spatial dimensions of the horse geometry would melt into the time dimension, depending on what kind of manifold was doing the time-slicing. What would it look like??! I want to see! I might actually be able to get away with using stereographic projection/rejection for time-slicing instead of intersections, but I need to think that through very, very hard. I think it'd probably result in some gnarly polygons. By the way, another thing I'm really looking into is this: https://link.springer.com/chapter/10.1007/978-3-642-54382-1_17 https://link.springer.com/chapter/10.1007/978-3-642-54382-1_... I've managed to implement these clifford-bezier surface patches in Sage, haven't gotten around to OpenGL. EDIT: By the way, in case you're curious, the idea that the horse's legs could move at different frequencies without intersecting one another is very much related to "spacetime dilation" in the theory relativity. The principle that would keep the hyper-horse from self intersecting is conformal invariance, which is closely related to Lorentz invariance.