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

Lighting scenario blending [enhancement] #32

Open
ArieLeo opened this issue May 5, 2021 · 5 comments
Open

Lighting scenario blending [enhancement] #32

ArieLeo opened this issue May 5, 2021 · 5 comments

Comments

@ArieLeo
Copy link

ArieLeo commented May 5, 2021

Any chance to have a blending feature between lighting scenario, not full switch but controllable crossfade between 2 scenario?

@ArieLeo ArieLeo changed the title Lighting scenario blending Lighting scenario blending [enhancement] May 5, 2021
@laurenth-personal
Copy link
Owner

Hi ArieLeo,
I've been thinking about this recently and it would require major modifications to support blending.
As far as I know the lightmaps still have to be Texture2D assets which are a bit annoying to update, using Texture assets would open the possibility to use RenderTexture which would be easier to update.
I have not tried light probes blending but I imagine someone with good programming skills could blend light probes in a performant way, but maybe that requires knowledge of high performance code.
In the end, it might be easier to solve this by storing GI in a 3D texture which could be blended. This means baking the GI with the lightmapper's custom bake API and providing the 3D texture GI to a custom shader or shader graph.

If I do experiment something it would be most likely the last option as it sounds easier for me, but it would take a while and I have not started yet, also it would be completely incompatible with the current tool.

@laurenth-personal
Copy link
Owner

@ArieLeo do you have an opinion on what solution you would prefer ?
Do you see other possibilities ?

@ArieLeo
Copy link
Author

ArieLeo commented May 12, 2021

Well if we can have a 3d texture lightmap i assume it would become some kind of irradiance volume? i prefer the 3d volume solution as it would be possible to sample the lightmap for folliages and dynamic objects, they should have more unified lighting looks compared to 2dTex lightmap with lightprobe.
The only tricky part is sampling the irradiance volume, i doubt it is a good idea to sample whole scene 3d volume all the time.

@ArieLeo
Copy link
Author

ArieLeo commented May 12, 2021

on second thought, the solution above can become purely custom GI solution :D

@laurenth-personal
Copy link
Owner

It looks like this is now possible to do with unity's adaptive probe volumes.
It seems still a bit experimental, but maybe it works already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants