pKrime / brignet

Automatic rigging using neural network from RigNet
GNU General Public License v3.0
407 stars 39 forks source link

Help with brignet code changes #13

Closed Tigran1983 closed 2 years ago

Tigran1983 commented 3 years ago

Hello dear brignet author. I couldn't find your name. I have some questions. Imagine I trained Zhan-Xu's Rignet without skin prediction (only rig prediction), so I want to integrate this Rignet into your brignet plugin. I tried to make changes in your codes, excluding all codes, related skinning, but couldn't get any working copy.

Please help me, let me know what parts of your code I have to change to get brignet work in blender to predict only Rig?

Thanks in advance, Best Regards, Tigran

pKrime commented 3 years ago

Hi,

I'm about to publish a new version of this addon, you can find most of the changes in the branch "low_deps".

Please check the file brignet.py from the new branch, you will see that the prediction happens inside a modal iteration of the script, with a conditional for each of the steps.

I haven't tried yet as it was not among the goals, but the place where to look is the modal method of the operator BrigNetPredict: you should comment the content out or put an additional condition to the statement

elif self.current_step == PredictSteps.Predicting_Weights:

then you should do the same where the objects.copy_weights function is invoked.

I'll see if I can make this an option in the next version

Kind regards, Paolo

Tigran1983 commented 2 years ago

Hello dear Paolo,

Till now I was trying to make changes in your codes, but during discussion with Zhan-Xu he said that the easiest way to check my approach (predict only rig, not skin) is to put my checkpoints into working version of brignet. In this case he assume that we will see predicted rig. I tried to download new latest version of brignet, put checkpoints into it but cannot run "predict joints and skinning". It's active, but I am getting an error "Some modules not found, please check brignet preferences". I filled rignet environment path to brignet preferences, but got he same error, and no any other info about issue. Please, if it possible, check is all correct and problem is in my environment and blender, or there are other issues?

You can get my checkpoints are: https://drive.google.com/file/d/1utaAK8e6r7PFtF-NcJVKLjd_qpZVUwD2/view?usp=sharing

There is no checkpoint of skin_prediction network. You can left one of your "skinnet" checkpoints.

Thanks and Regards, Tigran

pKrime commented 2 years ago

Hello Tigran,

I have tried your checkpoints and they work: whatever problem arised, your model is not to blame.

I have published a new release, please check if it helps fixing your problem. I have added a setting to disable Weight predictions. When disabled, the skinning step is skipped altogether and a missing skinnet folder doesn't cause failure

Regards, Paolo

Tigran1983 commented 2 years ago

Hello dear Paolo,

Thank you for your work. I see your corresponding changes in low_deps branch. I am getting them and will try after reinstalling ubuntu (I think the reason is in damaged packages). After testing on my side I'll let you know.

Again many thanks for your work and support Paolo.

Best Regards, Tigran