Skip to content
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

Closed
heyilovepie opened this issue Jul 26, 2014 · 6 comments
Closed

Enhancement for 3D: light of individual vertexes #2650

heyilovepie opened this issue Jul 26, 2014 · 6 comments
Assignees

Comments

@heyilovepie
Copy link

@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:
normal
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)

@JakubValtar
Copy link
Contributor

This looks like #2018 and was fixed in #2644. Can you post a code example so I can check?

@codeanticode codeanticode self-assigned this Jul 30, 2014
@heyilovepie heyilovepie reopened this Aug 9, 2014
@heyilovepie
Copy link
Author

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.

@heyilovepie
Copy link
Author

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?

@JakubValtar
Copy link
Contributor

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.

@heyilovepie
Copy link
Author

Oh I understand now, thanks for the diagram! And also thank you for your time!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants