Gotcha! I'm curious how L2 and L-infinite spaces compare in terms of step iterations.
It seems to me that exact SDFs would not be worth the extra steps in most cases.
Conversation
Replying to
I don't know, but intuitively I imagine it takes 1.73x more steps on average? It'd be great if somebody that has actually used Linf for raymarching can confim.
1
1
2
Replying to
I'd guess that the average would be between 1 and 1.73, but not sure how to integrate that.
I'm strongly considering writing Linf ray marcher now
1
1
we went with linf originally purely because ellipsoids, but irrc leaned into it as there was some neat forms for other (simpler) shapes; re step count, we didnt sphere trace so its wasnt a big issue. rather, we start the ray v close to 0 surface anyway, and just ...
1
3
look for the zero crossing with a fairly limited loop 'inside' a brick of 8x8x8 sdf values. the slow pixels are the grazing ones anyway, which is true for Linf as it is for L2. another overlooked aspect of Linf: it has a really strong artistic 'look' under softblend etc
1
8
and the art director really liked it - so the choice isnt purely technical, in the end. sorry to not have a clearer answer for your (valid) 1.73x-or-not question :)
1
2
Yep that's the paper that inspired it, here's a shadertoy example: shadertoy.com/view/Mt2XWG. The key point is that you want to solve the (max norm) distance field in a local space with axes aligned to the shape axes, which simplifies all the maths. (1/2)
1
1
6
Tracing in L2 is stepping inside spheres. Tracing in max norm is stepping inside (maybe rotated) boxes. Just step as far as you can inside that rotated box. (2/2)




