fluidsToBlendShapes.mel

fluidsToBlendShapes is a script implemented in mel that connects with an expression the density of each cell of a fluid container with the multiplier of the blend shape of an object arrayed in a two-dimensional grid. In order to use the script:

BEFORE running the script do:
1. create an object to use a seed and name it theSeed
2. dublicate theSeed up to 10 times and transform the dublicates at will. Name the new objects theTarget1, theTarget2 etc.
3. create as many fluids as the target objects and name them fluidMap1, fluidMap2 etc.
3a add to the fluid emitter(s) fields etc. this can be done/edited also after you run the script.

4. RUN the script.
in the generated UI:
5. enter the # of rows, # of clms, x step and y step values. the first couple of numbers have to be less or equal to the resolution of the fluid (equal for better results).
6. enter the # of blendShapes value. It HAS to be equal to the number of target objects and the number of fluid containers.
7. hit ‘create field’.
8. the blendShape value of each created object is connected with an expression with the density of the respective grid cell of the fluid.

Download the script here (save link as…).

fluidsToBlendShapes.melDimitris Gourdoukis
0