Jump to content

Mesh Rigger (Skyrim, Fallout, Oblivion) Beta.89.f (10-26-2014)


Recommended Posts

Hi gerra6 - I'm now musing Mesh Rigger for all my work on "Remodeled Armor for Bodyslide and BBP" (Soon to be HDT).

 

I love the way it cleans .nifs - specifically 1) combining partitions of the same part leftover from Blender's silly export process and 2) removing extra unused name strings (which NifSkope can't do).

 

However, because the weight copy process isn't exact, there are certain parts that I still need to do in blender (breasts on tight fitting outfits, for instance).

 

What I'd like to know is if there is a way to get mesh rigger to *only* clean the .nif and not mess with or require any weight changes.

 

Thanks in advance,

Chrono

 

You must post a link to your project when completed. else i will hunt you down and shake my finger at you.

Link to comment

Okay so I'm a little lost. Might as well post here and see if anyone can clear things up for me, yeah?

 

I've got an armor mesh from Oblivion that I'm trying to work into a Skyrim mesh. I got your pose converter to handle the changing of the rest pose, but for the life of me I can't seem to get Mesh Rigger to re-rig it for Skyrim, so, IDK, I guess if anyone has any tips for what kind of template I need (I have Skyrim templates that include hand and foot meshes, the same ones I've been using with the clothing converter process) or which settings I need to have rigged, or... IDK. The armor I'm working on doesn't have multiple weights or anything so. I don't know if that's a factor either. :/

 

I dunno I might just give up and move on, it just felt like an interesting project.

 

On an unrelated note, I'm also having trouble getting it to copy skirt bones at the moment without distorting the target mesh, but it may be that copying from the tavern wench outfit is my only mistake there and I just need to find a better sample.

 

EDIT: Keeps giving me the following error:

 

Traceback (most recent call last):
  File "mesh_rigger.py", line 297, in <module>
    Main()
  File "mesh_rigger.py", line 276, in Main
    process_nif(test_file, bone_list)
  File "mesh_rigger.py", line 190, in process_nif
    save_file(target_nif, test_file, targets_found, current_settings)
  File "C:\Users\Jonathan\Desktop\Skyrim Meshes Working Directory\Mesh Rigger\kg
\file_util.py", line 169, in save_file
    target_mesh.save(file_name, current_settings, morph_dict = morph_dict, gende
r = gender, calc_normal = calc_normal, force_reskin = force_reskin)
  File "C:\Users\Jonathan\Desktop\Skyrim Meshes Working Directory\Mesh Rigger\kg
\file_util.py", line 1133, in save
    self.rebuildSkinInstance(gender = gender)
  File "C:\Users\Jonathan\Desktop\Skyrim Meshes Working Directory\Mesh Rigger\kg
\file_util.py", line 684, in rebuildSkinInstance
    other_child_list = [self.block_dict.get(child_name) for child_name in child_
list if child_name not in bone_dict and child_name in self.block_dict]
  File "C:\Users\Jonathan\Desktop\Skyrim Meshes Working Directory\Mesh Rigger\kg
\file_util.py", line 684, in <listcomp>
    other_child_list = [self.block_dict.get(child_name) for child_name in child_
list if child_name not in bone_dict and child_name in self.block_dict]
AttributeError: 'load_nif' object has no attribute 'block_dict'


C:\Users\Jonathan\Desktop\Skyrim Meshes Working Directory\Mesh Rigger>pause
Press any key to continue . . .

 

Link to comment

Honestly, converting existing nifs from one game to another is very much a WIP at the moment. A big issue is that the Skyrim nifs and Oblivion nifs are different versions with some basic incompatibilities in block structure.

 

One project that is temporarily on the back-burner is a tool that will automatically interconvert meshes from one version to another.

 

I've just finished core work on an overhaul of the back-end framework for my tools that should make everything a bit more robust and stable.

 

Once I get the next version of Mesh Rigger and Clothing Converter released, I'll take another look at the nif converter project.

Link to comment

here's error I get.

Building Vertex Dictionary
Traceback (most recent call last):
  File "mesh_rigger.py", line 297, in <module>
    Main()
  File "mesh_rigger.py", line 293, in Main
    process_nif(base_file, bone_list, morph_nif = morph_nif)
  File "mesh_rigger.py", line 159, in process_nif
    target_nif = load_nif(test_file, template = template_mesh, settings = curren
t_settings, skeleton = skeleton, morph_nif = morph_nif)
  File "g:\Games\Skyrim\Apps\Me Shrigger\Mesh Rigger b_46 Light\kg\file_util.py"
