FORUMS: list search recent posts

Image sequence / math question...

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
stephen reber
Image sequence / math question...
on Oct 31, 2009 at 9:23:30 pm

Hey guys, I have an interesting one for ya.

I have an image sequence formatted in .tga with an alpha channel, 32 bit, that blinks transparent to opaque. What I'm looking to do is put the numerical value of 0-1 from the alpha of the image sequence and apply it to other attributes of my animation.

I know the alpha works, because I have the image sequence plugged into a lambert and it's transparency blinks.

I've tried a whole ton of things (using the connection editor) but nothing seems to work. The numerical value always seems to stay locked (on the attribute that the alpha is connected to) at either 1 or 0 throughout the image sequence animation.

Any thoughts or help would be great!!

Thanks in advance...

Stephen =]


Return to posts index

Michiel Duvekot
Re: Image sequence / math question...
on Nov 1, 2009 at 5:03:23 pm

The color or the alpha of an image is not a single value, so if you want to get one value that you can use for something else, as in for example, a the translation of an object, you have to tell Maya which pixel to look at. Maya has the colorAtPoint command for this purpose.

Here's an example of an expression that will set the .translateY of a cylinder to the alpha value of a texture.

float $u = pCylinder1.translateX;
float $v = pCylinder1.translateZ;

float $alpha[] = `colorAtPoint -o A -u $u -v $v file1`;
pCylinder1.translateY = $alpha[0];

By moving the cylinder in x or z, it picks up a different alpha value and sets the translateY accordingly.


Return to posts index

stephen reber
Re: Image sequence / math question...
on Nov 4, 2009 at 9:26:33 pm

Hey Michiel =]

Thanks for the help! I will give it a shot.

Best...

Stephen =]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]