google-ar / arcore-unity-sdk

ARCore SDK for Unity
https://developers.google.com/ar
Other
1.4k stars 400 forks source link

DiffuseWithLightEstimation shader too dark in low lighting #27

Closed odbol closed 7 years ago

odbol commented 7 years ago

First I wanted to say I love this library and it's super easy and fun to get started. Thanks!

I've exported voxel models from MagicaVoxel into the Unity sample project. I then applied the ARCore/DiffuseWithLightEstimateion [sic] shader to the models.

On my Pixel, it seems to perform pretty well in daylight and bright indoor lighting, but with lower light situations like a bar or street night lighting, all the models are pitch black (even though there's enough light in the scene to see the sidewalk and detect surfaces).

Am I doing something wrong? Should I be adding light sources to my Unity scene, or using a normal map with the specular shader or something? Or is there a way to tweak the shader so it never dips below a certain lighting intensity?

nathanmartz commented 7 years ago

Can you post some screenshots of the behavior you are seeing? Also, do you have any regular unity lights in the scene or are you depending entirely on the light estimation to light your objects?

odbol commented 7 years ago

I'm depending completely on the light estimation shader. Does that shader also take regular unity lights into account? Should I be adding other lights to my scene? I just used the sample project so it's whatever lighting comes with that.

Daylight looks fine: daylight photo

But inside at night, even though the rest of the scene is visible in the camera, the objects are completely dark: Night photo

nathanmartz commented 7 years ago

We discussed this internally and the behavior is about what we expect, but there are a few things you can change to get better results. 1) Try moving the directional light in the scene so that it's more at an angle, and not straight down. 2) Consider adding a sky light so that you have a more natural "ambient" term.