, line 456, in __init__
    self.initMeshes(init_mesh)
  File "g:\Games\Skyrim\Apps\Me Shrigger\Mesh Rigger b_46 Light\kg\file_util.py"
, line 1204, in initMeshes
    this_mesh = kg.mesh_util.mesh(self, geom, full_init = init_mesh, skel_root =
 r)
  File "g:\Games\Skyrim\Apps\Me Shrigger\Mesh Rigger b_46 Light\kg\mesh_util.py"
, line 81, in __init__
    self.main_dictionary = BuildVertexDictionary(self.getVerts(), res = 1000, wo
rld_loc = True)
  File "g:\Games\Skyrim\Apps\Me Shrigger\Mesh Rigger b_46 Light\kg\search_util.p
y", line 1230, in BuildVertexDictionary
    loc = this_vert.getLoc(world_loc = world_loc, search_loc = useSearchMod, fli
p_x_axis = flip_x_axis) * search_weight
  File "F:\Pythoncrap\Python33\lib\site-packages\pyffi\formats\nif\__init__.py",
 line 3772, in __mul__
    raise TypeError("do not know how to multiply Matrix44 with %s"%x.__class__)
TypeError: do not know how to multiply Matrix44 with <class 'pyffi.formats.nif.M
atrix33'>

using a new body I saw on Nexus that apparently isn't tbbp. Touched By Dibella

 

right before that is a list of "No Bones Found" that filled up my scrollback buffer.

Link to comment

Thanks for the bug report.

 

I ran into that one myself a couple of days ago while I was tearing apart the back-end. That issue should be resolved in the next revision of the tool, which I expect to post in the next day or two.

 

Testing so far is looking good. If all goes well, the updates to my base framework will allow the tools to properly compensate for all of the different crazy ways that meshes can be skinned.

Link to comment

Could you please give some pointers  where in the code to look for how the weight copy select target vertices?

 

In this example I copied weights from UNPB to UNPB (identical mesh, but different weights) using index copy.

Yes, vertex index is identical. But the result on the target differs quite a bit from the source:

 

post-46434-0-66495900-1398464110_thumb.jpg post-46434-0-40996900-1398464112_thumb.jpg

 

As mentioned in the other thread, I get similar results just running nifcleaner on that source mesh.

Could it be caused by too many bones per vertex?

 

Link to comment

That definitely shouldn't be happening.

 

Which version of Mesh Rigger is doing that? 0.81?

 

Would you be willing to send me the template and target nifs you were using when you got that. I'd like to see if I can replicate the issue, which should allow me to track it down and solve it.

 

Note: It's possible that this problem is resolved as part of the back-end overhaul leading to 0.85. I haven't yet finished fully testing the Mesh Rigger component of the update (I should have an update ready in a day or two), but it is included in the tool download here: http://www.loverslab.com/topic/27557-new-clothing-body-style-converter-release-candidate-v072-3-30-2014/?p=759661

Link to comment

OK. Now I see what's going on.

 

It's not so much a problem with the tool as a problem with vertices weighted with too many bones.

 

The basic problem is that a given vertex can be skinned with a maximum of 4 bones. Any more than that and the nif won't work...it will probably either crash the game or just generally act buggy.

 

So, when my tool normalizes the bone weights on a given vertex, it sorts them by relative weight. If the vertex is weighted by more than 4 bones, the excess boneweights are removed, starting with the lowest weight bone. The total of the weights on that vertex is then normalized to 1.

 

Now, if you enable 'delete rigging' (now renamed to 'Replace Bones') it will delete all weights on a given vertex and replace them with weights copied from the template nif. *However* if a vertex on the template nif is weighted by more than 4 bones, the excess boneweights will still be deleted.

 

So...how do you fix it?

 

That's a tricky question to answer, unfortunately.

 

Now, at one point I was toying with the idea of adding the ability to manually prioritize certain bones over others. Now, although the back-end coding of that wouldn't be too tough, creating some sort of UI to prioritize bones was looking like a big headache that would end up leaving end-users with a confusing mess.

 

