texture scaling on heightmaps does not appear to be accurate

Issue #2603 new
Tully Foote created an issue

I created a height map and texture from ground truth data. They were validated as accurately aligned in qgis and similarly scaled. However when I rendered it in gazebo I had to adjust the texture size argument to 6000m from 7700m to render correctly. This number was determined by measuring the scaling difference between features in the rendering.

First measuring the width. (also note that the depth and texture are both rendered and nicely aligned)

half_true_width.png

The original render

          <texture>
            <diffuse>file://media/textures/yosemite_color.png</diffuse>
            <normal>file://media/materials/textures/flat_normal.png</normal>
            <size>7700</size>
          </texture>

half_accurate_width_bad_rendering.png

Measuring the offset half_measured_width_to_scale_texture.png

Rerendered with

          <texture>
            <diffuse>file://media/textures/yosemite_color.png</diffuse>
            <normal>file://media/materials/textures/flat_normal.png</normal>
            <size>6000</size>
          </texture>

half_scaled_down_accurate_rendering.png

For testing this world is available here: https://github.com/osrf/uav_testing/tree/master/yosemite_valley

Comments (0)

  1. Log in to comment