[Solved] Importing meshes have flipped shading even when normals are facing correctly

Recently I’ve started using MeshParts a lot. Up until now have I started noticing a very irritating bug which I have no (anyone with expertise on 3D modeling, please show me a solution if it’s something on my end) control over upon importing in ROBLOX Studio. So in Blender I have this mesh:

Notice that the normals of the mesh in the viewport are flipped accordingly with Backface Culling enabled. However when I import said mesh into studio:

I get the impression that my normals are flipped wrong, however in Blender they’re correctly faced. Not only is this part of the bug, but when I flip the normals of the mesh in Blender to be facing the opposite (inside) I get this shading problem:

Now normally the top should be more brighter or the same brightness as other parts around the area, but this isn’t the case. This is all the details of the bug I have right now, I clearly have no solution to this problem nor do I have a repo to how I got this behavior whilst making the mesh in Blender.

Supplied mesh and MeshPart as seen in the exhibits:

BuggedMesh.fbx (17.2 KB)

BuggedMeshPart.rbxm (5.4 KB)

1 Like

Possible fixes:

  • Edit mode > Select all faces > Ctrl+n

  • Edit mode > Select all faces > Shift + D > Right click > W > Invert normals

1 Like

I’ve tried those solutions, but while that fixes the facing problem, I still have the shading issue which is what I’m mainly reporting. Here’s another example:

The bottom of the mesh is lighter than the top and the upper part of its inside is oddly brighter.

What’s on top and sides:

Extremely evident here; the bottom inside and the very top is abnormally dark. It seems to be darker as it gets closer to the baseplate and lighter as it moves away.

You helped me with this before :stuck_out_tongue:

This is what I get when I import to blender. This is with Backface culling on. I see the same when I import to Studio. I don’t know blender super well, but possibly things are getting flipped on export?

It could be something with how .fbx files are structured or how studio imports meshes. But I can assure that 90% of the time what I see with Blender’s Backface Culling feature is what I see when I import meshes into ROBLOX. However in some situations it doesn’t behave that way. I may try exporting with a different 3D modeling program and see how that goes.

EDIT: Behavior is still the same when exporting .fbx format with 3ds Max and other programs, it must be either the file itself or studio importing. Which ever, this needs addressing since it’s quite annoying to deal with and makes my meshes and possibly other people’s meshes look very mismatched and odd compared to surrounding objects.

I found the solution! Turns out it was related to how .fbx exports. The mesh was too small in scale (i.e. all scale axis were negative). Sizing the model’s faces and clearing rotation, scale fixed the problem.

Source:

10 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.