gazebosim / gazebosim/gz-rendering

[Ogre1.x] Point and spot lights don't cast shadows

Open
#32 7 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
81
Forks
90
Avg merge
1d 13h
Merged PRs (30d)
10

Description

**Original report ([archived issue](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-rendering/issues/32)) by Louise Poubel (Bitbucket: [chapulina](https://bitbucket.org/%7B5cfa2075-477b-4ded-bdb9-8d2479544ec4%7D/), GitHub: [chapulina](https://github.com/chapulina)).**

----------------------------------------
# Summary

All lights have the [Light::SetCastShadow](https://github.com/ignitionrobotics/ign-rendering/blob/6511cba2ed24608e83475b5adde766048f2be325/include/ignition/rendering/Light.hh#L106) function, but it only works if the light type is directional.

# Motivation

I noticed this while reviewing [this Ign-Gazebo PR](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/70/add-support-for-lights/). The issue is analogous to [Gazebo issue 2083](https://bitbucket.org/osrf/gazebo/issues/2083/point-and-spot-lights-dont-cast-shadows).

# Describe alternatives you've considered

* Implement shadows for all light types
* Print a warning if the function is called for a light that doesn't support shadows

# Additional context

This blue spot light had shadows on:

![lightshadow.png](https://osrf-migration.github.io/ignition-gh-pages/data/bitbucket.org/repo/zq9ear/images/2194816254-lightshadow.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.