CG Addict
  • Home
  • Products
    • fStretch 2 for Maya>
      • Product Overview
      • Demo Version
      • Tutorials / Examples
      • Documentation
      • The Albert Project
      • Buy Now
  • Contact
  • About
    • The People Behind>
      • Matthieu Fiorilli
      • Christine Houle

fStretch 2 documentation

Table of contents

The Idea

The Menu

    Create fStretch
    Connect Mesh
    Paint
    Tools
    Register...
The node's attributes

    Tension Based Deformations
    Angle Based Deformations
    Wrap
    Color Per Vertex
    Acceleration
    Node Behavior
    Extra Attributes

  • The idea
 
The idea behind the plug-in is to be able to drive "blendShapes" that are turned on and off based on the tension and angle change that happens on a geometry. These "blendShapes" are sculpted to adjust the deformations.

  • The menu
 
Create fStretch


Applies the fStretch deformer on the selected polygonal geometry.
 
> Connect Mesh

Stretch
Connect the mesh that will be used when the main geometry stretches.
 
Squash
Connect the mesh that will be used when the main geometry squashes.
 
Bend In
Connect the mesh that will be used when the main geometry bend inside.
 
Bend Out
Connect the mesh that will be used when the main geometry bend outside.
 
Rest
Connect the mesh that represent the neutral pose of the main geometry. This mesh is automatically created when the fStretch setup is created. It can be reconnected later if the user did not create fStretch when the mesh was at rest.
 
 
> Direction

U Stretch
Connect the mesh that will be used when the main geometry stretches in the U direction based on the UVs of the main geometry.

V Stretch
Connect the mesh that will be used when the main geometry stretches in the V direction based on the UVs of the main geometry.

U Squash
Connect the mesh that will be used when the main geometry squashes in the U direction based on the UVs of the main geometry.

V Squash
Connect the mesh that will be used when the main geometry squashes in the V direction based on the UVs of the main geometry.

U Bend In
Connect the mesh that will be used when the main geometry bend inside in the U direction based on the UVs of the main geometry.

V Bend In
Connect the mesh that will be used when the main geometry bend inside in the V direction based on the UVs of the main geometry.

U Bend Out
Connect the mesh that will be used when the main geometry bend outside in the U direction based on the UVs of the main geometry.

V Bend Out
Connect the mesh that will be used when the main geometry bend outside in the V direction based on the UVs of the main geometry.

 


> Paint

Envelope
Allows the user to paint the envelope of the deformer. The envelope control if the plug-in is enabled or not on each vertex.

Tension Range
Allows the user to paint the tension range. This attribute controls how much distance needs to be meet in order to fully enable the stretch and squash shapes.

Angle Range
Allows the user to paint the angle range. This attribute controls how much angle change needs to be meet in order to fully enable the bend in and bend out shapes.

Tension Smooth
Allows the user to paint the tension smooth. This attribute controls how much the tension will be smoothed. Beware that what is actually being smoothed is the tension which drives the stretch and squash meshes. It's not the meshes themselves. If you desire to smooth the geometry itself, please refer to the relax attributes.

Angle Smooth
Allows the user to paint the angle smooth. This attribute controls how much the angle change values will be smoothed. Beware that what is actually being smoothed is the angle change values which drives the stretch and squash meshes. It's not the meshes themselves. If you desire to smooth the geometry itself, please refer to the relax attributes.

Tension UV Direction
Allows the user to paint the tension UV direction. This attribute controls whether the stretch and squash shapes will be activated if the geometry deforms in the U or V direction based on the geometry's UVs. When at 0.5, the shapes will be activated in both U and V directions. At 0, they will only be turned on in U direction and finally, at 1, they will be turned on in the V direction.

Angle UV Direction
Allows the user to paint the angle UV direction. This attribute controls whether the bend in and bend out shapes will be activated if the geometry deforms in the U or V direction based on the geometry's UVs. When at 0.5, the shapes will be activated in both U and V directions. At 0, they will only be turned on in U direction and finally, at 1, they will be turned on in the V direction.

Stretch
Grow / Shrink
Allows the user to paint the stretch grow / shrink. This attribute makes the stretch values grow on their surrounding areas and by doing so, enables the stretch shape where there isn't any stretching happening. If the attribute is negative, the values will shrinks. One should note that those values can be painted negatively. In situation where the user needs an attribute to grow onto another and is stoped by this last one, he might want to paint it negatively to allow the values to grow on it.

Squash
Grow / Shrink
Allows the user to paint the squash grow / shrink. This attribute makes the squash values grow on their surrounding areas and by doing so, enables the squash shape where there isn't any squashing happening. If the attribute is negative, the values will shrinks. One should note that those values can be painted negatively. In situation where the user needs an attribute to grow onto another and is stoped by this last one, he might want to paint it negatively to allow the values to grow on it.

