Hello guys,
I've added directional light, environment file also looks good but some ares are darken.
Also the problem only happens in mobile(Android).
Hello guys,
I've added directional light, environment file also looks good but some ares are darken.
Also the problem only happens in mobile(Android).
Make sure you've got a WorldEnvironment node in the scene?
Is the scene really large? I see the max distance on your light is 100. This would be 100 meters in real life. However, if you have placed your objects at the incorrect scale, this may be an issue. You can either scale your objects down so 1 unit is 1 meter, or increase the distance on the light. However, if your scale is wildly off, this can affect other things like the physics engine and cause problems floating point inaccuracy, so it is advised you keep a consistent scale. Though the exact units are arbitrary, using 1 unit to 1 meter is a good idea.
Also, mobile uses vertex lighting by default, while desktop uses pixel lighting. Vertex lighting is cheaper, but not as realistic, and can cause lighting issues as you see when the meshes don't have enough geometry or are too large in relation to the light sources. While you can enable pixel lighting on mobile, it can be too slow so it's not a great idea (though this should be the first thing you try as a test to see if that is the issue). A better solution would be to subdivide the floor in Blender so it has more polygons. Probably 10 x 10 divisions or 16 x 16 would be enough. Or you can enable sky lighting with the WorldEnvironment to either a procedural or panorama sky (and additionally add a small ambient light factor) which would hide the shadow in the distance.
Which Android device model are you running the game on?
Try disabling Force Vertex Shading.mobile in the Project Settings, then export the project to Android again. However, this has a performance cost, so I'd recommend enabling the option on desktop as well (by enabling Force Vertex Shading) and adjusting your materials accordingly.
@cybereality said: Is the scene really large? I see the max distance on your light is 100. This would be 100 meters in real life. However, if you have placed your objects at the incorrect scale, this may be an issue. You can either scale your objects down so 1 unit is 1 meter, or increase the distance on the light. However, if your scale is wildly off, this can affect other things like the physics engine and cause problems floating point inaccuracy, so it is advised you keep a consistent scale. Though the exact units are arbitrary, using 1 unit to 1 meter is a good idea.
Also, mobile uses vertex lighting by default, while desktop uses pixel lighting. Vertex lighting is cheaper, but not as realistic, and can cause lighting issues as you see when the meshes don't have enough geometry or are too large in relation to the light sources. While you can enable pixel lighting on mobile, it can be too slow so it's not a great idea (though this should be the first thing you try as a test to see if that is the issue). A better solution would be to subdivide the floor in Blender so it has more polygons. Probably 10 x 10 divisions or 16 x 16 would be enough. Or you can enable sky lighting with the WorldEnvironment to either a procedural or panorama sky (and additionally add a small ambient light factor) which would hide the shadow in the distance.
I've tried every single solution but nothing works.