From BlenderWiki

Jump to: navigation, search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on wiki.blender.org.

Data Transfer

Notes: No pictures for now…

This tool is currently available as an operator (Ctrl-Shift-T) and modifier, and only works on mesh objects. They roughly do the same things, here are the key differences between them:

  • Operator only transfers one type of data at a time, while a single modifier can transfer several types at once.
  • Operator works in Object mode, and uses active object as source, and all other selected ones as destinations.
  • Modifier never creates needed data layers itself, its UI provides a button calling an operator to do so though.

Mapping

This is the crucial part of this tool - how to map items from the source mesh to their counterparts in destination mesh. Each item type (vertex, edge, etc.) has a set of mapping methods. Note you can also specify a maximum distance between source and destination (if you are e.g. transferring from a 'hand' mesh onto a whole body one, this helps avoiding the whole body trying to get data from the hand, e.g.), and for projected mapping, a ray radius (especially useful when projecting against vertices and edges, to help get meaningful hits).

Vertex Mapping

  • Topology: source and destination must have the same amount of vertices, this is a '1 to 1' basic mapping.
  • Nearest Vertex: For each destination vertex, copy data from its closest source counterpart.
  • Nearest Edge Vertex: Same as above, but use source’s nearest vertex of source’s nearest edge.
  • Nearest Edge Interpolated: Use nearest point on nearest source edge, interpolates data from both source edge’s vertices.
  • Nearest Face Vertex: Use source’s nearest vertex of source’s nearest face.
  • Nearest Face Interpolated: Use nearest point on nearest source face, interpolate data from all that source face’s vertices.
  • Projected Face Interpolated: Same as above, but use point on source hit by projection of destination vertex along its own normal.

Edge Mapping

  • Topology: source and destination must have the same amount of edges, this is a '1 to 1' basic mapping.
  • Nearest Vertices: Select source edge which vertices are nearest from destination edge’s vertices.
  • Nearest Edge: Select nearest source edge (using edge’s midpoints).
  • Nearest Face Edge: Select nearest source edge from nearest source face (again, using edge’s midpoints).
  • Projected Edge Interpolated: This is a sampling process. Several rays are cast from along the destination edge (interpolating both edge’s vertex normals), and if enough of them hit a source edge, all hit source edges’ data are interpolated into destination one.

Face Corner Mapping

  • Topology: source and destination must have the same amount of face corners, this is a '1 to 1' basic mapping.
  • Nearest Corner and Best Matching Normal: Chose source corner having the most similar normal with destination one, from those sharing the nearest source vertex.
  • Nearest Corner and Best Matching Face Normal: Same as above, but compare corners’ face normals instead of corners’ normals (aka split normals).
  • Nearest Corner of Nearest Face: Select nearest corner (i.e. vertex) from nearest source face.
  • Nearest Face Interpolated: Use nearest point of nearest source face, interpolate data from all that source face’s corners.
  • Projected Face Interpolated: Same as above, but use point on source hit by projection of destination corner along its own normal.

Islands

Currently, face corners are the only one facing the “islands” issue - UV islands. When transferring from a mesh having several UV islands, you do not want your destination faces “spreading” between those islands. This adds extra complexity (and hence, computation time) to the transfer, so you have a setting, Islands Handling Refinement, that controls how carefully that problem is being addressed.

Note results are not perfect yet, by far, this is a very complex topology problem.

Face Mapping

  • Topology: source and destination must have the same amount of faces, this is a '1 to 1' basic mapping.
  • Nearest Face: Use nearest source face…
  • Best Normal-Matching: Use source face which normal is most similar to destination face.
  • Projected Face Interpolated: This is a sampling process. Several rays are cast from the whole destination face (along its own normal), and if enough of them hit a source face, all hit source faces’ data are interpolated into destination one.

Available Data Types

Please note that “mark” (boolean) data types are especially hard to transfer in a “good” way - even more when it comes to edges, which are also the hardest items to get valid mapping for.

Vertex Data
  • Vertex Groups.
  • Bevel Weights.
  • Shape Keys are not available currently, this is TODO (may also depends on 2014 GSoC work).
Edge Data
  • SubSurf Crease.
  • Bevel Weights.
  • Sharp mark.
  • UV Seam mark.
  • Freestyle mark.
Face Corner Data
  • Vertex Colors (yes, those are actually face corner data, not vertex one…).
  • UVs (also handle UV face data (texture assignment), this is why you also have to set face mapping mode in this case).
Face Data
  • Smooth mark.
  • Freestyle mark.

Multi-Layers Data Type

For those data types (like vgroups, UVs, etc.), you have various methods to select source data, and how to affect/create destination one. Most options are rather self-explanatory, note not all options are available in all cases (e.g. modifier do not allow to use “active” layers, etc.).

You can also choose whether the operator is allowed to create new data layers or not (modifier never does, you have to hit Generate Data Layers yourself).

Mix/Replace Modes

You can also control how destination data are affected:

  • All: Replace everything in destination (note Mix Factor is still active).
  • Above Threshold: Only replace destination value if it’s above given threshold (aka mix factor). How that threshold is interpreted depends on data type, note that for boolean values this option fakes a logical AND.
  • Below Threshold: Only replace destination value if it’s below given threshold (aka mix factor). How that threshold is interpreted depends on data type, note that for boolean values this option fakes a logical OR.
  • Mix, Add, Subtract, Multiply: Apply that operation, using mix factor to control how much of source or destination value to use. Only available for a few types (vgroups, vcol).

The modifier can also use a vgroup for additional masking of affected areas.