Jump to content

Welcome to LoversLab
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

New Clothing Body Style Converter Beta v0.89f (10-26-2014)


  • Please log in to reply
1227 replies to this topic

#1
gerra6

gerra6

    Mega Toaster

  • Contributor
  • PipPipPipPipPip
  • 2,080 posts

*
POPULAR

Clothing Converter
 
Automatically convert clothing from one body style to another!
 
The tool can process a single nif, multiple nifs, or even an entire directory structure at once.

The latest version provides a dramatic improvement to the quality of all conversions. When working with From and To nifs with compatible UV maps, conversion will often be very nearly nearly flawless.

Core Functions
 
1. Generate reusable 'Lattice' that can be used again and again to convert any clothing customized for one body style to another body style.
2. Convert Bodies, Clothing, Armor, and Equipment from one body style to another.
 
Example Conversion Results

DMRA to HGEC A cup.  Complex, high-poly armor.

Attached File  Before.png   169.12KB   694 downloads      -   To   -      Attached File  after.png   176.38KB   603 downloads
          Before: DMRA                -        -               After: HGEC A-Cup
 
 
Using Clothing Converter

Please visit the Clothing Converter Lattice Library to browse and share successful lattices with the community.

Mem404b's guide can be found here

The first step to converting clothing is to generate a reusable 'lattice', using the Make Lattice tool.

Spoiler

 
For best results, use a From and a To nif that either share the same base texture or the same vertex index.
 
The tool will still work even if the From and To nifs don't share UV or vertex indexes.  However, in that case the quality of the clothing conversion will depend entirely on the degree of physical difference between the template and the target nif.
 
Using Make Lattice

Spoiler

 
Using Convert Clothing

Spoiler


Download:

Attached File  Tools RC_89.e.7z   14.42MB   1201 downloads

Attached File  Tools RC_89_k_Upgrade.7z   131.78KB   726 downloads

 

 

 

Website for more information:
KGTools Development Website Site
 
Installation:
 

Spoiler

 
ChangeLog

v.0.85 to v.0.85.a
1. Resolved crash error

v.0.81.a to v.0.85
1. Radical overhaul to back-end skin transform calculator
2. Radical overhaul to back-end skin transform compensation
3. Replaced pyffi Matrix4x4 and Matrix3x3 objects with new composite object that calculates cumulative scale, rotation, and transformation transforms discretely in order to substantially reduce floating point division errors that otherwise arise from the repeated composition and decomposition of 4x4 matrices into scale, rot, translation components
4. Added new full pivot Gaussian array solver function that is used to calculate matrix inversions, barycentric coordinates, and solve unknown matrix x for both Ax = C and xA = C
5. Added ability to automatically merge multiple nifs into a single template for both the From and To nifs in the make lattice tool as well as for the Template in Mesh Rigger.

Spoiler

Please report any bugs or other issues that you encounter.

Please visit the Clothing Converter Lattice Library to browse and share successful lattices with the community.


  • 59

AdBot

AdBot
  • Advert

#2
ACanOfWin

ACanOfWin

    Member

  • Members
  • PipPipPip
  • 247 posts

Do we need to make a different lattice for each of the 0 and 1 body weights?


  • 0

#3
gerra6

gerra6

    Mega Toaster

  • Contributor
  • PipPipPipPipPip
  • 2,080 posts
It should only be necessary to generate either a _0 or a _1 lattice.

When the tool is run, it will automatically check file names for _0 and _1 nifs. If both are found, it stores the morph vectors that convert one to the other.

It then converts the body style of either the _0 or _1 nif using the lattice (depending on which was used to generate the initial lattice). Once that is complete, it applies the morph vectors to the nif and saves the corresponding nif.

Please test it out and let me know if it behaves itself.
  • 0

#4
gerra6

gerra6

    Mega Toaster

  • Contributor
  • PipPipPipPipPip
  • 2,080 posts
One thing I should note about Clothing Converter. It does not currently re-calculate Tangent Spaces or Vertex Normals (this functionality will be added in a future update)

For the time being, if you notice unusual lighting artifacts after converting a nif, simply open the nif in Nifskope and have it recalculate the tangent spaces and vertex normals.
  • 0

#5
ACanOfWin

ACanOfWin

    Member

  • Members
  • PipPipPip
  • 247 posts

I must've done something wrong. I tried to make a lattice for UNPB -> 7B Cleavage, it seemed like it worked, but when I used to to convert some armors the output was extremely flat chested.


  • 0

#6
gerra6

gerra6

    Mega Toaster

  • Contributor
  • PipPipPipPipPip
  • 2,080 posts
Send me the source files, I'll take a look

*Edit*

Whoops.

I just looked at the source code and it looks like I reversed the From and To files. Sigh.

