gazebosim / gz-rendering

C++ library designed to provide an abstraction for different rendering engines. It offers unified APIs for creating 3D graphics applications.
https://gazebosim.org
Apache License 2.0
56 stars 51 forks source link

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

Open osrf-migration opened 6 years ago

osrf-migration commented 6 years ago

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

Additional context

This blue spot light had shadows on:

lightshadow.png

osrf-migration commented 6 years ago

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


osrf-migration commented 6 years ago

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


WilliamLewww commented 3 years ago

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.

chapulina commented 3 years ago

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.

iche033 commented 3 years ago

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.

WilliamLewww commented 3 years ago

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

iche033 commented 3 years ago

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