dilevin / computer-graphics-final-image-competition

1 stars 1 forks source link

Use of objects in A8 and stl #13

Open amirhmk opened 4 years ago

amirhmk commented 4 years ago

I have an object that I want to use in A8, it's made in Blender and I have tried exporting it to .obj file and using it, but I get this error:

sparse ../data/flamingo.json
Failed to cast F to matrix: min (3) != max (8)
Error: Failed to read ../data/flamingo_triangulated.obj
Error: Failed to load ../data/flamingo.json

I have also tried exporting this file to stl for A3 use case, but I can't seem to apply any colour to the object?

My final goal is animate + mass-spring in the scene. I've got the rigs too

darren-moore commented 4 years ago

I think the issue arises on this line in readOBJ . It seems like libigl wants faces to have a consistent degree e.g. only triangles or only quads. Try triangulating your faces in Blender, or setting a breakpoint on a simpler model to see exactly where the problem face is.

darren-moore commented 4 years ago

Or, see in here, there's a suggestion to use the read_triangle_mesh function. This might help convert automatically. I'm not sure.