Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
MAYA: MAYA ForumMAYA TutorialsMAYA

Image sequence / math question...

Cow Forums : MAYA

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
Image sequence / math question...
by stephen reber 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 =]

Respond to this post   •   Return to posts index

Re: Image sequence / math question...
by Michiel Duvekot 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.

Respond to this post   •   Return to posts index

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

Hey Michiel =]

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

Best...

Stephen =]

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]