Bend In
Grow / Shrink
Allows the user to paint the bend in grow / shrink. This attribute makes the bend in values grow on their surrounding areas and by doing so, enables the bend in shape where there isn't any bending happening. If the attribute is negative, the values will shrinks.

Bend Out
Grow / Shrink
Allows the user to paint the bend out grow / shrink. This attribute makes the bend out values grow on their surrounding areas and by doing so, enables the bend out shape where there isn't any bending happening. If the attribute is negative, the values will shrinks.

Stretch Relax
Allows the user to paint the stretch relax. This attribute smooth out the mesh's deformations in stretched areas.

Squash Relax
Allows the user to paint the squash relax. This attribute smooth out the mesh's deformations in squashed areas.

Bend In Relax
Allows the user to paint the bend in relax. This attribute smooth out the mesh's deformations in areas that are bended inside.

Bend Out Relax
Allows the user to paint the bend out relax. This attribute smooth out the mesh's deformations in areas that are bended outside.

> Tools
Create Displacement Network

Learn more about this tool here.
Bake Color Per Vertex

Learn more about this tool here.
> Register...
Opens the window that allows the user to register fStretch.


  • The node's attributes
 
> Deformations

Envelope

Controls the strength of the tension based and angle based deformations.

> Tension Based

Envelope
Controls the strength of the tension based deformations.

 
Pre Smooth
Controls how much the tension will be smoothed. "Pre" means that the smoothing will occur before the grow / shrink effect.

Beware that what is actually being smoothed is the tension which drives the stretch and squash meshes. It's not the meshes themselves. If you desire to smooth the geometry itself, please refer to the relax attributes.

Post Smooth
Controls how much the tension will be smoothed. "Post" means that the smoothing will occur after the grow / shrink effect.

Beware that what is actually being smoothed is the tension which drives the stretch and squash meshes. It's not the meshes themselves. If you desire to smooth the geometry itself, please refer to the relax attributes.

U Direction
This attribute controls whether the stretch and squash shapes will be activated if the geometry deforms in the U direction based on the geometry's UVs.

V Direction
This attribute controls whether the stretch and squash shapes will be activated if the geometry deforms in the V direction based on the geometry's UVs.

Stretch
Controls the strength of the stretch shape. One should think of it as the "Envelope" attribute on a standard blendShape node.

Range
Controls how much distance needs to be meet in order to fully enable the stretch shape.

Grow / Shrink
This attribute makes the stretch values grow on their surrounding areas and by doing so, enables the stretch shape where there isn't any stretching happening. If the attribute is negative, the values will shrink.

Relax
This attribute smooths out the mesh's deformations in stretched areas.

Squash
Controls the strength of the squash shape. One should think of it as the "Envelope" attribute on a standard blendShape node.

Range
Controls how much distance needs to be meet in order to fully enable the squash shape.

Grow / Shrink
This attribute makes the squash values grow on their surrounding areas and by doing so, enables the squash shape where there isn't any squashing happening. If the attribute is negative, the values will shrink.

Relax
This attribute smooths out the mesh's deformations in squashed areas.

Tension Falloff
Allows the user to accurately control how the stretch and squash shapes are being enabled with the help of a curve.

Stretch Falloff
Allows the user to accurately control how the stretch shape is being enabled with the help of a curve.

Squash Falloff
Allows the user to accurately control how the squash shape is being enabled with the help of a curve.

> Angle Based

Envelope
Controls the strength of the angle based deformations.

Pre Smooth
Controls how much the angle values will be smoothed. "Pre" means that the smoothing will occur before the grow / shrink effect.

Beware that what is actually being smoothed is the angle values which drives the bend in and bend out meshes. It's not the meshes themselves. If you desire to smooth the geometry itself, please refer to the relax attributes.

Post Smooth
Controls how much the angle values will be smoothed. "Post" means that the smoothing will occur after the grow / shrink effect.

Beware that what is actually being smoothed is the angle values which drives the bend in and bend out meshes. It's not the meshes themselves. If you desire to smooth the geometry itself, please refer to the relax attributes.

U Direction
This attribute controls whether the bend in and bend out  shapes will be activated if the geometry deforms in the U direction based on the geometry's UVs.

V Direction
This attribute controls whether the bend in and bend out shapes will be activated if the geometry deforms in the V direction based on the geometry's UVs.


Bend In
Controls the strength of the bend in shape. One should think of it as the "Envelope" attribute on a standard blendShape node.

Range
Controls how much distance needs to be meet in order to fully enable the bend in shape.

