-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Add support for rendering area light helper as area light surface #618
Comments
Hi, I would like to take this one :) Have you thought in something? We can create a new folder just for "Helper" (this could work for the PhysicalCamera, and other components in the future), and create our own helper. If we do so, let me tried to add some "emissive" value or something to make them feel like a helper --/src The other option might be to traverse the scene in searching for any basicMaterial to override them? Which want you prefer? (any other alternative is accepted) |
Hey Jaime! This would be great! Sorry for the slow response - I was thinking about the best way to implement this. Thinking about it more I'm not sure if adding geometry via something like RectAreaLightHelper is the best way to add support for rendering the light surface. They will doubly contribute to the lighting of the scene because the geometry will be considered emissive to get the right brightness. I'm thinking adding an extra optional field like How does that sound? |
That's sound a good idea, but I have doubts where to start and what should be the final render "helper" sorry if my questions are too basic, I'm new here, and I would like to contribute this project (who looks amazing) Checking the code, I see that you have src/uniforms/LightsInfoUniformStruct.js and src/shader/structs/lights_struct.glsl.js where changes have to be made in order to add this new field. What I'm not sure if changes have to be made in something like src/shader/sampling/light_sampling_functions.glsl.js in order to check the collision? I don't know if you're in discord, but maybe a more fluid communication could help BboyJT#2838 |
Here's a breakdown of what I see as needing to change in order to add this feature. Lets start with the Area Lights and then we can consider adding the option for other light surface (like spot lights with a radius) if we want:
Let me know if that all makes sense. And feel free to make a preliminary PR if you'd like me to take a look. Appreciate you digging into this! |
Would require special handling since the material is set to a mesh basic material. Perhaps this project can export one?
The text was updated successfully, but these errors were encountered: