Giter VIP home page Giter VIP logo

Comments (14)

zhan-xu avatar zhan-xu commented on August 13, 2024

could you send the model to me? [email protected]
seems to me your model is not centered or normallized. i will try on my side.

Update: I have added the normalization in the quick_start.py. Could you try? Just use the default parameters (bandwidth=None, threshold=1e-5). Still, it would be interesting if I can also try your model on my side.Thanks.

from rignet.

oneshotyj avatar oneshotyj commented on August 13, 2024

Thanks for your quick response . It's fixed by your new code and I have sent the model files to you , too.
图片

from rignet.

oneshotyj avatar oneshotyj commented on August 13, 2024

sorry , just found run out of memory issue to move forward by your new code and here is log.
( Configuration of my laptop is 16GB DRAM + GTX1060 6GB +Win10 )

loading all networks...
joint prediction network loaded.
root prediction network loaded.
connection prediction network loaded.
skinning prediction network loaded.
creating data for model ID 2222
gathering topological edges.
calculating surface geodesic matrix.
surface geodesic calculation: 10.093571186065674 seconds
gathering geodesic edges.
predicting joints
predicting connectivity
predicting skinning
calculating volumetric geodesic distance from vertices to bone. This step takes some time...
Traceback (most recent call last):
File "quick_start.py", line 422, in
mesh_filename.replace("_remesh.obj", "_normalized.obj"))
File "quick_start.py", line 265, in predict_skinning
geo_dist = calc_geodesic_matrix(bones, mesh_v, surface_geodesic, mesh_filename)
File "quick_start.py", line 220, in calc_geodesic_matrix
pts_bone_visibility = calc_pts2bone_visible_mat(mesh_trimesh, origins, ends)
File "F:\AI-PHOTO\RigNet\geometric_proc\compute_volumetric_geodesic.py", line 64, in calc_pts2bone_visible_mat
locations, index_ray, index_tri = RayMeshIntersector.intersects_location(origins, ray_dir + 1e-15)
File "D:\ANCD3\envs\py37torch13\lib\site-packages\trimesh\ray\ray_triangle.py", line 107, in intersects_location
**kwargs)
File "D:\ANCD3\envs\py37torch13\lib\site-packages\trimesh\ray\ray_triangle.py", line 66, in intersects_id
triangles_normal=self.mesh.face_normals)
File "D:\ANCD3\envs\py37torch13\lib\site-packages\trimesh\ray\ray_triangle.py", line 227, in ray_triangle_id
line_directions=line_directions)
File "D:\ANCD3\envs\py37torch13\lib\site-packages\trimesh\intersections.py", line 385, in planes_lines
projection_ori = util.diagonal_dot(origin_vectors, plane_normals)
File "D:\ANCD3\envs\py37torch13\lib\site-packages\trimesh\util.py", line 638, in diagonal_dot
return np.dot(a * b, [1.0] * a.shape[1])
MemoryError: Unable to allocate array with shape (100365736, 3) and data type float64

from rignet.

zhan-xu avatar zhan-xu commented on August 13, 2024

Yeah, the calculation of ray-surface intersection cost much time and memory and should be optimized somehow.. For now I suggest you further decimate the mesh with fewer faces (the intersection is calculated in ray-triangle pairs). btw, I haven't got your model. Maybe I can take a look at the face and vertex number of it?

from rignet.

zhan-xu avatar zhan-xu commented on August 13, 2024

Hi, thanks for sending me your model for debugging. I just updated the code. On line 280 of quick_start.py, now "calc_geodesic_matrix" takes an extra parameter "subsampling". By default it is False. If you set it as True, the function will subsample the vertices of the model, calculate intersections, and then upsample the results back to original vertices. As I tested, now it takes at most 9-10 G memory.

There is one more problem with your model. The original mesh has multiple groups, which make the skinning transfer from the remeshed model to the original model incorrect. Currently the algorithm only supports models with a single geometry group. A more robust OBJ parser, as well as rig format are needed to support skinning transfer to models with multiple geometry groups. I will update the code if I have time to figure this out.

from rignet.

oneshotyj avatar oneshotyj commented on August 13, 2024

The out of memory issue be fixed after set subsampling to True.Hope you can fix the multiple geometry groups issue someday when you have time , thanks.

from rignet.

potie1013 avatar potie1013 commented on August 13, 2024

Hello,I reused the 17872.obj,and the output 17872.fbx‘s performance was basically in line with reality,then I reused the 13.obj which you provided as input, and the output 13.fbx file just include three joints,also I tried 4270.obj 4347.obj 4518.obj,All of the output .fbx files were more or less problematic in the calculation of joint points and weights,Is there something wrong?

from rignet.

zhan-xu avatar zhan-xu commented on August 13, 2024

did you try other provided examples in the quick_start folder? Does it only work for 17872, or basically work for all provided examples, but not other test models?

from rignet.

potie1013 avatar potie1013 commented on August 13, 2024

from rignet.

potie1013 avatar potie1013 commented on August 13, 2024

from rignet.

zhan-xu avatar zhan-xu commented on August 13, 2024

I see. You can set bandwidth to None and threshold to 1e-5, which are the default parameters. However it doesn't guarantee to work for every test model. One way is to tune the bandwidth and threshold for each test model, but it will require some manual work. Also, due to randomness, different runs sometimes get slightly different results.

from rignet.

potie1013 avatar potie1013 commented on August 13, 2024

from rignet.

ibtehajali67 avatar ibtehajali67 commented on August 13, 2024

can you please tell me how you generate *_rig.txt file for own model

from rignet.

zhan-xu avatar zhan-xu commented on August 13, 2024

Hi the way to get *-rig.txt from .fbx or .dae is bit dirty. You can refer to #38 (comment)

We use a mix of different ways to parse original data, where maya seems more reliable. But you need some scripting to deal with mesh with multiple geometry group.

from rignet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.