Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAE import with blend shapes is broken #12618

Closed
MartiniMoe opened this issue Nov 3, 2017 · 8 comments
Closed

DAE import with blend shapes is broken #12618

MartiniMoe opened this issue Nov 3, 2017 · 8 comments

Comments

@MartiniMoe
Copy link

Arch Linux, Godot 3 Alpha 2

When importing a DAE with blend shapes the mesh is not visible.
In Alpha 1 the same DAE can be imported succesfully and blend shapes work!

I attached a zip with the DAE file and the material for the mesh.

stage-floor.zip

@Jubjub
Copy link

Jubjub commented Nov 4, 2017

I'm having the same problem, a workaround seems to be to manually triangulate the mesh before exporting it.

@bojidar-bg bojidar-bg added this to the 3.0 milestone Nov 4, 2017
@akien-mga
Copy link
Member

Can you still reproduce it in the current master branch?

@Nutriz
Copy link
Contributor

Nutriz commented Jan 8, 2018

It's still reproductible with the current master.

According to the first line, workaround seems effectively to be to manually triangulate the mesh before exporting it."

Console :

WARNING: Collada::_parse_mesh_geometry: Primitive type "polygons" is not well supported (concave shapes may fail). To ensure that the geometry is properly imported, please re-export using "triangles" or "polylist".
     At: editor\collada\collada.cpp:1061
Warning, unreferenced material in geometry instance: id-trimat-8
ERROR: VisualServer::_surface_set_data: Condition ' array.size() != p_vertex_array_len ' is true. returned: ERR_INVALID_PARAMETER
   At: servers\visual_server.cpp:381
ERROR: Invalid blend shape array format for surface
   At: servers\visual_server.cpp:1002
ERROR: RasterizerStorageGLES3::mesh_surface_set_material: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3152
node: Scene Root
node: Cube
ERROR: RasterizerStorageGLES3::mesh_surface_set_material: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3152
node: AnimationPlayer
SAVING TO: res://.import/stage-floor.dae-86d1dc4caddbbbd1a015af151bf9a1a6.scn
ERROR: RasterizerStorageGLES3::mesh_surface_get_array: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3199
ERROR: RasterizerStorageGLES3::mesh_surface_get_array_len: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3182
ERROR: RasterizerStorageGLES3::mesh_surface_get_index_array: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3224
ERROR: RasterizerStorageGLES3::mesh_surface_get_array_index_len: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3190
ERROR: RasterizerStorageGLES3::mesh_surface_get_primitive_type: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3263
ERROR: RasterizerStorageGLES3::mesh_surface_get_format: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3254
ERROR: RasterizerStorageGLES3::mesh_surface_get_aabb: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3272
ERROR: RasterizerStorageGLES3::mesh_surface_get_skeleton_aabb: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3311
ERROR: RasterizerStorageGLES3::mesh_surface_get_blend_shapes: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3280
ERROR: RasterizerStorageGLES3::mesh_surface_get_array: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3199
ERROR: RasterizerStorageGLES3::mesh_surface_get_array_len: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3182
ERROR: RasterizerStorageGLES3::mesh_surface_get_index_array: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3224
ERROR: RasterizerStorageGLES3::mesh_surface_get_array_index_len: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3190
ERROR: RasterizerStorageGLES3::mesh_surface_get_primitive_type: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3263
ERROR: RasterizerStorageGLES3::mesh_surface_get_format: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3254
ERROR: RasterizerStorageGLES3::mesh_surface_get_aabb: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3272
ERROR: RasterizerStorageGLES3::mesh_surface_get_skeleton_aabb: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3311
ERROR: RasterizerStorageGLES3::mesh_surface_get_blend_shapes: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3280

@akien-mga akien-mga changed the title Blend Shapes broken in Alpha 2 DAE import with blend shapes is broken Jan 8, 2018
@akien-mga akien-mga modified the milestones: 3.0, 3.1 Jan 16, 2018
@akien-mga
Copy link
Member

Not critical for the upcoming 3.0 release, so moving to the next milestone. A fix can still be cherry-picked for 3.0.x maintenance releases once available in the master branch.

@garyo
Copy link
Contributor

garyo commented Mar 29, 2018

I just got this same error on a glTF import with recent godot:

ERROR: RasterizerStorageGLES3::mesh_surface_get_array_index_len: Index p_surface=0 out of size (mesh->surfaces.size()=0)
   At: drivers\gles3\rasterizer_storage_gles3.cpp:3190

Looking at the code there, I think if p_shape is 0 and there are no blend_values, it should just do nothing instead of giving an error, as in my XXX comment below:

void VisualServerScene::instance_set_blend_shape_weight(RID p_instance, int p_shape, float p_weight) {

	Instance *instance = instance_owner.get(p_instance);
	ERR_FAIL_COND(!instance);

	if (instance->update_item.in_list()) {
		_update_dirty_instance(instance);
	}

        // XXX: if (p_shape==0 && instance->blend_values.size() == 0) { return; }
	ERR_FAIL_INDEX(p_shape, instance->blend_values.size());
	instance->blend_values[p_shape] = p_weight;
}

There's no necessity to give an error in that case, IMHO.

@sxkod
Copy link

sxkod commented Apr 3, 2018

I have the same problem. If I delete the shape-keys and reimport, that works. Hope this gets a fix soon. Thanks

@bahelit
Copy link

bahelit commented Sep 20, 2018

Downloaded a model from blendswap and exported it with better collada, it appeared different in godot then in blender. After some googling about an import error in the godot console came across a thread that mentioned normalizing the model manually before exporting.

Pressed Control+T to manually normalize the model. There where a couple modifications that needed to be made to the model afterwards but it resolved the issue of the model looking different in godot.

@reduz
Copy link
Member

reduz commented Nov 9, 2018

Actually, I remember forcing triangulation in the DAE exporter when blend shapes were used because otherwise this is impossible to do. This is probably an issue with BetterCollada, not Godot and should be opened there (as in, Force triangulation of meshes that use blend shapes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants