Closed wangmiaowei closed 1 year ago
Well, I now this reason. Your mesh does not provide the material file. But when I use my mesh with mtl file, then another error happens:
I do not run into this issue when running with max_planck.obj
. A material file is not necessary to run our code. The error is saying that the mesh has no texture coordinates -- I am not sure how this is possible since this line of code computes a trivial parameterization for any mesh which does not have texture coordinates. Can you share your config file and command that you are running?
For the second error, this could be a variety of issues -- for example, the Neural Jacobian Fields code does not work for meshes that have more than one connected component. I can take a look if you share your mesh file.
Thanks for your help. For the first question, I modified that code line(version) to be adapted to my machine. There is a bug here and looks good now. For the second question, I upload my test mesh(.zip) here. From your current expression, it seems a converting tool to your requirement is necessary if want to have a broad application. musk_mesh.zip
I took a look at your mesh, first there seems to be a box surrounding the face. Aside from that, the mesh consists of nearly 2000 connected components. While our code can be extended to multiple connected components (you may parameterize each mesh with Jacobians and also learn a global translation for each shape to position them), it was not written to handle this case, where the thousands of components are intended to be one single object. One suggestion is to try to merge the components and re-mesh in blender.
Any idea how to convert the object?
my conversion script doesn't work:
import bpy
# Load the .obj file
bpy.ops.import_scene.obj(filepath="input.obj")
bpy.ops.object.select_all(action='SELECT')
# Get the active object
obj = bpy.context.selected_objects[0]
# Merge components
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.remove_doubles()
bpy.ops.object.mode_set(mode='OBJECT')
# Re-mesh
bpy.ops.object.modifier_add(type='REMESH')
bpy.context.object.modifiers["Remesh"].octree_depth = 6
bpy.ops.object.modifier_apply(modifier="Remesh")
# Export the new .obj file
bpy.ops.export_scene.obj(filepath="output.obj", use_selection=True)
I do not know whether you meet this problem when replacing shape with max_planck.obj in the YAML file.