Is there a way to measure light-levels or shadows on a plane or surface?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SecretJuice

I’m participating in my first-ever Game Jam on Itch.io, and the theme is “Shadow Puppets.” I think I took the theme pretty literally so I’m making a game about trying to make the shadows from a pair of horrifically contorted hands match a given shape on a backdrop.

I’ve made it so that you can control the hands etc, so my last step ought to be making it so that the game can detect if the shadows produced to match the shape are accurate. The problem is that I really just don’t know where to start or where to look for advice since I can’t seem to find anyone with a similar question.

If there was a way to measure “light-level” or something on a specific plane object then I can probably just make lots of small planes and use them to measure it. Is there a way to do that? Even if there was, is there a better way to go about it?

I appreciate any help anyone can offer, even if they just tell me where to look. Thanks!

:bust_in_silhouette: Reply From: Dlean Jeans

I suggest control the hands to a desired shape then record the transform of the hands and maybe fingers (position, rotation) into a file or script.

Then when you run the game, perform a comparison between the current shape of the hands to the recorded transform. If the differences are under some thresholds (e.g. < 3px and < 5 degrees), then it’s a match.

No need for light or shadow levels measuring.

I was considering doing that, but the ideal would be that there would be several ways to achieve a specific shape (these are really messed up hands). Though after further research it seems that there really isn’t a proper way to measure light the way I wanted, and for the purposes of a janky game jam your suggested method is probably the best.

I’d just need to come up with shapes that can’t be replicated in more than one way, or if worse comes to worst I can submit it without the functionality and just give them shapes for people to “honor system” through.

SecretJuice | 2019-07-02 16:28