home

[ Stretch Map 1.0 ]

Few months ago i spent a moment to code a stretch map VEX SOP for Houdini, using point clouds.
The OP measures the length of the edges of deforming geometry and stores the results in a point attribute map. This stretchMap can be used in many different ways. The main purpose is to feed a shader with information for local control over texture maps ( displacement, bump, specular, etc ), based on the deformation of the surface. Another very good idea is to use this stretchMap data to automatically recognize the areas with extreme deformations and to apply relaxation to their points ... and so on.

As all we know, one example is better than a thousand words, so take a look at the animation below.

 

 

The operator compares edge lengths of two geometry shapes with similar topology.
Just connect the deforming geometry to the first input of the stretchMap OP, then connect the rest ( non-deforming ) geometry to the second input.
At this point you should be able to see the stretchMap values in the spreadsheet panel.

 
The UI is really simple. "Point Group", "Number of Threads", "Edit VEX Function", "Re-load VEX Functions" are standart for every VEX SOP, so i am not going to comment on them.
  The specific for this stretchMap OP channels are:
- attribute - defines the name of the point attribute where the stretchMap data will be stored;
- multiply - allows global control over the stretchMap values;
- offset - defines the zero point between compression and stretching;
- min / max - for clamping the output values.
 

A full compression occurs when the length of an edge is half the default one. Respectivelly - we have full streching when the length of an edge is twice bigger than the default length.

 

[ DOWNLOAD ]