Open setzer22 opened 4 years ago
Does this occur if you check Triangulate Faces in the Blender exporter's export dialog? In general, it's better to make the 3D DCC triangulate the mesh when exporting rather than letting the game engine do it automatically.
Alternatively, you can add a Triangulate modifier and check Apply Modifiers in the export dialog. This lets you preview the triangulation interactively.
@Calinou I've tried both: Triangulating as an export option, and manually triangulating using the blender tool. Things look slightly differently when triangulating, but they all look wrong. In fact, the pictures I uploaded already show the model triangulated in blender (in this case, using the export option, but I tried both and it's the same). Here's a picture showing the same model imported without triangulating:
EDIT: Changed the picture for one where the lighting was more similar to the previous screenshots.
On a Mac it's even worse, imported models have fully inverted normals. Screenshot below shows import from SketchFab next to a CSGBox to show the issue
@ee0pdt Can you link to the model in question, please?
@Calinou I have same problem
Look at pockets, they have wrong normals, but in editor they're fine
Ok so I think it's another bug coming form that bug. After I import into godot I save mesh as .tscn scene. The problem is that after I save it over existing old tscn it somehow doesnt save new mesh but uses old mesh. Even if I delete tscn and save it. My fix was to save it as cargo_pants_v2.tscn
Godot version: Godot Engine v3.2.1.stable.official
OS/device including version: Arch Linux (rolling release, last updated at the time of submitting).
Issue description: I have a 3d model (included below) created in blender. When I export this as an obj mesh, it works fine in godot. However, when exporting in any other format, Godot will show a very strange shading that looks like incorrect normals. See the pictures below for a comparison.
I first reported the issue in the forums and was recommended to report it here on GitHub: https://godotforums.org/discussion/22889/mesh-normals-imported-from-blender-look-wrong-with-every-export-type-except-obj#latest
This is the model imported as an obj mesh. The shading is correct:
This is how the model looks when importing it in any other format (tested: gltf2, dae, dae using the better collada plugin and fbx).
This shows (on blender) how the normals are set up. Everything looks normal there (yes, pun very much intended :sweat_smile:).
As recommended by users in the forums, the attached screenshots in Godot were taken with a very bare-bones environment: No sky, just clear color. White ambient light, and a single directional light shown on the picture to pinpoint the issue.
Steps to reproduce:
Minimal reproduction project:
FenceMeshIssue.zip