@Nitwel brought up on Discord that OpenXRFbSpatialEntity.create_mesh_instance() for the global scene mesh won't have normals or tangents and hence can't be correctly lit.
Since developers can access the raw data we get from the API via OpenXRFbSpatialEntity.get_triangle_mesh(), I think doing this extra bit of processing in create_mesh_instance() makes sense.
(I had thought this would maybe allow us to remove the "deindexing" that we're doing in scene_global_mesh.gd, because SurfaceTool has to deindex the mesh in order to generate the normals, however, it will automatically re-index it afterwards. I had considered purposefully deindexing it, but that increases the size of the mesh data by a lot, and I don't know if most folks will end up needing that anyway. So, I just stuck with what we previously had in scene_global_mesh.gd for now.)
@Nitwel brought up on Discord that
OpenXRFbSpatialEntity.create_mesh_instance()
for the global scene mesh won't have normals or tangents and hence can't be correctly lit.Since developers can access the raw data we get from the API via
OpenXRFbSpatialEntity.get_triangle_mesh()
, I think doing this extra bit of processing increate_mesh_instance()
makes sense.(I had thought this would maybe allow us to remove the "deindexing" that we're doing in
scene_global_mesh.gd
, becauseSurfaceTool
has to deindex the mesh in order to generate the normals, however, it will automatically re-index it afterwards. I had considered purposefully deindexing it, but that increases the size of the mesh data by a lot, and I don't know if most folks will end up needing that anyway. So, I just stuck with what we previously had inscene_global_mesh.gd
for now.)