One thing I can do that might help is to automatically prioritize bones that were selected in the bone selection menu.

Link to comment

Hi, I'm using your b_81 version and it almost works perfectly except one small problem... I'm trying to apply TBBP to a SFW UNP Skinny with no bounce using a SFW UNPB with TBBP as a template. The problem is it only looks right at 0 or 100 weight but nothing in between. I think someone posted a similar problem but I can't seem to find it right now. But this is an amazing tool for me as no one seems to have made a TBBP UNP Skinny body or Vanilla armor conversions, and I'm scratching my head as to why. If you can help me that would be so awesome.

Link to comment

Hi, I'm using your b_81 version and it almost works perfectly except one small problem... I'm trying to apply TBBP to a SFW UNP Skinny with no bounce using a SFW UNPB with TBBP as a template. The problem is it only looks right at 0 or 100 weight but nothing in between. I think someone posted a similar problem but I can't seem to find it right now. But this is an amazing tool for me as no one seems to have made a TBBP UNP Skinny body or Vanilla armor conversions, and I'm scratching my head as to why. If you can help me that would be so awesome.

 

You can build the body with Bodyslide UNP, but SFW only has BBP support so far.

Should be easy to update the SFW base mesh with TBBP/HDT.

 

Link to comment

It's not so much a problem with the tool as a problem with vertices weighted with too many bones.

 

The basic problem is that a given vertex can be skinned with a maximum of 4 bones. Any more than that and the nif won't work...it will probably either crash the game or just generally act buggy.

 

So, when my tool normalizes the bone weights on a given vertex, it sorts them by relative weight. If the vertex is weighted by more than 4 bones, the excess boneweights are removed, starting with the lowest weight bone. The total of the weights on that vertex is then normalized to 1.

 

So it was more than a hunch, should have known. It's the unfortunate 4-bone limit, which explains

why so many previous body reweights had vertex spikes in-game. And yet I thought it was a Blender

export bug. Now only need to learn how to limit bone influences in Blender, hmm...

Link to comment

Hi, I'm using your b_81 version and it almost works perfectly except one small problem... I'm trying to apply TBBP to a SFW UNP Skinny with no bounce using a SFW UNPB with TBBP as a template. The problem is it only looks right at 0 or 100 weight but nothing in between. I think someone posted a similar problem but I can't seem to find it right now. But this is an amazing tool for me as no one seems to have made a TBBP UNP Skinny body or Vanilla armor conversions, and I'm scratching my head as to why. If you can help me that would be so awesome.

The tool should be able to automatically generate the 0 and 100 weight meshes with no problems, however you do need to run the tool in a specific way to make sure that everything works properly.

 

1. For your template, select *either* the 100 weight (_1.nif) or 0 weight (_0.nif) mesh.

2. For your targets, select *both* the 100 weight and 0 weight nifs.

3. Set the other options as appropriate and click OK.

 

If the template nif ends with either a _0.nif or _1.nif and you select both a _0.nif and _1.nif nif for your target nifs, the tool should copy the weights to whichever nif matches the template type, and then automatically generate the second nif.

 

What generally won't work is running the tool twice, once to copy the _1 template to the _1 target, and then again to copy the _0 template to the _0 target. If you do that, you end up with _0 and _1 nifs with different skinning, which, as you've notices, doesn't work.

 

Please let me know if this solves your issue. If it doesn't, then we might be looking at a bug that I'll need to track down.

Link to comment

So it was more than a hunch, should have known. It's the unfortunate 4-bone limit, which explains

why so many previous body reweights had vertex spikes in-game. And yet I thought it was a Blender

export bug. Now only need to learn how to limit bone influences in Blender, hmm...

Yep.

 

I'll add the code to automatically prioritize selected bones in the next update.

Link to comment

 

Hi, I'm using your b_81 version and it almost works perfectly except one small problem... I'm trying to apply TBBP to a SFW UNP Skinny with no bounce using a SFW UNPB with TBBP as a template. The problem is it only looks right at 0 or 100 weight but nothing in between. I think someone posted a similar problem but I can't seem to find it right now. But this is an amazing tool for me as no one seems to have made a TBBP UNP Skinny body or Vanilla armor conversions, and I'm scratching my head as to why. If you can help me that would be so awesome.

