semagnum / light-painter

Blender add-on that creates lights based on where the user paints.
https://semagnum.github.io/light-painter/
GNU General Public License v3.0
310 stars 6 forks source link

Rim lighting ray cast issues #43

Closed semagnum closed 11 months ago

semagnum commented 11 months ago

Currently, the rim lighting offset axis is checked by casting a ray from the camera towards the drawn lines. If the ray hits a surface, it uses the reflection vector of said surface. The benefit is it better handles drawn lines not directly seen by the camera. In those cases, it reflects the surface actually seen.

But there's a couple problems with this:

I've been back-and-forth with just reflecting the vector directly (seen in 4de33fc1684a33ff82068f5773ef0ca6066886e4 prior to release 1.0.1), ignoring the line's visibility by the camera. While it doesn't care about occluding objects, it's much faster and often just as precise. For most cases, I expect most users to not notice the difference (edit: even the unit tests still pass with the change).

Would appreciate any feedback on this. The obvious compromise would be just to turn this behavior into an optional parameter, but I want to know if anyone else has issues or preferences.