Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary GUI light has different angle than when it is added to the scene #2981

Open
peci1 opened this issue Apr 22, 2021 · 4 comments
Open

Comments

@peci1
Copy link
Contributor

peci1 commented Apr 22, 2021

With #2947 merged, it is now even more apparent that the temporary spot light used in GUI when interactively adding lights has wrong "shining angle":

light_visual.mp4
light_visual2.mp4

As can be seen in the videos, the wrong size now affects both the light source and the visual (i.e. the visual's size is correct regarding the temporary light's size).

Or is it just so that the temporary light has different default properties than the default added light?

@peci1
Copy link
Contributor Author

peci1 commented Apr 22, 2021

If I Ctrl+C and Ctrl+V an existing spot light, the temporary light's size is correct.

@peci1
Copy link
Contributor Author

peci1 commented Apr 22, 2021

It seems it's because GUI doesn't actually set the inner/outer angle of the OGRE light, so it uses its defaults: 0.52/0.7 rad, instead of 0.6/1.0 rad used in the cached message that is published to the factory.

https://github.com/OGRECave/ogre/blob/56833c49119da275669cc1c168fa53c0e5ed1d65/OgreMain/src/OgreLight.cpp#L46-L47

https://github.com/osrf/gazebo/blob/2f4d1fa5d63a6ed307d0894a0940e6dbda9473c6/gazebo/gui/LightMaker.cc#L196-L197

@peci1
Copy link
Contributor Author

peci1 commented Apr 22, 2021

Directional temporary light seems to have wrong attenuation:

directional_light.mp4

@peci1
Copy link
Contributor Author

peci1 commented Apr 22, 2021

Fixed by #2982.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant