Jump to content

Blender 2.49b Scripts Package 1.01 (12/27/2013)


gerra6

Recommended Posts

OK, You're looking at two meshes with very different UV maps.  This isn't necessarily a bad thing, but it does mean that we won't be able to use the UV search function.  The meshes also have significant structural differences that can make it difficult to accurately map from one mesh to another without either a UV or Vertex Index helper algorithm.  You could experiment with the vertex group helper algorithm and carefully created vertex groups, but honestly, I don't think it will produce the results that you are looking for.

 

What you want is a re-usable lattice that can convert equipment made for one body to work with the other body.

 

Here is what I would recommend if you are planning on converting lots of clothing and want the best possible lattice:

 

For converting from Cali to Oblivion (Oblivion to Cali, just swap the names):

1. Go into sculpt mode and 'sculpt' the Cali body to match the Oblivion body as closely as possible.  It doesn't have to be perfect, just try to get things reasonably close. 

2. Run the lattice generator on the sculpted body and view the results.  Apply the lattice if it made the Cali mesh closer to the Oblivion mesh.

3. Repeat sculpting/lattice as needed until the Cali body is a more or less exact fit for the Oblivion Body.

 

Save this blend file.

 

4. Import an unmodified Cali body into the blend file

5. Now run the lattice generator and make a lattice that converts the original Cali body into the modified Cali body.  Set the vertex search targets to 1, enable either UV search (targets 1) or vertex index search,.

 

Experiment with settings until you get the lattice that you like.

Link to comment
  • 2 weeks later...

Friendly Greetz!

 

I'm a relative Blender noob, but making my way into the depths of the blending machinery, therefore I'm very thankful for, and intrigued about, your addon pack, especially the Bone Weight Copy script.

 

Unfort, I ran into a problem installing it. I hope this wont be one of these "facepalm, how stupid am I ?! - situations", but I am kinda running against a wall with this.  :blush:

 

I install from file, in the UserPref -> Addons tab. All good so far. Then I try enabling the Script and get an error (see attached screenshot).

 

Any ideas (or a slap upside the head) are muchly appreciated!!

 

Peebs

 

EDIT: I probably should have mentioned I'm running Blender 2.69 64-bit  :cool:

post-328544-0-88428300-1389937649_thumb.png

Link to comment

Sure thing. I didn't realize until just now that I neglected to mention the version on the front page.

If you're working with Nifs, I should mention that you're pretty much stuck with Blender 2.49, at least until Ghost and Neomonkeus finish porting NifTools to Blender 2.6.x

They're making good progress, but it's a big task for a pair of hardworking folks working in their spare moments.

With that in mind, if you're looking for a boneweight copy tool, I'm developing a new tool called Mesh Rigger that can directly copy bones, boneweights, and skinning between two nifs.  It's in a pretty solid state, and I'm testing a beta update that will be released in the next day or so that should be a significant improvement.

Link to comment

I just downloaded Blender as I'd like to start getting involved in actually making something. I've been reading and watching video tutorials, but to be honest it's all freakin' Greek to me! :D I'll keep trying to learn this stuff, though.

 

But this seems to be quite a nice gift to the community, so I'd like to thank you for giving it.

Link to comment

Hmm...

 

Good question. Probably not as things currently stand. Pose Converter changes the pose of armatures. If the mesh doesn't have any weight painting, the changes to the armature won't affect the mesh.

 

One thing I'm working on right now is a stand-alone port of clothing converter tool. Once that's complete, it should be possible to use it to convert between poses.

Link to comment

'PC_Pose_Import Text Keys.cfg' isn't actually a file in any of my packages. Something very odd is happening, but I have absolutely no idea what it is.

 

The only place where the phrase 'Import Text Keys' appears anywhere in my scripts is a button label that enables or disables anim text key import when you import an animation.

 

Would you be willing to copy the exact text of the error?

 

In the blender console window, right click on the title bar and select edit -> select all and then hit enter.

 

Thanks

Link to comment

Pose Converter is a bit tricky.  It's essentially a collection of experimental tools that I built while I was experimenting with manipulating animations through the Blender API.  Many of the feature, as you've noticed, are not well documented, and I've clearly left many important components out of the package (sorry about that).  As soon as I finish the stand-alone clothing converter (directly converts nifs from one body type to another), I'll take a look at the Blender scripts package and ensure that the 1.02 revision contains everything that it should in addition to a couple of bug fixes.

 

To address your question directly, Oblivion, Fallout, and Skyrim actually store facial expressions in tri files, which makes things a bit more complex.  Fortunately, someone named himika released a pyffi dependent Tri Import/Export script on Github last year.

 

To actually view the facial expressions as they would appear in game, the tri files need to be imported, UV Mapped, and fully rigged as if they were ordinary meshes.

 

Fortunately, the UV Mapping and Rigging can be automatically handled with some of the tools I made for the Blender scripts package (UV Map Copy and Boneweight Copy), although you will need to manually fix the rotation and displacement of the tri files first.

 

However, if you don't mind vanilla meshes, here's the proof of concept Blend File that I put together.  If the meshes don't show up as textured, make sure that Blender can find your Oblivion texture folder.

 

I don't remember off hand how do to that...hmm.

 

shapeKeys2.7z

 

Here's Himika's tri file import/export scripts, with a couple of minor bugfixes.

 

scripts.7z

 

 

Link to comment
  • 2 months later...

Is there any particular trick you would recommend when transfering boneweights from a body to another ?

 

The setup is:

1. Both source and target slided to mostly identical shapes. Source: Dreamgirl, Target: UNP/UNPB, Shape: UNP

2. Offsets fixed by moving source slightly. Shrinkwrapped source (nearest surface).

3. Seams unselected on target mesh. (to use with Match selected only)

4. Source subdivided to some ridicolous number, about 250k vertices. Shrinkwrapped again.

    Average distance to nearest source vertex very low. For weighting purposes, it should be a perfect match.

 

However, the result is far from an identical match. Can't quite figure this out.

 

Vertex search targets: 1 to 5, does it matter? The closest ones should all have correct weights, but in theory

a higher number give a little smoother transistions without losing correctness.

 

Search distance: hard to figure out. Setting too low (like 0.2), and I'd guess the search fails in some cases.

Setting it quite high (1.0)  supposedly have no negative effect with a low "search targets" number, and high

source density.

 

How does "Force vertex to find target" work? Will it always go for the closest source vertices? Like a failsafe

guarantee for the cases when search distance is too low. Trying it now, with overwrite existing weights. Maybe

will do the trick.

 

Doesn't exactly help that Blender treats all weights below a certain threshold as identical, making them all blue.

But Outfits Studio reveals what is hidden in Blender.

 

 

 

Link to comment

Development of my Blender scripts has largely been supplanted by my stand-alone tools (Mesh Rigger, Clothing Converter). So, my memory may be a bit rusty.

 

The basic idea behind the Boneweight Copy tool included in this package is a fast, accurate copying of boneweights from one mesh to another. It does this using a weighted nearest neighbor search. So, no matter how many vertices you tell the tool to search for, the nearest vertex will always have the greatest influence.

 

In general, setting the vertex targets to 4 probably gives the best results. My weighting algorithm uses the furthest vertex as a weighting factor that effectively discards the most distant vertex target.

 

So, setting vertex targets to 4 results in the tool gathering the weighted average of the three nearest vertices. For most purposes, this is what you want.

 

Search Distance is a bit of a throw-away setting. For the most part, vertex targets is what you want to use to manage the balance between precision and smoothness. Most of the time, you can just set it to max and forget about it.

 

Override Distance. Let's say you decided to set the search distance to a nice low setting. Enabling Override Distance ensures that ever vertex on the mesh will find at least one target, no matter how far it has to look. Note: This can be a very dangerous setting if you enable both it and 'selected vertices only'. The back-end of the tool is optimized for relatively short distance searches.

 

Here's a handy Blender tip: Take a look at the 'System and OpenGL' tab under 'User Preferences'

1. Enable ColorBand

2. Customize your color band.

 

Here's my Blender settings file with my custom weightpaint: .B.blend.7z

 

One last thing. If you're converting one body shape to another, try my stand-alone Clothing Body Style Converter

 

The latest version (0.79) generates very nearly flawless transformations.

 

Sometime in the next week or so, I'll also be upgrading Mesh Rigger (my stand-alone boneweight copy tool) with an option to use the same high precision search algorithm that Clothing Converter now has.

Link to comment
  • 2 weeks later...

It seems I will have to learn more about how to get Mesh Rigger to do what I want,

results so far have been disappointing. But Blender ompletely refuses to cooperate,

every body export has vertex spikes, even though I recall having fixed that issue.

Apparently not. :-/

 

Thanks for the colorband tip though. With a low threshold, then the usual rainbow,

at least the weights are visible.

Link to comment

The answer ultimately comes down to the physical similarity between the meshes.

 

If you're attempting to copy weights to a set of clothing, be certain that the body that you choose for your template mesh is the same as the body type used for the clothing mesh.

 

If you're attempting to copy weights from one nude body to another nude body, then things become a bit more complicated.

 

