-
-
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
Addition of Metalness Property for IBL and non-IBL. #6609
Comments
It would be great if anyone here share's there thoughts on the implemntation or any futher changes to it. :) |
Thanks for bringing this up! Before deciding to add something like this, I think we should answer a few questions about how it fits in with existing p5 functionality to see what the best approach would be. According to https://learnopengl.com/PBR/Theory:
Later on, they also say:
This leads me to two questions:
I think the answer to (1) can help guide discussion of accessibility, like if this is to make something already possible easier, or to enable something not currently possible. |
I think I understand why we set the By applying this technique with Please correct me if I'm mistaken @davepagurek . And wanted to know your further thoughts on this? Although I'm not entirely certain about my thoughts, what I believe is that by eliminating diffuse lights and setting only specular lights, we may not be able to achieve a metallic texture. I suppose we need to explore enabling something that may not be currently possible like doing balancing stuffs or something else. Waiting for your thoughts :) |
I guess we have two code paths to consider: one for image light, and one for all the other lights (point, directional, and spot lights.) It looks like for image light, we definitely will need to adjust the way we balance between diffuse and specular highlights -- currently, since we are adding one on top of the other, we use a p5.js/src/webgl/shaders/lighting.glsl Lines 131 to 133 in fc660dd
To address it, it seems like we have two options:
The other thing to consider is how it would address the other light sources. How do those look right now with a black fill and non-black specular material? Do you think we could introduce the same balancing between diffuse and specular here? It could be worth experimenting with hardcoding some numbers in the shader to see what the effects of that balancing would be, to see if it looks the way we want. p5.js/src/webgl/shaders/lighting.glsl Lines 75 to 78 in fc660dd
|
Increasing Access
I would like to propose the addition of a new feature to the lighting system, specifically the inclusion of an "Image Lighting" functionality that introduces a metalness property to materials. This enhancement aims to make materials look more realistic, resembling actual metal surfaces.
Most appropriate sub-area of p5.js?
Feature request details
The implementation involves introducing a function, let's call it
metalness(value, roughness)
, where:Increasing this parameter enhances the metallic appearance.
Increasing this parameter results in a decrease in shininess.
This feature would significantly enhance the versatility of the lighting system, allowing developers to achieve a more authentic representation of metallic materials within their scenes. It provides a simple and intuitive way to control metalness and roughness.
The text was updated successfully, but these errors were encountered: