Light bleeding with imported FBX

Hello!
I am currently working using URP for the first time, on Unity 2020.3.16f1, URP 10.6.0

Multiple of our meshes are affected by light bleeding, but the behaviour of it puzzles me, and I can’t figure out how to fix it.

Below is a gif of our mesh’s lighting, and an Unity cube that isn’t affected by the bleeding.

Removing shadow cascades seems to fix the issue fully, but we intend to use this feature for higher quality rendering.

Changing Directional light’s near plane to a high value seems to help, but considering we don’t understand the issue to begin with, we fear that it comes back later with much bigger meshes.

Switching back to Built-In removes the issue completely.

7609666--945208--Animation2.gif

What we’ve tried, without any changes in the issue :

  • Setting the mesh’s UVs
  • Changing the material’s shader
  • Switching to Unity 2021.2.0, URP 12.0
  • Importing the mesh in a new URP project
  • Importing the mesh in the viking village
  • Importing and exporting the FBX file in another software (the mesh is from 3DS Max, we reimport/reexported using Blender)
  • Changing the ground to use a unity primitive
  • Setting all the meshes to use the default Lit material

If you have a solution, or, even better, an explanation for how this is happening, and what is wrong with the mesh (again, Unity’s primitives are completely unaffected), I would be very thankful.

1 Like

Looks like wrong face orientation on the mesh. Try switching to double-sided in the Lighting Properties of the mesh, to see if it fixes:

7617295--946888--upload_2021-10-31_13-5-44.png

If it does then some of the faces in your mesh are oriented backwards and you need to fix it in the software.

1 Like

Just in case check the object import settings and try to use Mesh Compression “Off”.

Thank you for your suggestions !

Two sided shadows
@sergiusz308
We’ve tried it already, but just to be sure I tried again.
7621894--947914--Animation2.gif
This GIF shows the result with ALL the mesh renderers of the scene set to two-sided.
Then, the difference between two-sided and only front-faced shadows.
Note that the outside of the blue wall does have a full face that should cast shadows.
(Also, the shader is “Universal Renderer Pipeline/Lit”, we didn’t change this part. Setting all the meshes to use the default material has the same result)

Mesh Compression and Optimization off
@Kadae
I forgot to mention that we’ve done this, mesh optimization and compression are off.

Neither solution seem to fix the issue

@VincentPaquin Well, this is all strange. In this case I’d recommend create a blank, new URP project, with the default scene, import your model there and see how it renders there.

Thank you @sergiusz308
Unfortunately, we’ve tried this already as well, to no avail. I’ve personally tried modeling a similar model in a different program, the same issue appeared.
But when it’s a less complex model, such as simply a wall, the shading works.

It might be due to the shape being concave?

Never bumped over this - the only problem with shadowing on meshes I ever experienced was realated to wrong face orientation. But hey, this is Unity, everthing is possible…

Try to report this as a bug with a starter project, your settings and a mesh.

You can always post your mesh file here (if you can of corse) - I can take a look at it, maybe I’d spot something.

Thank you for sticking to this thread.
You’re right, I should’ve done a bug report much sooner !

I’ll do a bug report with a starter project with the latest LTS version of Unity, as I said, it’s easy for me to reproduce it.

For now, here’s the mesh, in FBX and blend form

7657387–955429–Mesh.zip (88.6 KB)

And bug has been reported in 2020.3.22f1, I’ll keep this thread updated as/if the subject moves on.

@VincentPaquin ok, so I checked the mesh - it’s not the piece from your screenshots, is this intentional?

There’s nothing odd about it in the blender and it casts correct shadows in URP 12 as well:

7661266--956125--upload_2021-11-16_12-28-58.png

So not sure if this is was a problematic part or not, but it looks legit

Hello, and thank you for checking!
I don’t think the case is fully reproduced. you’ve been doing all the efforts and I keep forgetting things it seems; So instead, here’s a complete reproduction project, the one I sent in the Bug Report. Just press play in the scene and the issue SHOULD reoccur.

I think what is missing is :

  • Scale up the object (so that someone could fit in it, for instance? Sorry I Should’ve mentioned the scale of the FBX) either in the scene or even directly in the FBX Importer
  • make sure you use, and see, shadow cascades

7664962–956902–Crash reproduction.unitypackage (122 KB)

Update :
Unity has checked my bug report and has been able to reproduce it in multiple URP/Unity versions
they opened an issue on issue tracker :

1 Like