If the two bodies share the same type of UV map (that is, the same textures work for both bodies), then I would recommend using Mesh Rigger's UV Map search ability. That allows Mesh Rigger to accurately transfer the weight between meshes with radically different shapes, so long as both bodies can use the same textures.

 

If, on the other hand, the two bodies are significantly different shapes and do not use the same textures, then they are not suitable candidates for weight copying.

Link to comment

Shapes are practically identical, and the UV map should be compatible (UNP/UNPB/DG).

So, perfect conditions in theory.

 

On second try with latest Mesh rigger, results look more accurate when compared side by side.

A little bit of spread but I haven't tweaked distance or targetnumber yet. Promising.

 

I do miss the mirror feature from the Blender scripts. Dreamgirl weights are not symmetrical.

Possibly I could mirror it in Blender (left to right) first, but this really depends on what causes

the vertex spikes. If it's caused by broken weights, then I can't use Blender for now. If it's

caused by broken skinning/partitions, I guess weights exported from Blender are still usable.

Link to comment

I have most of the my Blender Boneweight Copy mirror capability in place in the back-end stand-alone framework. It just hasn't been enabled or tested as part of the stand-alone framework.

 

I should be able to activate it in a future revision of Mesh Rigger. It was always a bit of a temperamental feature to get exactly right with lots of possible approaches.

 

Ideally, how would you like a mirror feature in Mesh Rigger to function? In particular, for L/R named bones, how should the tool behave?

 

Probably the safest approach would be to simply discard bones from the non-mirrored side altogether and then simply mirror a single bone along the axis. So in a L to R mirror, any Right categorized boneweights will be deleted. Then the L boneweights are, effectively, mirrored along the axis and renamed (the actual back-end doesn't work that way, but it should look like that to the end user).

 

For non L/R categorized bones, I'd probably simply delete the weights on the wrong side of the mesh and mirror them from the other side.

 

Note: At some point I may revisit the my Blender scripts and update the basic search engine with the nearest point on surface search available in the latest (0.81) version of Mesh Rigger.

 

However, with the recent progress on the Blender 2.6x niftools alpha importer, I may instead just focus on porting a selection of my blender tools to 2.6x rather than put any real work into modifying the Blender 2.49b stuff.

Link to comment

Sounds about right. Combined with the ability to select bones.

 

Don't think I have got 100% perfect mirroring so far with the script, but it's possible the mesh was

not completely symmetrical, and I suppose it uses nearest vertex match which may not be ideal.

 

Currently testing if it's possible to unbreak a mesh with in-game vertex spikes, using mesh rigger.

So far I haven't figured out a way to transfer exact weights, even with identical vertices/indices.

Perhaps revert to v0.4.6 ?

 

Edit: Strange. Tried running my buggy Blender export through your Nifcleaner to check if

reskinning helps. Turns out that it modifies the weights, even creating holes in the paint,

pretty much identical to what Mesh rigger produce.

 

Edit again: Moving any further Mesh rigger issues to the correct thread....

Link to comment
  • 2 months later...

I'm trying to save a bone preset to import an animation from fallout to skyrim with pose converter .81 .  I'm getting the error below. 

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "F:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\Conve
rtPose.py", line 2600, in <module>
    main()
  File "F:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\Conve
rtPose.py", line 1907, in main
    menus[-1].function()
  File "F:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\Conve
rtPose.py", line 720, in loadAnimation
    BoneMapDictionary = mapSkeleton(armBoneList, bonePoseDictionary['BONELIST'],
 True)
  File "F:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\kg\bo
ne_util.py", line 443, in mapSkeleton
    loadBoneMapMenu(armBoneDictionary)
  File "F:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\kg\bo
ne_util.py", line 339, in loadBoneMapMenu
    f(armBoneDictionary)
  File "F:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\kg\bo
ne_util.py", line 370, in saveSettings
    WaitCursor(1)
NameError: global name 'WaitCursor' is not defined
Link to comment
  • 3 months later...

strenge  !!!     or it is a bad use from me of seam mender    !        selected vertices on one mesh   than selected  vertice on the other  (almost matching and faces were highlighted),

 

  than run seam mender   the result  was a perfect  match (no seam at all) but 2 inconveniences  : - first the weight paint of those selected faces  were gone      - and  second  the faces were separeted .

Link to comment

Weird.

 

So you were in face selection mode, and ran seam mender?

 

It actually separated the faces?!?

 

Well, seam mender should probably be run in vertex selection mode, since you want to mend the faces, not the seams. But that's a pretty interesting bug.

 

Anyways, I'm currently planning on updating my Blender tools to use the newer algorithms I developed for the stand-alone tools. So I'll probably start poking away at the Blender code sometime in the next month or so.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • 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