displaz icon indicating copy to clipboard operation
displaz copied to clipboard

Approximate ambient occlusion

Open c42f opened this issue 10 years ago • 4 comments

Ok, this might be a toy, but it also might be quite useful. See the aqsis PBGI implementation as a reference (or may want the simpler approximation outlined in one of the GPU gems books?)

c42f avatar Aug 22 '13 11:08 c42f

I think this should be bumped up on the priority list - some form of shading for point clouds would be a great win for Displaz !

r-chris avatar Jun 15 '16 21:06 r-chris

It'd be particularly useful for point cloud data which has no intensity or other colouration.

For aerial lidar style data we'd potentially want occlusion rays only for the upper hemisphere since the ground should block downward rays. Normals may need to be computed roughly using PCA, which will probably need a better spatial acceleration structure than the builtin octree. All in all it's probably quite a bit of work but it'd be fun and useful.

c42f avatar Jun 16 '16 12:06 c42f

I assume we would just pre-compute normals on load and feed those to a shader for each point. We could even pre-compute the occlusion and just pass in a single greyscale value since we don't really have any dynamic data that we want to deal with - it shouldn't impact our rendering performance.

What do you think about screen space ambient occlusion - looks like the guys from PoTree tried it for point clouds: https://twitter.com/m_schuetz/status/621752192635170817

r-chris avatar Jun 17 '16 00:06 r-chris

Yes, I was planning to add a channel to the point cloud and prebake the AO in there. That way we're not restricted to using GPU techniques only.

On the other hand, the screen space stuff is probably even better because it'll integrate really nicely with the custom fragment shaders.. The tricky thing is that, it's relatively intrusive on the rendering pipeline, needing special shaders and rendering passes. The trick would be to figure out if we can fit those rendering passes in after the main rendering pass in such a way that the AO lighting term was applied on top of the results of the user-defined point cloud shaders.

c42f avatar Jun 17 '16 01:06 c42f