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
Enhancement for 3D: light of individual vertexes #2650
Comments
I don't think that what you said fixes anything because you are talking about the built in normal calculator right? Not the custom...? Sorry it took so long to reply. |
And my class is 200 lines long...(I should have used noise but I didn't so there is a lot of extra code) do you really want me to send it? |
The bug affected all normals. This was fixed by new lighting shaders. Built-in normal calculation had to be fixed too to work flawlessly with new shaders. See here for explanation what was giong on. If you don't want to send the code, please try to run your code in processing 3.0a2, if my theory is correct, it was already fixed. As for your proposal of diffuse() function, I'm not sure what you mean. Diffuse light is not affected by position of viewer, what matters is position of light source and surface normal. Diffuse lighting is computed by Lambert's factor, there is no max angle which could be set. |
Oh I understand now, thanks for the diagram! And also thank you for your time! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
@codeanticode
I would just like to point out that in addition to a normal() function for every vertex, a function such as diffuse() would be lovely so that the greatest angle that the light bounces off to can be changed. As it is, Processing is very frustrating when trying to create uneven ground. The vertex as the top of hills have to have their normal face straight up and so the light often doesn't reach the "eye" of the camera resulting in some very odd and distracting shading bits that flash and disappear when you get close:
This function would also be really useful for other objects, allowing the user to decide how much shadow is present based off of the object not the light. It would create more contrast and definition.
Thanks for your time!
(this was originally in another section but has now been moved to here)
The text was updated successfully, but these errors were encountered: