Repository: godot
Issue: ArrayMeshes converted from Godot 3.x display incorrectly in 4.0
Labels: bug,confirmed,topic:import,regression,topic:3d

### Godot version

4.0alpha 12-15

### System information

Win 10/64 NVIDIA GeForce GTX 1060/PCIe/SSE2

### Issue description

I've converted over a thousand meshes to GD4 for my game. Countless objects respond to light as if their faces have inverted normals. However, that isn't the case as demonstrated by exporting from Godot and viewing in blender. There's nothing wrong with the normalmap. Inverting it does not help.

~~Maybe 50%~~ 100% of them are messed up! Hundreds of assets. They previously looked the same as all the other pieces in GD3. I have assets from the same asset pack, the same artist, that were imported using the same version of Godot, through the same process, around the same time, and even using the same material, yet some pieces from the pack are messed up and others are fine. 

I also have other objects that flicker and invert depending on camera angle, though it's the same wood material that everything in the village uses. I'm still testing this. It may be another issue.

We imported our meshes with the default settings in GD3 and saved them in Godot's native arraymesh format in tscn files so git isn't overwhelmed by minor updates on binary files. They were converted to GD4 using aaronfranke's script https://gist.github.com/aaronfranke/79b424226475d277d0035b7835b09c5f, which basically just renames poolarray to packedarray and some other renames. The array data should have remained the same until modified by Godot.

The only way I've found to fix this so far is to reimport from the original fbx/glb. But we're talking over 1000 assets need to be audited, hundreds of assets that need to be reexported from our source again, processed through blender, reimported into Godot, then setup in our complex master scenes (eg static bodies, collision shapes, custom materials, LOD, and other scripts). That's several weeks of work if not a couple months. 

Examples:

## Foot bridge
Here's a bridge with an empty standard material, albedo at 50V. You can see the sun is at X=-30 and the bridge is lit up normally. 

![image](https://user-images.githubusercontent.com/632766/181307267-55cf156b-604b-4be9-abc0-7769f93f3114.png)

Now the sun is at X=-150 (30 degrees off of 0). The top of the bridge should be lit up exactly the same as above. Look at the sphere and the ground.

![image](https://user-images.githubusercontent.com/632766/181307571-4e651731-1bee-456d-a14a-b8153e8c1330.png)

I have to rotate it this far (-120 or 50 degrees off 0) to get the top of the bridge to light up when the rotation is on that side.
![image](https://user-images.githubusercontent.com/632766/181307802-dd9f364c-9124-4a7a-81fa-b0d3800c2c98.png)

In addition to this strange light angle needed for normal light, the light changes depending on camera angle. It reminds me of this issue #58592 as the brightness of materials shifts a bit when I move the camera around, though it is much more subtle than that issue.


## Beams

These two objects are using the exact same material. You can see the light wood on the top faces of the left beam. But the side faces are all dark. They should be as light a the right piece. They are from the same asset pack and were imported the same way.

![image](https://user-images.githubusercontent.com/632766/181312721-229b38db-706b-4e08-89b1-26d4be13001b.png)

Standard white material

![image](https://user-images.githubusercontent.com/632766/181312916-798a854e-798b-4692-aae5-4015765e43ca.png)


Exporting the beams from Godot to blender, the colors look messed up there too. However, the normals point outside. If I recalculate normals, it messes up the mesh even worse. The faces are likely separate.

![image](https://user-images.githubusercontent.com/632766/181318651-0064fc7d-9b19-4ed0-9982-e32aa86ebefe.png)

If I bring in the original asset into Godot 4, it looks completely fine. So it appears Godot 4 messed up the arraymesh, requiring reimporting the asset to fix it. 


### Minimal reproduction project

[test_gd4_mesh.zip](https://github.com/godotengine/godot/files/9229354/test_gd4_mesh.zip)
(Updated 8/1)