Skip to content

Ambient light is not taken into account in Ogre1 #1015

Open
@azeey

Description

Environment

  • OS Version: Ubuntu 22.04
  • Source or binary build? binary gz-rendering 8.2.0

Description

  • Expected behavior: Ambient light to affect scne
  • Actual behavior: Changing ambient colors in the <scene> tag or in MinimalScene's <ambient_light> seems to have no effect.

Steps to reproduce

  1. Run the following SDF file
<?xml version="1.0" ?>
<sdf version="1.9">
  <world name="default">
    <scene>
      <ambient>1 1 1 1</ambient>
    </scene>
    <gui>
      <plugin filename="MinimalScene" name="3D View">
        <engine>ogre</engine>
        <scene>scene</scene>
        <ambient_light>1 1 1 1</ambient_light>
        <camera_pose>-6 0 6 0 0.5 0</camera_pose>
      </plugin>
      <plugin filename="GzSceneManager" name="Scene Manager"/>
      <plugin filename="InteractiveViewControl" name="Interactive view control"/>
    </gui>
    <model name="test_gradient">
      <link name="base">
        <visual name="v1">
          <geometry>
            <box>
              <size>2 2 2</size>
            </box>
          </geometry>
          <material>
            <diffuse>1 1 1 1</diffuse>
          </material>
        </visual>
      </link>
    </model>
  </world>
</sdf>
  1. You should see a black box, but it should be grey or white
  2. Try changing <ambient> or <ambient_light> and run again to see any change.

Output

This is what it looks like locally.
image

Running it with ogre2 shows:
image

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    • Status

      To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions