2014-04-09
This is the first part in a series of posts about new features in the soon to be released Gazebo 3.0.
Gazebo will gain the capability of using lightmaps, which can be used to improve the rendering performance of complex scenes. Lightmaps can be thought of as texture maps with lighting information pre-baked into the texture. The resulting models appear as if they are shaded by lights in the environment but in fact they are just textures. Lightmaps are typically used for models that do not move with respect to the pose of the lights in the scene. For example, static buildings in an environment with a directional light.
In Gazebo, a lightmap is associated to a model as opposed to the whole scene because there is almost always the chance that something moves in a robot simulation! Lightmaps can be created using popular 3D modeling tools, such as Blender, with the lighting model you see fit. Once the lightmap is generated, export it along with the mesh files and textures as usual and place them in your Gazebo model path. In the model SDF file, apply the lightmap to the model in the same way as if it’s a texture map then simply disable the lighting on the visual.
An example model with lightmap is added to the Gazebo model database. Look for the table_marble model in the Insert Model tab in Gazebo.