-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Objects with ambient material only show color using ambientLight #6022
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you! |
This is intentional, we can mention in the docs that |
That would be nice. The existing examples doesn’t thoroughly explain what
methods to use when coloring objects when lights are used, I believe.
whether to use fill() at all and then how this is used in combination with
the different materials. I’ve spent some time reading the docs and have
experience of material and lighting from Blender.
…On Wed, 15 Feb 2023 at 22:02, Dave Pagurek ***@***.***> wrote:
This is intentional, we can mention in the docs that ambientMaterial only
affects the color of the ambient light portion of an object's lighting.
—
Reply to this email directly, view it on GitHub
<#6022 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACBALHAGSEZ7KUT2JYZTX7TWXU74TANCNFSM6AAAAAAU5KNDX4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'd like to contribute to this issue. |
@nikhilhvr I think you can start working on this if you're interested! Let me know if I can help clarify anything as you go. |
@davepagurek I would love to try my hands please guide me on how to get started. |
If you go to a page on the p5 reference that you want to edit, e.g. the ambientLight reference, you can scroll down to the bottom and there will be a link to the source code for both the function itself and its documentation: That particular reference page links to this: https://github.com/processing/p5.js/blob/v1.6.0/src/webgl/light.js#L11 If you want to edit the description or add an example, you can do so in that block comment. |
I want to work on it please assign it to me if it is still available |
I'll just double check first with @nikhilhvr -- @nikhilhvr, are you looking into this one now? If so, I can assign it to you! Otherwise, no worries, it looks like @Tapo41 is interested so we can assign this to them 🙂 |
Yes, @davepagurek I am still working on this issue. |
thanks, I'll assign this to you! |
hey @davepagurek can you review my PR. |
Thanks @nikhilhvr for working on it. Before we make more edits in the pull request, I believe it'd be helpful to discuss the example code and documentation we'd like to add to the Would it make sense to include |
Thanks, @Qianqianye for the suggestion I will consider it. |
Hey, @Qianqianye I made some enhancements in the example Can you please tell me if this is okay or if I have made other changes? |
Thanks for your work on this so far @nikhilhvr! How do you feel about maybe trying the value of |
Thanks, @davepagurek helping me to reach so far. I am really grateful you mentored me. Code
WorkingP5.JS.mp4 |
Looks great @nikhilhvr! It might be worthwhile to use the same value for each channel of |
Hey, @davepagurek I didn't get what I suppose to do further can you please help me out?
|
Sure thing! In an earlier version of your code, you had In your most recent video, you have My suggestion is to use the same value for each channel so that viewers of the example can update the ambient material and still see the effects of changing the ambient light. If we tint the ambient light by making it green, then viewers would also have to modify the ambient light in addition to the ambient material. |
Thanks, @davepagurek for this detailed explanation. Code update
Quick code demop5.jss.online-video-cutter.com.mp4 |
The code in your video looks good @nikhilhvr! (Just a heads up, it looks like the code above the video is different, as it doesn't repeat Also, I think you only need three parameters to |
Hey, @davepagurek is there anything thing left that I can change into this code?
|
Looks good @nikhilhvr! I think we just need to update the indentation to be consistent (de-indent the Feel free to update your PR with this 🙂 |
Thanks @nikhilhvr and @davepagurek for working on the example code. |
Good catch @Qianqianye! Agreed, I think the |
Thanks, @davepagurek @Qianqianye for the suggestions. I am done with enhancements and also updated the PR.
|
Most appropriate sub-area of p5.js?
p5.js version
No response
Web browser and version
No response
Operating System
No response
Steps to reproduce this
If this is intentional, it is not explained in the online reference. specularMaterial shows color.
Steps:
Snippet:
The text was updated successfully, but these errors were encountered: