User login

Structured Light Projector

The UWSim structured light projector displays user configured textures over the scene along the -Z axis (osgcamera like) of their local frame . This projector is able to simulate arbitrary laser and vehicle lights casting realistic shadows. Here we can see an example of use:

  <structuredLightProjector>
    <name>laser_projector</name>
    <relativeTo>sls</relativeTo>
    <fov>21</fov>
    <image_name>data/textures/laser_lines.png</image_name>
    <laser>1</laser>
    <position>
      <x>1</x>
      <y>0</y>
      <z>0</z>
    </position>
    <orientation>
      <r>0</r>
      <p>3.14</p>
      <y>1.57</y>
    </orientation>
  </structuredLightProjector>

As usual the previous XML code adds a structured light projector at the given position and orientation with respect to sls. fov tag configures the field of view of the projector (also known as angle of view). image_name tag provides the image to project, RGBA images are allowed but alpha channel will be used as a binary value to project or not project the texture on every pixel. Finally laser label decides if the projection should be treated as laser or not, main difference is laser light does not suffer attenuation along distance and it does not mix with objects color.