gazebosim / gazebosim/gz-rendering

Point lights do not respect the material's cast shadows property (ogre2)

Open
#916 0 comments 0 reactions 0 assignees View on GitHub
bug ogre2.x
Dominant language
C++
Stars
81
Forks
90
Avg merge
1d 13h
Merged PRs (30d)
10

Description

## Environment
* OS Version: Ubuntu 22.04
* Source or binary build?
Source, Harmonic, gz-sim8 branch.

* If this is a GUI or sensor rendering bug, describe your GPU and rendering system. Otherwise delete this section.
- Rendering plugin: [ogre2].

## Description
* Expected behavior: Point light should not cast shadows on objects that has a material with CastShadows set to `false`
* Actual behavior: Point light ignores cast shadows property.

## Steps to reproduce

With gz-sim,

1. `gz sim -v 4 shapes.sdf`
2. Add a point light using the GUI (via the `Lights` GUI plugin if not already open)
3. Click on the point light, go to the component inspector and set `Range` to 10 and toggle `Cast shadows` to true.
4. Click on rotate icon in the transform control tool and select the box to see that the rotate visual casts shadows:

## Output
point_light_cast_shadows

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with `gz sim -v 4 shapes.sdf` using the Ogre2 rendering plugin, then inspect the point-light and material shadow handling involved in the rendering path. Done means a point light with shadows enabled no longer casts shadows on objects whose material has `CastShadows` set to `false`.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.