gz-rendering icon indicating copy to clipboard operation
gz-rendering copied to clipboard

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

Open osrf-migration opened this issue 7 years ago • 7 comments

Original report (archived issue) by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


Summary

All lights have the Light::SetCastShadow function, but it only works if the light type is directional.

Motivation

I noticed this while reviewing this Ign-Gazebo PR. The issue is analogous to Gazebo issue 2083.

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

osrf-migration avatar Oct 30 '18 17:10 osrf-migration

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


  • changed title from "Point and spot lights don't cast shadows" to "[Ogre1.x] Point and spot lights don't cast shadows"

osrf-migration avatar Nov 09 '18 23:11 osrf-migration

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • Edited issue description

osrf-migration avatar Nov 21 '18 00:11 osrf-migration

If the engines are similar enough, I could try to implement point light shadows like how I did here: https://github.com/osrf/gazebo/pull/3051.

WilliamLewww avatar Jul 26 '21 20:07 WilliamLewww

That would be nice! ign-rendering uses the same Ogre 1 version as Gazebo classic, so I think that it should be relatively straight-forward to port that implementation.

chapulina avatar Jul 26 '21 23:07 chapulina

changes to the core classes should be straight forward to port. The demo world will likely have to live in ign-gazebo because ign-rendering does not support parsing sdf files.

iche033 avatar Jul 27 '21 04:07 iche033

I'll also see if I can get it working for Ogre2.

WilliamLewww avatar Jul 27 '21 13:07 WilliamLewww

directional light and spot light shadows should be working in ogre2. However, there is an issue with having directional light and point light shadows enabled at the same time as found in https://github.com/ignitionrobotics/ign-gazebo/pull/587#issuecomment-769507138

iche033 avatar Jul 27 '21 16:07 iche033