Closed markschlosseratbentley closed 9 months ago
I experimented with some initial algorithms. Basing maxDistance on projectExtents could be problematic when you zoom out such that you begin viewing an area larger than the initial project extents.
Needs further investigation - does not seem super feasible at the moment without more extensive research.
This draft PR will change AO to make the effect more pleasing in views where geometry is more distant from the camera than other geometry.
We should also consider adding some kind of API that could suggest AO settings which would work well for a particular iModel based on its project extents, etc. For example, and most easily done, AO maxDistance could be suggested based on project extents. Other parameters like texelStepSize, intensity could potentially be derived by some rules of thumb as well.
API could look like something like this:
suggestAOSettings(imodel): AmbientOcclusion.Settings