-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
A way to position lights with transforms (maybe a variant of worldToScreen?) #7889
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
Comments
Hi @davepagurek! I’m so glad you posted this issue. It led me to some exciting ideas! I think I have a solution to all the problems you raised. I'll start with the overall concept. Then I'll explain how it solves (a) your light problem, (b) the issue you uncovered with
|
Increasing access
While working on this sketch https://openprocessing.org/sketch/2670771 I was positioning an exit sign that I also wanted to cast light. I was positioning the sign model using translations and rotations. Getting the light to go in the same spot was going to be tough because functions like
pointLight
don't take those into account, and requires matrix math. This is likely not something everyone is comfortable with, and may result in them not trying to use lights in their scene otherwise.Most appropriate sub-area of p5.js?
Feature enhancement details
I'm not sure yet what the best way to deal with this is, but, some ideas:
spotLight
, for example)worldToScreen
andscreenToWorld
. This is what I ended up doing in my sketch, defining a similarworldPoint
method at the topobjectToScreen
. Not sure how to navigate that naming just yet, open to suggestions!The text was updated successfully, but these errors were encountered: