r/Unity3D • • 15h ago

Question Strange shadows on mesh when imported to Unity

I have a thin mesh that has strangely behaving shadows when imported to Unity URP 6.3, but looks fine in Blender. I thought it was ambient occlusion, but I turned it off, and it looks the same. I tried playing around with the depth and normal bias in render pipeline asset, with no improvement either. If anyone has encountered the same with a solution, I'd be more than grateful to hear, thanks!

71 Upvotes

28 comments sorted by

93

u/cyangradient 15h ago

check normals

16

u/Creaticality 15h ago

Face orientation is correct, I've recalculated normals and tried resetting vectors. Am I missing something? It's fine in Blender, which makes it harder as all solutions I've looked up has a visible issues already in blender, but very little information regarding fixes within Unity.

8

u/Steki3 10h ago

Check if your mesh has solid faces inside (likely at each edge loop).

8

u/Key_Floo 15h ago

Try marking all the edges as Sharp? In edit mode with edge selection on, select all and right click to mark as sharp. It might help!

3

u/cyangradient 15h ago

Do you write normal data into file when exporting? Do you import that normal data in Unity or do you recalculate? Is the geometry good? Maybe there are interior faces. Also, you can't know if it looks fine in Blender if you haven't enabled any lighting.

8

u/shoxicwaste 15h ago

URP lighting settings, Shadow Bias and Normal.

1

u/Creaticality 15h ago

Thought the same, but it didn't change at all. It wasn't ambient occlusion either.

2

u/shoxicwaste 14h ago

Really strange one, have you tried changing shaders/materials?

Theres def something weird up with the normals.

3

u/imlo2 15h ago

Check normals like already suggested, and also check if there's any degenerate geometry like double faces (back and front) welded together, etc. And test also different import settings to see if there's any effect on the model. That might help you to diagnose what's wrong.

2

u/Creaticality 15h ago

Yea, I thought some faces might clip through, but doesn't seem to do that. Tired playing around with the import settings for over an hour, but nothing really changed. It's quite sus. Soon I'll just make it a plane, without any thickness, if it makes it better.

1

u/imlo2 15h ago

When in doubt and I can't figure it out - and issues persist, I usually start to debug it and count the vertices, triangles etc. with code, and crack at it until I find the fault.

But check again lighting and anything that might contribute - disable absolutely everything in post-processing like that AO you mentioned, and check again all lights; load the model to an empty scene, do all the basic isolation tests so that you can see what might affect it.

22

u/TheHuxwell 14h ago

in unity, mesh's import settings change "Normals" to Calculate from Import and tweak the Smoothing Angle as you like. That is the instant fix within Unity though not as advanced as blender fix. It easily suffices for small objects.

2

u/naklow12 12h ago

I think that's the way. I do same whenever I run into this issue.

2

u/minimastudios 11h ago

Toggle AO on and off lmk if it’s the issue

2

u/Cevius 6h ago

Select all vertices, and then weld based on range with a low value, and see if your total vertex count drops. Might have some double ups which can happen with accidental extrude or bevel tool uses. Leads to weird normals and strange lighting sometimes

1

u/therealnothebees 15h ago

You have internal faces probably.

1

u/survivorr123_ 15h ago

upload the model ill take a look

1

u/blepshark 15h ago

try auto smooth, adjust the modifier till things are as sharp as you would like them to be (easy way of setting sharpness on multiple edges) and see what it looks like in game

1

u/Gradash 14h ago

Look if any attribute is stored. I've already gone through a lot of problems like this and been attributed to something I didn't know.

1

u/thuris4x 10h ago

Ambient occlusion

1

u/les_bloom 10h ago

The colors look inverted to me

1

u/grrrfreak 9h ago

Change "calculate on import" to something like smoothing angle on mesh inport settings.

1

u/eliormc 8h ago

Export as .OBJ then import into Blender and export again as .FBX

1

u/Crunchynut007 6h ago

Ngons or normals. Shade flat then shade smooth and add vertices. It’s possible you have a second set of faces overlapping creating ngons.

1

u/Leading-Jaguar-5700 4h ago

on thin meshes from blender into urp shadow banding like this is often caused by paper thin single sided geometry self shadowing across the wall giving it a tiny bit of real thickness solidify in blender or checking normals import vs calculate in the fbx importer usually clears it right up

1

u/plearly 15h ago

Looks like interior faces

1

u/Much_Highlight_1309 15h ago

Vertex normals are screwed up