svg3d icon indicating copy to clipboard operation
svg3d copied to clipboard

back-to-front sort should use occlusion ordering

Open prideout opened this issue 5 years ago • 1 comments

The current "sort by centroids" strategy is not robust, instead we should use a BSP as described in RTR 3rd ed section 14.1. This is what the old-school games like Doom did instead of z-buffering.

See this screenshot for an example of an issue that this will fix (gltf branch).

Screen Shot 2019-07-09 at 8 29 26 PM

prideout avatar Jul 10 '19 03:07 prideout

The main problem with a BSP approach is that splitting is inevitable for scenes like this. Splitting might be acceptable for fill-only styles, but we'd like to allow clients to use stroke.

Instead of a BSP, it would be great to use a non-splitting visibility sorting algorithm, such as the one described in Visibility Sorting and Compositing for Image-Based Rendering by Snyder and Lengyel (attached).

VisibilitySorting.pdf NoSplitting.pdf

prideout avatar Jul 12 '19 23:07 prideout