gz-rendering
gz-rendering copied to clipboard
Port Ambient Occlusion plugin from gazebo-classic
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:
- CreaseShading.material
- CreaseShading.compositor
- Modulate.material
- GBuffer.material
- SSAOPost.material
- SSAOPost.compositor
- StdQuad_vp.program
- CreaseShadingFP.glsl
- GBufferFP.glsl
- ModulateFP.glsl
- NoFilterFP.glsl
- StdQuad_vp.glsl
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