-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Question]: Is there a way to detect which hulls are affected by light? #25
Comments
Hi and thanks! I understand you envision a property on The checks for light / hull intersections are currently performed here: Lines 301 to 302 in 4b85d25
Let me know what would be best fit for your scenario. Perhaps I can pull the aforementioned method apart and attach that information to a light on a frame-by-frame basis. |
Thanks for the quick response and details. You're right, that check isn't quite enough for my particular case. To explain my scenario in more detail, I'd like to take action on the entities in my game that are not lit up (on a particular frame). To do this, I am hopeful to get to know which hull are lit up via penumbra; if I know this much, I can map them to game entities on my side. Unfortunately, the AABB intersection isn't enough since, as you know, this might identify hulls eclipsed by other hulls. I'm guessing the checks you mentioned above are for narrowing down and identifying possible candidates to shade (for performance), but the final determination of light drawing is done in the Penumbra*.fx code? Hopefully there would be a way to return what hulls are actually shined on from the fx calculations. |
It looks like Unfortunately, I'm not a graphics programmer, so this is as far as I can get without help / doing some deeper learning of what VAOs are, what role the hull indices play versus the hull vertices, how these integrate with the graphic effects, etc. That said, I would defer to your opinion on whether it is possible to identify the hulls hit by light and the right approach. However, I'm happy to get my hands dirty if you do not have the time; I completely understand. Thanks. |
First of all, great library! It's light years ahead of other attempts on the internet.
I have successfully added a light into my top-down prototype, which is casting shadows beautifully on my hulls. Now I'd like to understand if there is a way to figure out which hulls are casting shadows (in other words, which hulls the light is reaching)?
I didn't see any hooks for this in the Hull class, so I'll keep looking throughout the code base, but thought I'd ask too. If I find something, I'll post it for others too. Thanks.
The text was updated successfully, but these errors were encountered: