Blender Python: WrapTo Projector

* Updated 6-28-09: Script was in need of cleanup, as well as better documentation, a thanks for the heads up goes to a user named Denver *

A python script for Blender that I have long wanted to perfect, but lacked the time. Also the function it performs is difficult to explain, it is similar to the current shrinkwrap modifier but it keeps the normal based displacement from destination surface roughly equivalent to the source. Meaning, with shrinkwrap, a pipe will be flattened, but with this script it still will be a pipe. I believe the image below is a perfect example for its usage, using it to align some “pipes” to a generated terrain.

Since this script is kind of difficult to use, the following is a quick tutorial on basic usage:

- First step to using this script is installing it into your blender’s scripts directory. Once is copied there you can access it from the Object’s Scripts sub-menu.

- Now you need to have the object you wish to project to ready for action. Make sure there is at least one UV layer selected.


- Use the first feature of the script called “Create UV line guide from selected”, and an object made entirely of lines should be created, that is your “uv guide”.

-You have two choices, selecting the uv guide object going into edit mode and creating your mesh that way, or using another mesh and joining it to the uv guide mesh.
Either way the “Source Mesh” must include the uv guide for the script to function properly.


- Time to use the “Process wrap-project with selection” function while having the source and destination meshes selected. Depeding on the number of faces of the objects this function can be slow. Progress updates will be shown in the console window as text.

- Now you should have the object wrapped around the object correctly, if errors occur, make sure that you stayed within the uv space where visible faces are. You can delete, adjust and reprocess until satisfied. In the example below taken from the included EggSample.blend file, the generated mesh was moved for better visibility, in reality the script generates the object in the same space as the “Destination Mesh”.


In addition to the tutorial above, I thought of a better way to explain why this script is necessary, and what are the main benefits. Imagine that you are trying to create a pipe like object on a mesh’s surface that curved to the topology. You currently have three choices: Shrinkwrap(Retopo), Displace Map, and Wrap To Projection. Retopo flattens all dimensions, displacement allows only half of the dimensions, while using this script you can keep the top and the bottom of the pipe without distortion.


One Comment since June 28th, 2009.

  1. This is something I’ve been looking for off and on for some time. I just tried a test, wrapping a cluster of leaves around the end of a hemisphere, and it works! Be patient, though – it can take some time to finish.

    Thanks, DeMoN, this is great!

Leave your Comment

If your comment appears to be spam, offtopic, or offensive, it will be subject to automated or manual removal without warning, notice, or apology.

©2001-2009 David Negulici · All Rights Reserved · Sitemap · Log in · Powered by WordPress

Valid XHTML 1.0 Transitional