WillyWonka
05-20-2004, 04:16 AM
I'm trying to make a mel script so that when rain particles hit my ground mesh they draw little circles in a texturemap which is used to transition the texture from a dry texture to a wet texture.
I have code that works which enables me to do roughly what I want using a 2D fluid, but I'm having trouble making the points larger (or any different size for that matter).
float $colU = particleShape1.collisionU;
float $colV = particleShape1.collisionV;
float $dropSize;
int $indexU;
int $indexV;
if ($colU > 0) {
$dropSize = 25;
$indexU = (float)fluidTexture2DShape1.resolutionH*$colU;
$indexV = (float)fluidTexture2DShape1.resolutionW*$colV;
setFluidAttr -xi $indexU -yi $indexV -at density -ad -fv $dropSize fluidTexture2DShape1;
}
This code draws a point in the density but increasing $dropSize does nothing from what I can see.
I think (Maybe I'm wrong) I want to emit the "color" but all my attempts to do so ended in failure.
Can anyone help?
I have code that works which enables me to do roughly what I want using a 2D fluid, but I'm having trouble making the points larger (or any different size for that matter).
float $colU = particleShape1.collisionU;
float $colV = particleShape1.collisionV;
float $dropSize;
int $indexU;
int $indexV;
if ($colU > 0) {
$dropSize = 25;
$indexU = (float)fluidTexture2DShape1.resolutionH*$colU;
$indexV = (float)fluidTexture2DShape1.resolutionW*$colV;
setFluidAttr -xi $indexU -yi $indexV -at density -ad -fv $dropSize fluidTexture2DShape1;
}
This code draws a point in the density but increasing $dropSize does nothing from what I can see.
I think (Maybe I'm wrong) I want to emit the "color" but all my attempts to do so ended in failure.
Can anyone help?
