(This is a temporary page about this script, until I have time to write a clean one)
This script will help you to copy any vertex map from one mesh to another, even with completely different meshes structures.
It's working like a "projection" from the BG layer data to the FG layer data, so before running this script,
be sure to have a FG and a BG layer selected with some stuff inside.

For now, it's meant to be used with a low poly proxy mesh in BG layer and anything in FG layer.
But for the retopology case it could be the opposite, and maybe it could take some more time for the script to initialize and do its job.

Discontinous UVs are not well supported is the current version,
so a release date for a "final" version including that is not fixed yet.
Everything else should run smoothly (in the limits of the LScript language ^^).


18 October 2017 : Download the current beta v47 here
(Some changes have been made to the panel since the video capture or manual writing)


Weighter 2 by Alexandre Labedade from Petter Sundnes on Vimeo.





Weight:


Geometry :


etc...
Panel :Description :
Available maps (BG Layer) : List of all vertex maps found in the BG layer
Here you will find at least one vertex map called GEOMETRY, this stands for the actual vertices positions, and is used for retopology purpose.

Process list (FG Layer) : List of all vertex maps that will transfered to the FG layer
To move a vertex map from a list to another, use the and buttons.

Under each list view, you can find a list of weight maps that can be used as Blending or Alpha mask for the vertex map transfert :

Detecting these weightmaps may be time consuming depending on the number of vertices and weight maps available in the layer.
For now, they are automatically searched for the BG layer (since it should have less vertices) when the script is called, and they must be manually searched for the FG layer using the button.
I have to find a better way to do this, since the BG layer may also have a lot of vertices in case of retopology (or maybe put a refresh button for both layers)

Next to this list is a "Blending modes" list, by default on "Mask" :
These modes defines how the weight maps used for blending will affect the transfered vertex maps :
Mask : the weight map will be used as a binary mask for the transfert : 0 = no influence, <>0 = full influence.
Absolute : the absolute value (no negative values, so -100% become 100%) of the weight map will be used to influence the transfert.
Multiply : the current value of the weight map will be used to influence the transfert (so negative values will invert the transfert result).
Invert Abs. : the invert of the absolute value will be used : -100% or 100% become 0 and 0 become 100%
Negate : the inverse of the value will be used : 100% become -100% and -100% become 100%.

So, you can use different blend maps for the BG layer and the FG layer at the same time, wich can let you do some complicated blendings of vertex maps ;)
Parameters Tab :
Projection Mode : This let you choose between two different ways to copy vertex maps for Bg to FG layer.
Target Points Normal : The the vertices normals in the FG layer will be used to read the value from the BG layer mesh.
Target Points Normal

Projector polygon normals : The polygons normals from the BG layer will be used to write the values to the FG layer .
Projector polygon normals

By default, the value will be red/written only in one way, along the normals of vertices or polygons depending on the mode you select.
You can force the BG and FG layer to be seen as double sided by checking the corresponding boxes : and

When multiple polygons are influencing a same vertex, the values are automatically weighted according to their respective distances to this vertex (the nearest, the strongest). You can force the nearest polygon to have 100% influence (so all others are ignored) by checking the box. But, if multiple polygons are exactly at the same nearest distance, the average of their values will be used.

Of course, if only one polygon is affecting the vertex, it will stay at 100% influence at any distance.

The option defines an automatic falloff according to the the direction of the vertices and polygons normals : if the vertex normal facing the polygon normal, influence is 100%, and 0% if it's perpendicular (so like the well known "incidence angle")
When activated, a blending modes list will be shown, like the ones found for the layers (except the Mask mode)
Their is a special case for Vertex Color Map, where you can choose if the blending affects RGBA, RGB only or Alpha only.

The option will do a normalization on the weight values affected to each vertex, so the total weight on each will always be 100%.
NB : this only works with the currently selected weightmaps in the panel : if other weightmaps are already influencing these vertices, they will not be taken in the normalization process.
Options Tab :
: I recommend to keep this option activated, if not, every polygon in the BG layer will be considered as a "flat" projector, then some vertices in FG layer could be missed.
Here are some picture to illustrate this :



When doing retopology using the special "GEOMETRY" vertex map, you can choose if the result of the retopology will directly affect the actual vertices positions, by selecting the "Geometry" button, or if will be saved as a new Morph Map, wich name is defined in the input field just below :
NB : is a morph map with this name already exists, it will be overwritten.
[EDIT] : since beta 32, direct copy of values to the current mesh is disabled, all copies will be made in morph maps

General notes :
- IMPORTANT : You may encounter some problems with discontinous UV maps, see here for a solution
- After processing, all unaffected vertices will be selected.
- Some bugs left to track ;)


Tips :
- When using the GEOMETRY vertex map for retopology, most of the time, Point normals projection (FG) works better than Polygons normals (BG)
- A temporary Morph maps could be used for retopolgy to help tweaking some problematic areas : if the base mesh doesn't fit correctly into the final shape you have in BG layer, you can create a temporary morph map to tweak the FG mesh and then run the script with this Morph map selected, so you'll not break your base FG mesh to let it better fit into the BG. Anyway, be careful when juggling with morph maps, it's easy to forget that one is selected, and you may break your work ;) (After 10 years of LW, I'm still doing this mistake...)
- If you select some vertices or polygons before running the script, only them will be affected.