godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.47k stars 21.07k forks source link

[Duplicate] https://github.com/godotengine/godot/issues/77107 #77097

Closed tavurth closed 1 year ago

tavurth commented 1 year ago

Godot version

v4.0.2.stable.official [7a0977ce2]

System information

Mac

Issue description

Attempting to place an imported GLTF file as part of a gridmap does not work

Steps to reproduce

  1. test-gridmap.zip
  2. Try to place both types of tiles

MeshInstance3D works, "cube" does not work.

Minimal reproduction project

Please see above

smix8 commented 1 year ago

Because you imported your "cube" material with both vertex colors as well as alpha scissor transparency enabled.

The mesh has no vertex colors. The MultiMesh that renders your GridMap meshes therefor has to fall back on the default rendering vertex color which is black. Black makes the alpha scissor transparency cull everything.

tavurth commented 1 year ago

Aha I see, so it's more a question of missing vertex colors?

This is certainly something confusing and which should either be documented, or missing vertex colors should be set to Color.WHITE by default?

The cube shows up fine in the editor for me, just when trying to place it nothing appears.

tavurth commented 1 year ago

So using this test cube exported from the same program, everything works fine.

Test.zip

Seems the program does not assign a vertex color when exporting with textures?

Strange to me most of all that Godot displays it well in the editor but does not actually place anything visible when clicking.

tavurth commented 1 year ago
Screenshot 2023-05-16 at 01 09 06

What's really weird is that my meshes display just fine as actual meshes in Godot ^

It's the MultiMeshInstance causing the vertex colour issue I guess.

tavurth commented 1 year ago

@smix8 this appears to be a multimesh instance issue 😞

https://github.com/godotengine/godot/issues/77107

Calinou commented 1 year ago

This sounds like a bug, as vertex colors should definitely not be transparent black by default. They should be opaque white like they are when rendering regular meshes.

Either way, this is a duplicate of https://github.com/godotengine/godot/issues/77031.