Grow / Shrink
This attribute makes the bend in values grow on their surrounding areas and by doing so, enables the bend in shape where there isn't any bending happening. If the attribute is negative, the values will shrink.

Relax
This attribute smooths out the mesh's deformations in areas that are bended inside.

Bend Out
Controls the strength of the bend out shape. One should think of it as the "Envelope" attribute on a standard blendShape node.

Range
Controls how much distance needs to be meet in order to fully enable the bend out shape.

Grow / Shrink
This attribute makes the bend out values grow on their surrounding areas and by doing so, enables the bend out  shape where there isn't any bending happening. If the attribute is negative, the values will shrink.

Relax
This attribute smooths out the mesh's deformations in areas that are bended outside.

Angle Falloff
Allows the user to accurately control how the bend in and bend out shapes are being enabled with the help of a curve.

Bend In Falloff
Allows the user to accurately control how the bend in shape is being enabled with the help of a curve.

Bend Out Falloff
Allows the user to accurately control how the bend out shape is being enabled with the help of a curve.

> Advanced

Counter Sharp Areas
Angles values tend to change more on concave and convex areas. This attribute prevent that effect by controlling the transformation of those values with a curve attribute. If one need to achieve this effect, he should put the extreme right handle of the curve to a value of one and tweak the resulted curve if necessary.

 
> Wrap
Wrap
The way fStretch works is that it starts with the rest mesh and applies the stretch, squash, bend in and bend out shapes onto it based on how the geometry moved. Once this is done, it wraps it to the final mesh to match the pose. It is very important that the deformations are done in that order and thus, this is why a wrap was implemented in the plug-in.

There are two reason why the wrap can be turned off. First, it is possible to make a working fStretch setup that instead of using wrap, has the same deformers on the main geometry and all the stretch, squash, bend in and bend out meshes. Doing such a setup is harder to maintain but result in a speed improvement since the wrap feature is one of the more expensive to calculate. The second reason is simply that a user might want to isolate the deformation that happens on his mesh to visualize them.

Smooth Radius
This feature controls the behavior of the wrap. The higher it is, the smoother the wrap is, but the longer it is to calculate. Beware that this is the most expensive feature on the plug-in. One might want to rise up this feature at render time.

> Optimization

One Tri Per Face
This feature makes a big impact on the speed of the plug-in. If you put it on, it is faster but the deformations arising of the wrap are less exact. If you put it off, the deformations are more precise but the plug-in get slower.

In a more detailed point of view, the wrap feature has to cast each point of his geometry onto the main geometry in order to work. By doing so, it divides the mesh into tris and cast a ray from each of them. If one tri per face is deactivated, it will take all the tris on each faces. One might want to deactivate this feature only at render time.


> Color Per Vertex

Draw Color Per Vertex
Allows the visualization of the tension and angle changes on the geometry.

Color Display
Here, the user can choose if he wants to see the tension, the angles change or both.

Tension Color Contrast
Allows the user to change the contrast of the displayed tension.

Angle Color Contrast
Allows the user to change the contrast of the displayed angle change.

Force Color Refresh
Most of the time, Maya is not able to redraw the color per vertex each time fStretch evaluates. This feature forces it.

Tension Color Ramp
Allows the user to choose the color which will be used to draw the tension onto the geometry.

Angle Color Ramp
Allows the user to choose the color which will be used to draw the angle change onto the geometry.


> Acceleration

Use All Available Processors
Allows fStretch to take full advantage of multithreaded processors, which result in tremendous speed up on most recent ones.

If speed is an issue, one might also want to take a look at the one tri per face feature and turn off the angle envelope if it's not used.

Number Of Processors To Use
The user can change how many processors are used by fStretch.


> Node Behavior

Caching
Maya related feature. Please see Maya documentation.

Node State
Maya related feature. Please see Maya documentation.

Display Warnings
Displays all warnings related to the plug-in. This includes windows and script editor warnings.


> Extra Attributes

Scale Factor
This attribute should be linked to the scaling affecting the geometry on which fStretch is. It makes the deformations follow the scale happening on the whole mesh.



Create Displacement Network

This tool is used to create a network of nodes that will drive the displacement of a given mesh with it's related fStretch node. This way, not only can fStretch drive deformations that happens on the mesh you work with inside Maya, but it can also drive very fine deformations that will happen in the displacement maps.

The way this work is that fStretch switch between one displacement file to another based upon the tension and/or angle change in every area of the geometry. One can choose to have this effect happening only for the tension, only for the angles or both. If, for example, this is to be done upon the effect of the tension, one should generate 3 displacement maps out of his favorite sculpting software (ZBrush, Mudbox, 3D-Coat, etc. ) . One map will be needed when the mesh is at it's neutral pose, one when it stretches and one when it squashes. Beware that all those maps need to be generated from its own low-res mesh which happen to be the ones used inside Maya.