Do me a favor...copy this into the python\app\Scripts folder and try making a lattice with this version.

If it works properly, I'll update the main files.
  • 0

#7
ACanOfWin

ACanOfWin

    Member

  • Members
  • PipPipPip
  • 247 posts

Here's the lattice I was using:

https://www.mediafir...kwvajs6zclpmlkc

 

I was trying to convert lostdaywalker's Skin Tight Dragon Wear for UNPB

 

EDIT: Used the newer lattice, the mesh is pretty funky looking. I have a good feeling that there was user error somewhere in there, but I did get a lot of "Improper rotation matrix" errors while converting the meshes.


  • 0

#8
gerra6

gerra6

    Mega Toaster

  • Contributor
  • PipPipPipPipPip
  • 2,080 posts
It looks like the lattice Generator is reversing the transform vectors. That's....a new bug. Hmm...I wonder where it came from.

I'm testing out a patch now, I'll post an update once it's ready.

***Edit***

OK, I've done a fair amount of testing with the patch. It looks pretty good so far. *However* I should note that generating a good quality lattice for the 'Cleavage' mesh is proving to be a considerable challenge. The problem is that cleavage...everything converts fairly cleanly (for an automated tool) until you get to the X-Axis where the breasts sort of...crash...together in a not particularly appealing way.

One of the features that I had previously added to my Blender version of this tool was a 'Don't Cross X Axis' option that treated the X-Axis as a hard barrier that could not be crossed when doing transforms. It looks like I may need to add a similar option to this tool. I think I can patch it into 'Convert Clothing' script.

Another feature that I should probably port over was a 'lock Z movement' option that prevented any Z-Axis movement.

For any users of my Blender Clothing Converter, are there any other features that were available in the Blender version of the tool that you would like to see added to the stand-alone version?
  • 0

#9
gerra6

gerra6

    Mega Toaster

  • Contributor
  • PipPipPipPipPip
  • 2,080 posts
OK, Here's a test patch for the Clothing Converter

ChangeLog:

1. Resolves bug that caused the transforms to be the inverse of the desired transformation
  • 1

#10
mem4ob4

mem4ob4

    Mega Poster

  • Contributor
  • PipPipPipPipPip
  • 884 posts

Using your latest patch (b_25_A).
I have OS: Windows XP (x86) version 5.1 with Java: 1.7.0_51
It chugs along and gives no errors so good to go!

"Oh why are boobies the angst of man?"
I am wanting to scale down from large (DMRA) thru a mid size (HGCA) to almost nil (FCPA).
I plan on using 2 or 3 steps (lats.) to work it down.
So far, using default settings on a bikini top has been a bit messy.
Would you have recommendations on settings for both the lats and the conversions?
Also, does nifs with BBB cause problems? If so, what would be the best way to
clean them before hand? Re-applying the BBB afterwards should be no problem.

Thanks,
Mem


  • 0

#11
gerra6

gerra6

    Mega Toaster

  • Contributor
  • PipPipPipPipPip
  • 2,080 posts
BBB should have no effect on the transform. Note: I may add a Boneweight based matching algorithm to the tool at some point so that BBB will actually improve the results...however, since many meshes have extremely dirty weightpainting, this may just end up causing more problems than it solves.

A DMRA to completely flat is second only to Manga to completely flat in terms of challenge. It won't be easy. Scaling up is always easier than scaling down.

The biggest challenge is going to be the underboob region...large breast meshes tend to be a bit messy there, with breast and torso vertices overlapping and faces crashing through each other. Things can get very ugly when the tool attempts to match the breast vertices without interference from the torso vertices and vice versa.

Your best bet is generate some very high resolution lattices. Since you're running a 32 bit system, you'll need to be careful not to run out of memory.

Here is what I would try.

