Jump to content

Clothing Bodytype Converter V.5.0 (12.24.2013)


gerra6

Recommended Posts

Version 2.3 is now live.

 

This version gives more precise control over the behavior of the vertex ring algorithm. In addition, the accuracy of the algorithm has been significantly improved.

 

Assuming that everything works the way it should, this should produce significantly better lattices for meshes with significant size differences (such as standard meshes to pregnancy meshes)

Link to comment

Beautifully. It indeed is a significant improvement. I didn't take a shot.

Tested on the upperbody HGEC E -> PbodyX3.

breast ring on/ waist ring 10/ arms ring 2/ everything else 0

 

 

After 2~3 try of changing such like Node search...etc. I got nearly perfect for the belly& amrs, and the breast still has some minor distortion. I didn't make the second lattice, it's good enough for my work. Thanks for all the hard works and the job well done.

Link to comment

Beautifully. It indeed is a significant improvement. I didn't take a shot.

Tested on the upperbody HGEC E -> PbodyX3.

breast ring on/ waist ring 10/ arms ring 2/ everything else 0

 

 

After 2~3 try of changing such like Node search...etc. I got nearly perfect for the belly& amrs' date=' and the breast still has some minor distortion. I didn't make the second lattice, it's good enough for my work. Thanks for all the hard works and the job well done.