One thing that need to be wisely considered is how the tension and/or angle change will be connected into this displacement network. Since every renderer has it's own way of working, a direct connection is not possible here. Instead, two option are offered with the plug-in. The first one is to attach a pre/post render MEL script that create and connect the tension/angle files before each render. The second one is to bake the tension/angle maps before rendering using fStretch's Bake Color Per Vertex tool. Since it is recommended to use the first method, it was activated by default in this window. One should take good care of managing correctly his pre/post render MEL scripts though.

- When rendering with Mental Ray, it is advisable to use the "Approximation Editor" tool in order to get better displacement.

Tension Based
If this is enabled and angle based isn't, the displacement network that will be created will only drive maps with the tension. If angle based is also enabled, the network will drive maps with the tension and the angle change.

Angle Based
If this is enabled and tension based isn't, the displacement network that will be created will only drive maps with the angles. If tension based is also enabled, the network will drive maps with the tension and the angle change.

Attach Pre/Post render MEL scripts
Attach Pre/Post render MEL scripts. The Pre render script will create and connect the tension and/or angle maps. The Post render script will delete the files that have been created. One can access those scripts in Render Settings -> Render Options.

Append existing Pre/Post render MEL scripts

When turned on, the Pre/Post render MEL scripts created will be added to any existing MEL scripts that are already there. When turned off, the scripts will be overwritten.

Mesh
The mesh onto which the displacement network have to be built upon.

fStretch Node
The fStretch node from which the tension and angle change will be used in the displacement network.

Shading Group
The shading group into which the displacement will be connected to.


> Displacement Maps

Neutral
This is the displacement map which will be used when the mesh is at it's neutral pose.

Stretch
This is the displacement map which will be used when the mesh stretches.

Squash
This is the displacement map which will be used when the mesh squashes.

Bend In
This is the displacement map which will be used when the mesh bends inside.

Bend Out
This is the displacement map which will be used when the mesh bends outside.

> Pre/Post render MEL scripts
Export Value
Maya related feature. Please see Maya's artisan tool feature.

Image Format
The format of the files which will be written.

Map Size
The dimension of the images that will be created.

Tension / Angle file name
The name of the file that will be generated.

Padding
The frame padding which will be used to write down files. For example, if it's set to 4 and we are at frame 1, the file will be named file0001.

Delete files after the render
If a render has been done and the Pre render MEL scripts have written files to be used for tension/angle, this feature will delete those files when the render is complete.

Path
The location where the images should be written.


Create Displacement Network

Launch the script that creates the displacement network.



Bake Color Per Vertex

Given a geometry that has fStretch on it, this tool pass through each frame of an animation and output it's tension's or angle's color per vertex into a series of images. Those images might then be used in order to drive displacement maps, textures' colors, etc.

Export Value
Maya related feature. Please see Maya's artisan tool feature.

Image format
The format of the files which will be written.

Start Frame
The frame at which the tool will start baking the maps.

Map Size
The dimension of the images that will be created.

End Frame
The frame at which the tool will end baking the maps.

Name
The name of the files that will be generated.

Path
The location where the images should be written.

Force Refresh
Forces the tension or angle display to be refreshed.

Bake Color Per Vertex
Launch the procedure where this tool pass through each frame and generate an image based on the visual display of the tension or angle of the selected geometry.


IMPORTANT NOTE CONCERNING DRIVING DISPLACEMENT AND BATCH RENDERS:

Don't forget to put fStretch Auto-load ON when you batch render with fStretch. Otherwise the batch render process might not load fStretch and output an error.

The Pre/Post render MEL scripts are not currently working in batch mode because they depends on elements that comes from the UI of Maya which aren't loaded in batch mode when Maya exports the maps. We are currently looking for a solution on this issue with Autodesk. In order to drive displacement maps in batch mode, one should bake the maps with the "Bake Color Per Vertex..." tool that comes with fStretch for the moment. The Pre/Post render MEL scripts are still very useful for quickly previewing the results.

IMPORTANT NOTE CONCERNING THE CREATION OF FSTRETCH

  • Don't forget to always create fStretch when you are at your neutral pose.
  • Make sure you don't have any vertex overlapping on your model before applying fStretch. Overlapping vertex is two or more vertex that are at the exact same position (x,y,z) in space. The same goes for the UVs.


(c) CGADDICT - all rights reserved
  • Home
  • Products
    • fStretch 2 for Maya>
      • Product Overview
      • Demo Version
      • Tutorials / Examples
      • Documentation
      • The Albert Project
      • Buy Now
  • Contact
  • About
    • The People Behind>
      • Matthieu Fiorilli
      • Christine Houle