The tool should be able to automatically generate the 0 and 100 weight meshes with no problems, however you do need to run the tool in a specific way to make sure that everything works properly.

 

1. For your template, select *either* the 100 weight (_1.nif) or 0 weight (_0.nif) mesh.

2. For your targets, select *both* the 100 weight and 0 weight nifs.

3. Set the other options as appropriate and click OK.

 

If the template nif ends with either a _0.nif or _1.nif and you select both a _0.nif and _1.nif nif for your target nifs, the tool should copy the weights to whichever nif matches the template type, and then automatically generate the second nif.

 

What generally won't work is running the tool twice, once to copy the _1 template to the _1 target, and then again to copy the _0 template to the _0 target. If you do that, you end up with _0 and _1 nifs with different skinning, which, as you've notices, doesn't work.

 

Please let me know if this solves your issue. If it doesn't, then we might be looking at a bug that I'll need to track down.

 

 

Everything works perfectly now! I never would've thought of that, thanks!

Link to comment

Hi gerra6!
I guess that this is my 1st post here, so let me start by congratulate you for this useful and amazing tool.
Well i've been trying to use the tool to just copy the weight from my template body (TBBP) to some targets armors (not TBBP).
Unfortunately i was having the same issue between 0/100 weight already reported here by some users in which you have already explained the way how to fix it, but the problem now is that i'm having clipping or glitch in the breast area and only the generated nif armor (_0.nif or _1.nif) that match the selected template nif (_0.nif or _1.nif) it's fine, i mean if i use the template _1.nif i will have glitch in 0 weight and between and vice-versa.
Maybe the tool is not selecting automatically one template for each target (_0.nif or _1.nif) and I have both in the same directory.
Well i hope that you can fix it soon and sorry for my bad English! :)

Link to comment
  • 2 weeks later...

 

Mesh Rigger v.0.87

 

Mesh Rigger allows you to add, modify, or repair the weightpainting, rigging, and skinning of Skyrim, Oblivion, or Fallout/FNV nifs.

 

With Mesh Rigger, you can automatically add virtually any form of BBB (BBP, TBBP, BB, BBB, BNB, etc) to the nif of your choice, repair the weightpainting of a mesh with clipping problems, or even add new weightpainting to an unskinned/unrigged mesh.

 

This update brings several improvements to the quality, flexibility, and robustness of the tool.

 

1. Improved fidelity of copied weightpainting

2. Updated options to specify exactly what you want the tool to do

3. Vastly improved ability to properly process meshes with complex skin transforms

 

New Options:

 

A. Copy Weights (default On): The basic mode of the tool. Enable this to copy weightpainting from the template to the target

 

B. Delete All Weights (default Off): Enable this to remove all existing weightpainting from the target before copying new weightpainting

 

C. Replace Bones (default Off): Replace the existing bones on the target with ones copied from the template

 

D. Replace Partitions (default Off): Replace the existing dismemberment partitions with ones copied from the template

 

E. Flatten Skinning (default Off): This converts extremely complex skin deformation (such as the vanilla Oblivion Head Mesh) into a much simpler, but equivalent, skin deformation. This can reduce the incidence of rendering/animation artifacts.

 

F. Template Material Type: This allows you to specify whether the tool should copy from skin type meshes, non-skin type meshes, or from all meshes found on the template.

 

Portable Package 0.87 (All In One): Mesh Rigger b_87.7z

Scripts Only Download 0.87 (scripts only. Recommended if you intend to use 64 Bit version of Python): Mesh Rigger b_87 scripts only.7z

Link to comment

Hi gerra6!
Thanks for this update; it's good to know that you keep working to improve this great tool.
Well, I’ve been testing this new version 0.87 but no luck.
I've tried for many times and many ways to copy the weights as I did previously in the version 0.81 from my template femalebody1.nif UNPB (TBBP) to both of my targets UNPB bikini1.nif and UNPB bikini0.nif (BBP only) but this time the tool is not finishing the process because of this: 

"AttributeError : ´bone_´object has no attribute ´scale´ 
I really know that is not easy, but do you have any idea of what's goes on?
THX in advance and sry for my bad English! :-/

Link to comment

"AttributeError : ´bone_´object has no attribute ´scale´

Sounds like a bug.

 

What's the text that appears before that bit? It should reference a .py file and a line number. That should help me track it down.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use