-
Notifications
You must be signed in to change notification settings - Fork 287
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
Osg shadows and lighting #976
Conversation
Codecov Report
@@ Coverage Diff @@
## master #976 +/- ##
=======================================
Coverage 56.63% 56.63%
=======================================
Files 310 310
Lines 23924 23924
=======================================
Hits 13550 13550
Misses 10374 10374 |
I was mistaken about the issue of OpenSceneGraph; the real issue was that the home position was being resetted and as such my objects were too far away to be seen. I fixed the issue. The main issue that I see of this implementation is that the ShadowMap technique finds the first light in the scene to create the shadows and does not use all the lights. I am not an expert in OpenSceneGraph and it's mostly okay for me, so I am not planning on trying to fix this. Let me know what you think.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @costashatz, this generally looks good to me!
I have one suggestion. Could we make ShadowWorldNode
shadowing method agnostic? OSG supports multiple methods for shadowing. They say ShadowMap
is the most frequently used option, but it would be worth to allow us to set the shadow methods of ShadowWorldNode
. I believe it shouldn't be too much work, but if so we could make that change in a separate PR.
Also, could you retarget this PR to
Thanks! 😄 |
This PR enables shadows in the OpenSceneGraph (OSG) wrapper of DART and solves #971. In more detail:
ShadowedWorldNode
that overridesWorldNode
and provides the shadow capability (using the ShadowMap technique). I did this for 2 reasons: (1) someone may not want to use shadows (and they can be computationally intensive)and (2) for some reason in OSG when no shadow can be casted, nothing is shown; I am still investigating this issue and ways of by-passing it.Edit: I misinterpreted this; see below (everything is fine).Here's a demo:

Let me know what you think...