Gazebo | Ignition | Community
Ask Your Question

Physically Based Rendering howto

asked 2023-03-28 16:05:42 -0500

jrtg gravatar image


I've seen the ROSCon presentation (video - slides) on "How to Achieve Realistic Visuals in Ignition Gazebo", and this community meeting recording on the same topic.

Both give a nice overview of the possibilities, but don't really discuss the "how" to do this, other than mentioning Zbrush, Substance painter, 3ds max and blender.

In the ROSCon video also a "custom 3ds max script" is mentioned to export to sdf, but i found no further references to that script.

I found this plugin to export Albedo/Roughness/Emission/etc from Blender, and I succeeded in generating some png's, but I can't get them to show from the sdf.

Would there be any more info on how to do this?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2023-04-21 02:53:25 -0500

jrtg gravatar image

updated 2023-04-21 03:56:57 -0500

I intended to write a real tutorial, but given the lack of time and somebody recently asking the same question, I decided to quickly write down the necessary steps as a guide. It might not be 100% accurate as I tested this only on one model and it's a few weeks ago so it's based on memory. But it should get you started.

You need to:

  1. Apply textures in Blender,
  2. "Bake" them into several images (albedo map, normal map, roughness map, etc), and
  3. Load these with your model.

Applying textures:

Depending on the complexity of your models, this can be involved. For more info google for "blender UV mapping". The UV mapping defines how a 2D texture image is mapped to the surfaces of your model. Here are a few relevant videos:


Baking is the process of creating a set of images, specific for your model (according to the defined UV mapping), that contain the information on how the model should look (albedo, roughness, etc).

If I recall correctly, default baking in Blender has to be done manually for each map, so you want to use an add-on instead. There is this free add-on, or there are several commercially available alternatives, such as SimpleBake, which have some more whistles and bells. The free plugin worked for me (though tested only for one, rather simple model).

The model-specific baked images then need to be specified in the sdf, so they are loaded for your DAE model. See the example mentioned in the comment of @azeey .

About textures:

You can find textures online, e.g. from BlenderKit, or if you are modeling a physical object you could define your own textures from pictures, but that involves several steps, e.g. to make the images seamless and to create the texture maps. See e.g. following video's:

You would then use these maps to define your texture in Blender (see e.g. this video), apply the texture to your model, and then do the baking step to generate the texture maps (specific to your model) to load in the SDF.

edit flag offensive delete link more

answered 2023-03-30 12:25:42 -0500

azeey gravatar image

updated 2023-03-30 12:26:50 -0500

I don't know if there's a tutorial for how to set the <material>tag in sdf, but there are plenty of examples on Fuel. Here's one (from searching "PBR" on Fuel): There's a download button on the right side that'll let you download a zipped file with the original model file and materials.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2023-03-28 16:05:42 -0500

Seen: 204 times

Last updated: Apr 21