First work on a DMRA to HGEC C conversion. If possible, see if you can generate a lattice with a .025 as the resolution but set the max node density to 10. If that exceeds your available memory, try decreasing the resolution a bit but keep the max node density at 10 (extremely important for the underboob region.

For search settings...this is a bit tricky. I would recommend experimenting a bit..In general, 3 targets for the vertex search is typically ideal. For the lattice node, I generally recommend 3 as well. However, feel free to experiment with higher numbers or lower numbers to see the effect on the final transformations. This is still an experimental tool, so feedback is very much appreciated.

For the Convert Clothing settings...this generally depends a bit on the resolution of the lattice. The higher the node resolution, the higher the recommended number of node search targets. In general, choose a lower number for a more precise transform, a higher number for a smoother transform. I generally like something in the range of 8 to 15 here, but it really depends on the resolution of the lattice.

*Edit*

Here's my thinking for an experimental initial version of Bone Based matching. Right now, the tool builds a lattice for the entire nif, with a resolution that dynamically increases as local vertex density increases.

But it attempts to match every vertex on the nif.

One potentially useful feature that I could add would be a bone selection menu that limits the tool to generating transformation nodes only for vertices that belong to the selected bone groups.
  • 0

#12
mem4ob4

mem4ob4

    Mega Poster

  • Contributor
  • PipPipPipPipPip
  • 884 posts

Thanks gerra, I will continue experimenting and see what I can come up with.

That bone group selection sounds like it might be good for skimpy cloths as apposed to full body outfits?

 

Mem


  • 0

#13
gerra6

gerra6

    Mega Toaster

  • Contributor
  • PipPipPipPipPip
  • 2,080 posts
I'm pretty much brainstorming...On the lattice generation side, the basic idea is to improve the performance/quality balance by allowing you to set the max node density by bone group.

So, for example, I could conceivably design the tool to have a stupidly high node density for regions with a specific end-user specified boneweight (say, OP1) and a much lower node density for every other region of the mesh.

If it works, this would allow the tool to much more accurately model breast conversions without the massive performance hit that you would otherwise get.

On the Clothing Conversion side, I can add a great deal of flexibility in determining which vertices should be modified by the tool. For example, it would be extremely simple to allow you to limit the tool transforms to vertices by bone influence.
  • 0

#14
gerra6

gerra6

    Mega Toaster

  • Contributor
  • PipPipPipPipPip
  • 2,080 posts
Here is a very experimental update.

This update adds a new option to the Make Lattice tool, 'Select Bone Nodes'

When enabled, the tool will open a new menu that lists all of the bones identified on both the template and the target nifs.

Each bone will have a button to turn it on or off and a Bone Node Max density slider. Note: The slider settings will only be read by the tool if the corresponding bone button is enabled.

To generate the lattice for DMRA to HGEC-A conversion, try something like this:

1. Set resolution to .25
2. Set Max node density to 4
3. Enable Select Bone Nodes

On the 'Select Bone Node Density' Menu

1. Enable BIP01 L Op1
2. Set BIP01 L Op1 Bone Node Density to 40 (max value)
3. Enable BIP01 R Op1
4. Set BIP01 R Op1 Bone Node Density to 40 (max value)

This will give the maximum node density for breast regions and a significantly lower node density for other regions.

To improve results further, you can try the following:

1. Increase the resolution setting.
2. Create a custom weightpainting using an otherwise unused bone that covers only the problem area.
  • 0

#15
Vaelorian

Vaelorian

    Mega Poster

  • Members
  • PipPipPipPipPip
  • 848 posts

I'm going to play around with this a bit. Will post if I encounter any issues.

 

In the meantime, figured I should say thanks for making this. So, yeah, thanks.


  • 0

#16
Ruskii420Sama

Ruskii420Sama

    Automotive Enthusiast, Small Breast Lover, Dank Memer

  • Members
  • PipPipPipPip
  • 358 posts

Seems like a nice tool, making a lattice for UNPB->SevenBase Bombshell atm, ill tell if anything is wonky. 


  • 0

#17
gerra6

gerra6

    Mega Toaster

  • Contributor
  • PipPipPipPipPip
  • 2,080 posts
Cool. Let me know how it performs. This tool is still in the experimental phase, so any feedback or suggestions can be very helpful.

Right now I'm generating a 1.5 million node test lattice. Very slow going.

I'm clearly going to need to learn C++ so I can compile a faster version of this tool.
  • 0

#18
Vaelorian

Vaelorian

    Mega Poster

  • Members
  • PipPipPipPipPip
  • 848 posts

This one line caught my attention; it seems rather odd. Figure I'll ask.

"Target Mesh Vertices 658077"

 

The template mesh I used had 3440 verts, and the target mesh had 3321 verts. Not entirely sure what that was about. The final lattice file is roughly 62.5mb.

I attempted to create a lattice for NM to HGEC B.

For settings, I left everything at default save for the changes you suggested at post #14.

 

I can attach the log file if needed.


  • 0

#19
gerra6

gerra6

    Mega Toaster

  • Contributor
  • PipPipPipPipPip
  • 2,080 posts
Technically, that's the number of nodes in the lattice and nothing to worry about. It's referred to as the number of 'verts' because most of the functions that process the lattice are generic mesh processing functions that report any coordinates as 'verts' no matter what they actually are.

However, I'm getting some odd results with my latest test lattices...something is not working properly and I haven't yet tracked it down.

For the time being, you might want to stick with the 25.A version posted earlier in the thread, rather than the 25.D update.

I'm going to have to track down what broke, and why.
  • 0

#20
gerra6

gerra6

    Mega Toaster

  • Contributor
  • PipPipPipPipPip
  • 2,080 posts
OK...Figured it out.

Updating Main Files to 25.E
  • 0