Wiki

Clone wiki

OTools / Texture to skin feature

This feature allows to define vertex/bone connection (skinning) in 2D textures. It's available in OTools 0.177.

Import

When you import to .O, use -uvSkinning <[texture name=]path to folder>

The folder must contain images for each bone which must affect the mesh.

When texture name is not defined, this folder will be used for all textures.

Some examples:

-uvSkinning "C:\Users\User\Desktop\face"
-uvSkinning face="C:\Users\User\Desktop\face"
-uvSkinning face="C:\Users\User\Desktop\face",hair="C:\Users\User\Desktop\hair"

If your model doesn't have the skeleton, you also need to use -bonesFile argument.

-bonesFile data\remap\bones_rugby.txt -skeletonData none

There are also some additional options:

-uvSkinningDefaultBone <[texture name=]bone name>

Defines the bone for regions which were not assigned to any bone. If default bone is not defined, empty regions are assigned to bone ID 0.

-uvSkinningMode <0 or 1>

The mode controls how weights are distributed in case if there are few bones affect the vertex.

For example in mode 0 (default) if we have this distribution:

Bone 1 - 0.2
Bone 2 - 0.2

The final distribution will be

Bone 1 - 0.5
Bone 2 - 0.5

But if you change the mode to 1 and define the default bone (for example -uvSkinningDefaultBone Bone 3), the bone distribution will be:

Bone 1 - 0.2
Bone 2 - 0.2
Bone 3 - 0.6

Quick tutorial

  1. Model without skinning and skeleton

4lEOd0w.png

  1. Model UVs

4yxhe6p.png

  1. Generated skinning maps

f2nO815.png

  1. Importing to .O

5YZ1LwL.png

  1. Model with skeleton and skinning

eLTvXCb.png

Generating texture maps

You can autogenerate UV>Skinning maps from existing model, using "Generate UV Skinning Maps".

This mode has following options:

-uvSkinSetGenResolution <ResXxResY>

Output texture resolution (default 1024x1024)

-uvSkinSetGenTextures <textures>

List of texture names for which texture maps must be generated. By default texture maps are generated for all textures.

-uvSkinSetGenTextures face,hair

Updated