google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.59k stars 1.86k forks source link

Local light probe #7647

Open cjlong1213 opened 6 months ago

cjlong1213 commented 6 months ago

Is your feature request related to a problem? Please describe. Suggested by @romainguy https://github.com/google/filament/discussions/7413#discussion-5932895, we design the IBL by HDR Light Studio software but unfortunately all tested IBL images were not good.

I read the Local light probe from filament doc then try to test it but not find it. We are going to test the Local light probe disscuss at this issue https://github.com/google/filament/issues/644#issuecomment-447594189 Does filiment implement the Local light probe feature?

Describe the solution you'd like Test the "Local light probe" which can modify the IBL position and change the default IBL model from "infinity" to definite distance.

OS and backend Android OpenGLES

Nolram12345 commented 5 months ago

So is this basically about a local "reflection probe", similar to the global IBL, but which only affects a specific area? This would be immensely useful.

jeanlemotan commented 5 months ago

+1 No need for anything fancy, a simple API to set the probe per renderable would be sufficient. We can build octrees or octahedrons or any spatial lookups ourselves, we just need API to set the probe.

Nolram12345 commented 5 months ago

I agree that a per-renderable option would be sufficient.

I think an optimal solution would be adding a "probe volume" or something like that - basically just a box that can either be manually assigned an IBL texture, or perhaps even allow for capturing the environment into an IBL cubemap and convolving it for ambient light. This would allow for approximating global illumination in a local space for basically no cost at all. Then just adding the ability to have a blending area between the global IBL and this local volume would basically function as an approximate, but sufficient global illumination system with a constant, very low render cost. This method has been used quite successfully, even in recent productions. This would allow for properly shading spaces that are both interior and exterior, which has many applications, from archviz over product configurators to games.

TheIronLefty commented 5 months ago

+1 Most real-time applications that do not depend on static or real-time global illumination have some sort of application of this method for approximating indirect shadowing.