[/quote']

 

Glad to hear it.

 

If you decide to run a second lattice, turn off all five ring algorithms. I've found that they while they are extremely good at finding the correct distant targets (Breast size distances, larger bellies, etc) based on mesh geometry, vertex weights, and edges, they are not all that good at fine tuning (the original algorithm is much better at that). I had to build a lot of fuzziness into the ring algorithm to account for all of the different body styles.

 

For its part, the default algorithm doesn't give a crap about the mesh. It just looks for the nearest vertices (1-100 depending on your options) within your set distance, creates a heavily weighted average of their positions (closer targets are vastly more influential than distant targets), and comes up with a local translation vector for the lattice to use.

Link to comment

Quick (I hope) question.

What settings are appropriate for an upper body lattice when you are either converting:

Male (armour) (no breast bones) to female.

Female (armour) to male.

Female (armour) (no breast bones, almost flat chested) to female (breasts of plausible size with bones)

 

...or should I wait for the upgraded instructions. Getting hopeless lattices when I try these.

Link to comment

Quick (I hope) question.

What settings are appropriate for an upper body lattice when you are either converting:

Male (armour) (no breast bones) to female.

Female (armour) to male.

Female (armour) (no breast bones' date=' almost flat chested) to female (breasts of plausible size with bones)

 

...or should I wait for the upgraded instructions. Getting hopeless lattices when I try these.

[/quote']

 

How about... you do BWC first to a male (or flat female) body from a nearly flat BBB female body, and then try again?:rolleyes: Maybe some GUTs or lolibody for the male body. Once you're done, you don't need breast bones anymore isn't it?

 

....No joke. Seriously, perhaps this could do the job till Gerra6 gives you a real answer.

Link to comment

Answering in reverse order:

 

 

Female (armour) (no breast bones' date=' almost flat chested) to female (breasts of plausible size with bones)

 

With no breast-related vertex groups on the small breasts? It can't be done.

 

Fortunately there is an easy solution. Give em some paint.

 

Here's the best way to do it:

 

1. Hit tab to go into edit mode

2. Hit A until no vertices are selected

3. Make sure you are in vertex select mode (Control Tab 1)

4. Select the vertex at the exact center of the left nipple (or approximate if it has no center vertex)

5. Now repeatedly hit (control +) until the selection expands to the X axis.

6. Hit (control -) once or twice until you get something a bit like this:

 

 

 

7. Under Vertex Groups click "New"

8. Give the group any one of the supported breast group names (Bip01 Op2.L, Breast.L, breast.L, L Breast, NPC L Breast,NPC Breast.L) It doesn't matter which one.

9. With the left breast still selected, under Vertex Groups click "Assign" (Ordinarily, you don't weight paint this crudely, but since we just need to add the vertices to the group, this is fine)

10. Now hit A twice to deselect everything

11. Repeat steps 4-7, but this time on the right side.

12. Give the second group any one of the supported right breast group names (Bip01 Op2.R, Breast.R, breast.R, R Breast, NPC R Breast,NPC Breast.R) Again, it doesn't matter which one. It doesn't even need to match the group you chose for the left group.

13. Click "Assign"

 

Now, when you run the Create Transformation Lattice tool, the tool will recognize the breasts on both meshes and correctly perform the crazy transformation gymnastics necessary to morph the source bust into the target bust.

 

I also have a script that automates 90% or so of Oblivion BBB system weightpainting. It's not the friendliest UI in the world (I'll get around to a releasable version eventually) but I'd be happy to share it if it would be helpful. In the context of the steps I just gave you, all you would have needed to do was select the nipple vertex and run the script.

Link to comment

Male (armour) (no breast bones) to female.

Female (armour) to male.

 

Assuming that you are talking about converting females with large breasts to male armors' date=' or vice versa, well, you'll need to give the man a boob job. Or more specifically, you'll need to add breast-bone vertex groups.

 

Why? As I worked on this tool, I quickly realized that breast mesh geometries are so wildly divergent and unpredictable (from a coding standpoint) that I needed a more reliable approach.

 

Breast bone vertex groups bring two things to the table. First, they tell me authoritatively whether or not a vertex is part of a breast. Secondly, they give me a very accurate representation of the geometry of the breast and a definite edge that I can use as the start point of my algorithm.

 

To match everything up, I just iterate inwards from the edge to the nipple, compare rings, displacement, cycles, etc between the breasts and the rings, and come up with an averaged best fit.

 

Without the breast bone weightpainting, all that the tool currently does is find the nearest vertex match. (I've removed all of the insane breast compensation algorithms I had developed before I settled on breast bone vertex groups)

 

So here's what you need to do.

 

It's going to look very familiar.

 

 

1. Hit tab to go into edit mode

2. Hit A until no vertices are selected

3. Make sure you are in vertex select mode (Control Tab 1)

4. Select the vertex at the exact center of the left pec nipple (or approximate if it has no center vertex)

5. Now repeatedly hit (control +) until the selection expands to the X axis.

6. Hit (control -) once or twice until you get something a bit like this:

 

 

 

Note: You may need to experiment with different groups of pec vertices until you get the desired results in your final product. The basic idea is that any vertices that should be transformed into breasts or are the target of a breast need to be part of a breast vertex group.

 

7. Under Vertex Groups click "New"

8. Give the group any one of the supported breast group names (Bip01 Op2.L, Breast.L, breast.L, L Breast, NPC L Breast,NPC Breast.L) It doesn't matter which one.

9. With the left pec still selected, under Vertex Groups click "Assign" (Ordinarily, you don't weight paint this crudely, but since we just need to add the vertices to the group, this is fine)

10. Now hit A twice to deselect everything

11. Repeat steps 4-7, but this time on the right side.

12. Give the second group any one of the supported right breast group names (Bip01 Op2.R, Breast.R, breast.R, R Breast, NPC R Breast,NPC Breast.R) Again, it doesn't matter which one. It doesn't even need to match the group you chose for the left group.

13. Click "Assign"

 

Now you have a dude with bouncing pecs. Congratulations!

Link to comment

And for my third answer.

 

For relatively small breast bodies to male and vice versa, your best bet is to disable "Breast Rings" (which depend on breast bone weightpainting to function). Experiment with different vertex search distances until you get a decent match.

 

If the body size differences are significant (HGEC C cup to Room207 bodybuilder, for example), you may want to use the rings for the neck, arms, and waist.

 

...

 

Unfortunately, in the process of creating a screenshot, I've realized that the algorithm for the arm rings is not working properly (I'll explain more later). So I'm off to go fix that now.

 

2.3.a is now live, with fully functional arm ring vector search (or whatever the hell it should be called). That said, the arm ring vector search is generally pretty worthless. It's great for matching up seams, but that's about it. For everything else, the default search algorithm does a better job.

 

...

 

So, let's say you wanted to convert an HGEC-C cup to Room 207's Bodubuilder. Tall order.

 

...

 

So there I am, trying to get screenshots again, and I realize that the reason I can't get the HGEC lats to line up with the Bodybuilder lats is that "Search Bias" is only applying to Node searches, not vector searches.

 

Back in a bit.

 

OK, 2.3.b is now live. With a *properly* functioning search bias this time.

 

...

 

Something like this:

 

 

 

Which produced these results:

 

 

 

 

 

Not a bad start. But now that the vertices are much closer to their desired location, we can make a second lattice optimized for fine tuning.

 

First apply the existing lattice, move it to another layer and save it. Then make a second lattice.

 

Something like this:

 

 

 

Which produced these results:

 

 

 

 

Link to comment

It do not compotable in other body mod? Exactly DM & HGEC AAA cup?

 

Thanks for the question. Assuming that both have breast bones' date=' they should work fine together, although a flat chest to any of the SPB28 style tops will probably need two lattices to produce really nice results. (In general, when you're moving vertices a long distance, you need one lattice to do the big movement and one to attend to the fine details afterwards).

 

Looking at your screenshots, I see a couple of issues.

 

For starters, it appears that like you've got an older version of the script (2.0?). I recommend updating to the latest iteration, 2.3.b. It includes a number of bug fixes and improvements to algorithm quality.

 

The second issue is your settings. I've been negligent in releasing updates without providing full documentation since the 1.5 release. I'm working on it, in fact, answering questions in this thread is helping me to figure out what I need to write in the core documentation, so thanks again.

 

So here are the problems that I see.

 

Cross X Axis: This should [i']almost[/i] always be left unchecked. The only time you want to check this is if you are creating lattices for asymmetrical meshes.

 

Lock Z Edges: This can go either way. Prior to the 2.1 update I recommended enabling this for most purposes. From 2.1 and on, I recommend leaving this unchecked for almost everything. I may even remove it.

 

Grid: Enable this. Seriously. Do it. There are two basic styles of lattices, grid and box.

*****Box is just a big bounding box with nodes that you can manipulate. They are very easy to edit and manipulate, but their effects on the underlying mesh are very very crude.

*****Grid is a box of boxes. These are extremely difficult to edit by hand, but provide you with vastly more control over how the lattice transforms the mesh.

 

Now, since the script is editing the lattice for you, there is no reason not to use Grid. I will probably remove this option and just default to Grid in a future update.

 

Lattice Scale: 1.00 (your setting) is good. This just controls the size of the lattice. Increasing the lattice scale expands it past the edges of the mesh, which can sometimes improve results. But in general, I recommend 1.00 here.

 

Node targets: 5 (your setting) is ordinarily a decent enough starting point. However, since you disabled "Grid" mode, you don't have very many nodes. This means that a node that might end up modifying 30 or 40 vertices is only accounting for 5 of them.

 

Node Search: .5 (your setting) is probably fine. In general, practically any setting here can get good results.

 

Growth Bias: 1.0 (your setting) is the default setting and is optimal for *most* purposes.

 

Magnifier: 10.00 (your setting) is...very very high. Set this to 1.00 and increase it in very tiny increments. 10.00 is for doing silly things like creating absurdly gigantic breasts.

 

X Search Bias: 1.000 (your setting) means that the search engine completely ignores the X axis. 0.00 is preferred for *most* purposes.

 

Y Search Bias: 0.000 (your setting) is good. It means that the search engine will search along the Y axis normally.

 

Z Search Bias: 1.000 (your setting) means that the search engine completely ignores the Z axis. 0.000 is preferred for most purposes.

 

With both X and Z set to 1, only the Y axis is used for determining relative distance between points. This will tend to produce some very odd results.

 

U, V, W, Node Type: 1 (your settings) are fine. These can also be set after the fact.

 

Vertex Targets: 1 (your setting) Any number between 1 and 100 can be good, depending on the desired results (higher numbers tend to produce smoother meshes, lower numbers more precise meshes)

 

Vertex Search: 0.100 (your setting) is very low, but that's not necessarily a problem.

 

Vertex Override: Enabled (your setting) means that every vertex will find at least one target.

 

Buttock Radius: 1.000 (your setting). Although it does not matter with the newest versions, with older versions this should be set to 0 for upper bodies.

 

Node Multiplier: 4.0 (your setting) This is fine.

 

Here's an example of what I mean:

 

 

 

And the result

 

 

Link to comment

Is this script set up to work well with any type of body mesh you throw at it or is the algorithm designed specifically to work with lower body and upper body split meshes like Oblivion has? Guess the question boils down to... will it work for setting up control lattices for a one piece Fallout mesh?

 

EDIT:

I did notice the Fallout breast bones we use ( BnB = breast.R, breast.L) in most animations are supported. The Body Extender bones aren't (not a huge deal really, but they are Bip01 L Breast01 - 03 and Bip01 R Breasts01 - 03). The skeleton we all use is either the BnB skeleton or, if you use the Sexout mods, my Compatability Skeleton.

Link to comment

Is this script set up to work well with any type of body mesh you throw at it or is the algorithm designed specifically to work with lower body and upper body split meshes like Oblivion has? Guess the question boils down to... will it work for setting up control lattices for a one piece Fallout mesh?

 

It should work just fine. Please try it out and let me know.

 

I did notice the Fallout breast bones we use ( BnB = breast.R' date=' breast.L) in most animations are supported. The Body Extender bones aren't (not a huge deal really, but they are Bip01 L Breast01 - 03 and Bip01 R Breasts01 - 03). The skeleton we all use is either the BnB skeleton or, if you use the Sexout mods, my Compatability Skeleton.[/quote']

 

Fantastic. I'll add them to the vertex group check. Please let me know if you know of any other bone types that I'm missing.

Link to comment

Is this script set up to work well with any type of body mesh you throw at it or is the algorithm designed specifically to work with lower body and upper body split meshes like Oblivion has? Guess the question boils down to... will it work for setting up control lattices for a one piece Fallout mesh?

 

It should work just fine. Please try it out and let me know.

 

Edited my post but your answer handles my edit nicely lol. Thanks for the tough work on the blender scripting, much appreciated. Will check it out and see...

Link to comment

Is this script set up to work well with any type of body mesh you throw at it or is the algorithm designed specifically to work with lower body and upper body split meshes like Oblivion has? Guess the question boils down to... will it work for setting up control lattices for a one piece Fallout mesh?

 

It should work just fine. Please try it out and let me know.

 

Edited my post but your answer handles my edit nicely lol. Thanks for the tough work on the blender scripting' date=' much appreciated. Will check it out and see...

[/quote']

 

The only real problem with single meshes is that the time required to generate nodes increases exponentially as the number of vertices increase (I'm working on optimizing the code, but there is a limit to how much you can optimize a shortest distance algorithm. I'm also a Blender/Python noob and I'm still learning about which approaches are fast and efficient, and which bog everything down.)

 

Once you've generated and saved your lattice, using it on high vertex meshes is nice and fast, of course.

Link to comment

Thx for your AWESOME FANTASTIC work!! :) It's so cool!! +_+

 

In this case how can i resolve problem?

 

 

Here is my working file. :)

 

 

There are a couple of ways to go with this one. One is we can try to work with the mesh as-is and come up with the best available transformation.

 

The best bet at that point would be to apply the first lattice and then tweak the settings to create a high quality detail lattice for the second modifier.

 

However' date=' I've taken a look at the original mesh and there are a few tweaks that can help the tool create the best possible lattice out of it.

 

The major one is the breast bone weightpainting. In its current design, the lattice generator depends on the OP2 breast bones to define the area of the breast.

 

 

 

You'll notice in this screenshot, the weightpainting extends well beyond the breast. It's a quick and easy fix (note, this is just a quick fix to make the weightpainting work with the lattice script. The results will not look good in game. I do, however, have a very handy script for creating high quality breastbone weightpainting, the results of which can be viewed in Setbody Reloaded).

 

1. Tab into edit mode.

2. Select the group (Bip01 OP2.L)

3. Hit 'a' until all of the vertices are selected

4. under group, hit the 'remove' key

 

At this point, the vertex group Bip01 OP2.L should be empty.

 

Follow the instructions on page 4 of this thread to add vertices to the group, and repeat for the Right side.

 

http://www.loverslab.com/showthread.php?tid=12606&page=4

 

You should get something that looks a bit like this when you select the group 'Bip01 OP2.L' and hit "select".

 

 

 

OK. I'd then probably create two lattices, to be applied one after the other.

 

First, I'd do something like:

 

 

 

Then apply that lattice, move it to another layer and save it, then do something like this:

 

 

 

Notice, I disabled the Breast Ring algorithm for the second lattice. Since the vertices are very close to their targets this time, I chose to rely on the more precise nearest vector search algorithm, rather than the relatively fuzzy Breast Ring one.

 

 

Which gives us

 

 

 

So now you have two lattices that are made to work together. Save the blend file and just apply them, one after another, to any meshes that you wish to transform.

 

Here's a link to the blend file. http://www.mediafire.com/download.php?e8i5km60w6iuaq7

 

I did a trial run with a duplicate of the dress (Dress is on layer 10, lattices on layers 6 and 7, I think). It's pretty damn close. If they were my lattices, I would probably tweak the settings a bit to create a slightly bigger breast morph than what I'm including here.

 

But it's close.

 

And the great thing is, once you have a perfect lattice, it will work for almost any clothing transformation between those two body types.

Link to comment

And the great thing is' date=' once you have a perfect lattice, it will work for almost any clothing transformation between those two body types.

[/quote']

Thx for your kindness!! You r good guy. And my word was shot to my mean.

I want work armor convert to DM bodies. Normally armors release in their own body type. Like HGEC-C. I want make HGEC-C to DM lattice and test apply that lattice to armor.

Until now i used retopo and lattice grab and propotiotial grab. So this script make body to body lattice then it can apply in armor? That's my question. :)

Sorry about my short english ability. :D

Link to comment

And the great thing is' date=' once you have a perfect lattice, it will work for almost any clothing transformation between those two body types.

[/quote']

Thx for your kindness!! You r good guy. And my word was shot to my mean.

I want work armor convert to DM bodies. Normally armors release in their own body type. Like HGEC-C. I want make HGEC-C to DM lattice and test apply that lattice to armor.

Until now i used retopo and lattice grab and propotiotial grab. So this script make body to body lattice then it can apply in armor? That's my question. :)

Sorry about my short english ability. :D

 

Yes. The major purpose of the script is to create a conversion-ready version of a very specific type of Blender modifier, called a Lattice

 

Once you create a lattice, you can use that same lattice on any mesh at all. The lattice itself doesn't care.

 

Here's how you do it.

 

Note: These instructions assume that you have just created two lattices that, when used one after another on a mesh, will give you the results that you are looking for.

 

1. Make sure that your button panel is in editing mode (f9).

2. Select the first lattice that you created (1 of 2).

3. In the button panel, look for an entry called Link and Materials

4. Look for the field that starts with OB: and contains the name Lattice or some variation such as Lattice.001.

 

5. Now, change that name to something that is descriptive, short, and easy to remember. For the purposes of this tutorial, I am renaming the lattice AtoB_One

 

6. Select the second lattice that you created (2 of 2).

7. Repeat steps 3 to 5. I am renaming the second lattice AtoB_Two

8. Now, Save your Blend file

9. Go to a different layer (recommended but not necessary)

10. Next, import the clothing mesh that you wish to convert. Any clothing will work as long as is based on the same body style that you used to create the lattice.

10. Select only the clothing mesh

11. In the editing pane of the button panel, look for a section called Modifiers

12. Click on Add Modifier

 

13. Select Lattice

14. (Recommended) Click on the ^ next to the new Lattice modifier entry to move it above the Armature modifier entry

15. Now take a good long look at that Lattice modifier entry.

 

There are two fields, OB and VGroup. For now, we are going to be using OB only.

 

Note: Although we are not using it in this tutorial, VGroup is extremely useful if you want to transform a specific part of the mesh and nothing else.

 

16. Type (or copy/paste) the name of the first lattice (AtoB_One) from step 5.

 

 

 

Notice how the clothing mesh immediately transformed?

 

17. Click on the Apply button next to the place where you typed in the lattice name.

 

You'll notice, the Lattice modifier entry is now gone from the clothing mesh modifiers.

 

18. Repeat steps 11 to 15 with your second lattice (AtoB_Two) from step 7.

 

 

 

19. Click on the Apply button next to the place where you typed in the lattice name.

 

And that's it. Repeat steps 11 to 19 for any other meshes in the nif, swap out the body mesh, and export.

 

Now, chances are, the first time you create lattices for a given body style, they won't be perfect. So take a look at them, figure out the problem areas, and either create a new set of lattices or, if you really want to, manually edit the existing lattices.

 

If you're tweaking settings to create an optimal lattice, subtle adjustments to Growth Bias and Magnifier are your friends.

 

Note: I am currently designing an algorithm that, if it works, will make it vastly easier to generate lattices that morph the source mesh into one that is *slightly* larger than the target mesh.

Link to comment

Alright gerra I'm using

 

this version of blender...

 

and i can't seem to get it to show up at all

 

any advice? I really would love to try this out

 

Where did you put object_create_transformation_lattice.py?

 

The first time I used the portable version' date=' I dumped my scripts in \Bin\Blender\scripts\, which didn't do me a damn bit of good.

 

Don't put it (or any other scripts) there.

 

Put it in [b']\Bin\Blender\.blender\scripts\[/b]

 

I should probably mention, I'll be pushing out an update sometime in the next day or two (depending on how long it takes to finish coding everything) that will add an option that should make it significantly easier to create clothing conversions.

Link to comment

Well I'm an idiot lol

 

thanks gerra

 

testing this baby out right now!

 

Awesome. Let me know how it works for you.

 

Note...the current revision takes a fuckton of tweaking to get the lattice to create a mesh that is *slightly* larger than the target mesh.

 

That task will be entirely automated in the next revision.

Link to comment

This is just pure genius' date=' anyone who mods should kneel before you and swear fealty. I have not yet had a chance to see it action though, would this by chance also work to convert from non hgec body types to hgec or would the vertex differences be to great for it work propperly

[/quote']

 

It *should* work for any pair of meshes that share basic structural similarities, no matter the vertex differences. The quality of the final product will vary depending on how extreme those differences are, however.

 

Page 4 includes a demonstration that convers HGEC to Room207 Bodybuilder, for example. http://www.loverslab.com/showthread.php?tid=12606&page=4

 

In order to achieve the best results, there are two main characteristics that the mesh should have.

 

Breast Bone Weighting (If the mesh includes breasts): In order for the tool to convert significantly different breast styles and sizes, clean breast bone weighting is a must. Many meshes include breast bone weighting that, while it looks fine in game, is a mess in blender. Fortunately, it is extremely easy to fix messy vertex groups for the purpose of the tool. (I also wrote an automated BBB bone weighting script that I'll tweak a bit and release once I get the next major release of this tool finished.) Page 4 is loaded with instructions on producing the sort of breast bone groups the tool prefers. I'll move all of that stuff to the main instructions on the first page once I finish coding the next release (which is taking forever).

 

No Vertex Doubles: These can appear in more or less random locations on seams. Unfortunately, if you are using any of the Waist, Neck, Arm, or Leg ring tools, they create a pucker in the edge ring that can, on occasion, produce weird results. I'm working on a back-end solution, but for the moment, going into edit mode, hitting w, and selecting "remove vertex doubles" does the trick.

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