raymarching grid traversal + custom shapes ?
category: gfx [glöplog]
hi guys,
I'm currently working on this shader : https://www.shadertoy.com/view/lssSzn
So it's a grid traversal raymarching, which is very fast, and I'm trying to display custom shapes for each voxels instead of basic cubes.
For now, I can't display anything other than cube or sphere as each voxel.
I tried playing with the "sphereIntersectPOW" function in every way, but still no luck...
Would you have any idea on how to improve this code ?
Thanks !
tomtom
I'm currently working on this shader : https://www.shadertoy.com/view/lssSzn
So it's a grid traversal raymarching, which is very fast, and I'm trying to display custom shapes for each voxels instead of basic cubes.
For now, I can't display anything other than cube or sphere as each voxel.
I tried playing with the "sphereIntersectPOW" function in every way, but still no luck...
Would you have any idea on how to improve this code ?
Thanks !
tomtom
you mean something like this? https://www.shadertoy.com/view/XlfGDs
Not really, because this one doesn't use grid traversal algorithm, which is way faster
Raymarching barely benefits from sparse-voxel octrees. Its almost just as fast without them.
Octrees may help You to find The closest STATIC object faster.
But dynamic and intersecting objects drain octree efficiency too much.
I have This idea to make a binary thee of transforming mirrors between The same shaped signed distance functions.
You traverse trough projections based on what side of The next branching mirror/transform You Are. And in The end there is only one object. Mirrored to a fractal tree of The dynamic shape of your Choice.
Then make 1 tree of transforms foreach shape.
But i didnt overvome too many hurdle- cases of that idea to instance it.
Octrees may help You to find The closest STATIC object faster.
But dynamic and intersecting objects drain octree efficiency too much.
I have This idea to make a binary thee of transforming mirrors between The same shaped signed distance functions.
You traverse trough projections based on what side of The next branching mirror/transform You Are. And in The end there is only one object. Mirrored to a fractal tree of The dynamic shape of your Choice.
Then make 1 tree of transforms foreach shape.
But i didnt overvome too many hurdle- cases of that idea to instance it.
Do You Want to implement "marching tetraheder" or "marching cubes" and just dient know The names of these methods?