gz-rendering icon indicating copy to clipboard operation
gz-rendering copied to clipboard

Port Ambient Occlusion plugin from gazebo-classic

Open iche033 opened this issue 1 year ago • 0 comments

Desired behavior

Port the Ambient Occlusion plugin from gazebo-classic to gz-rendering and offer an API to create ambient occlusion for a scene

Alternatives considered

Implement a new ambient occlusion method directly in gz-rendering

Implementation suggestion

Start off by porting the ambient occlusion plugin from gazebo-classic to ogre (ogre 1.x implementation in gz-rendering): Source code:

Media files:

This will help fleshout the API in Scene. As of gz-rendering8 there are currently a couple of functions to create global illumination (GI) in scene, namely CreateGlobalIlluminationVct, and CreateGlobalIlluminationCiVct. Since ambient occlusion can be treated as an approximation of GI, we could consider having a generic API that takes a GI type like:

 GlobalIlluminationPtr Scene::CreateGlobalIllumination(unsigned int _id, const std::string &_name, GlobalIlluminationType _type)

After the implementation is ported to ogre, the code and shaders will need to be ported to ogre2.

Additional context

Original pull request with screenshots: https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-requests/2916/page/1

iche033 avatar Oct 31 '23 21:10 iche033