Skip to content

Commit

Permalink
Update lightmap tutorial links (#722)
Browse files Browse the repository at this point in the history
* update lightmap tutorial links

Signed-off-by: Ian Chen <[email protected]>

* add verbosity

Signed-off-by: Ian Chen <[email protected]>

Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 authored Sep 14, 2022
1 parent b84385d commit 5c9a665
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tutorials/04_lightmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ Light map baking applied to a more complex scene:
When baking we have the option to either bake in all the lighting, both indirect and direct, or just the indirect lighting, also known as global illumination or bounced lighting, and use real time lights in Gazebo for the direct lighting and shadows. With the latter method we get sharper lighting and shadow detail as well as more accurate lighting on our dynamic objects however performance will be impacted by having more real time lights. Even with all the lighting baked it’s still a good idea to have one real time light such as a large point light or directional light works particularly well in order to enhance the effects of the physically based materials.

Lightmaps can be applied to a mesh in Gazebo the same way as other texture maps. Create an `gz::rendering::Material` and specify a light map texture by calling
[SetLightMap](https://gazebosim.org/api/rendering/5.0/classignition_1_1rendering_1_1Material.html#addc6eb6206e0a17ab82aeaea543e8c71). Recall that when creating the light map UV texture in Step 2, we typically use a secondary UV set for light maps. Make sure to specify the index of the light map UV set as the second argument to this function.
[SetLightMap](https://gazebosim.org/api/rendering/7.0/classignition_1_1rendering_1_1Material.html#a70c6e1e529e9c3b588996efd07faab29). Recall that when creating the light map UV texture in Step 2, we typically use a secondary UV set for light maps. Make sure to specify the index of the light map UV set as the second argument to this function.

There are existing example models on Gazebo Fuel that use light maps. The [Depot](https://app.gazebosim.org/OpenRobotics/fuel/models/Depot) model mentioned earlier is one such example, and another one is the [Indoor Lightmap](https://app.gazebosim.org/OpenRobotics/fuel/models/Indoor%20light map) model. To see the Indoor Lightmap model with [Gazebo](https://gazebosim.org/docs/all/getstarted), you can run the following command (requires Gazebo Edifice or above):
There are existing example models on Gazebo Fuel that use light maps. The [Depot](https://app.gazebosim.org/OpenRobotics/fuel/models/Depot) model mentioned earlier is one such example, and another one is the [Indoor Lightmap](https://app.gazebosim.org/OpenRobotics/fuel/models/Indoor%20lightmap) model. To see the Indoor Lightmap model with [Gazebo](https://gazebosim.org/docs/all/getstarted), you can run the following command (requires Gazebo Edifice or above):

```
gz sim -v lightmap.sdf
gz sim -v 4 lightmap.sdf
```

0 comments on commit 5c9a665

Please sign in to comment.