Maya Shader Utilities - Real Time Effects
Can you create an animated glow effect in Maya without key framing based on distance between two objects?
Watch the below video. This effect was created using Distance Between & Set Range utilities in Maya.
Scroll down to see detailed steps to learn how to use the utilities.
1. Write down your concept. Here's my concept: When Object X is near to Object Y the glow increases gradually. Object Y, for example, can be an object that insects are attracted to. Object X could an insect that glows when it is excited to be around the object.
2. Create a Sphere (pShere1, this would be the object) and another Sphere (pSphere2, this would be an insect) which is animated using a motion path.
Rather than key framing the glow effects, we can use utilities for real time effects.
3. Use the below shader utilities.
- DISTANCE BETWEEN - To calculate the distance between two objects.
- SET RANGE - To set a range from which distance the glow should start increasing.
4. Drag the source(pSphere1)and object(pSphere2) from outliner to HyperShade Work Area.
Click on DISTANCEBETWEEN under the General Utilities
- Connect pSphere1.WorldMatrix->InMatrix1
- Connect pSphere2.WorldMatrix->InMatrix2
Now we can take the distance value and set a range using SETRANGE Utility. Why? To make sure that the object glows within a certain range from the source.
Click SETRANGE utility. This utility takes a range of values
For Example. we have 0 - 100 range in old MIN & MAX. And 0 - 1 in MIN and MAX
Click SETRANGE utility. This utility takes a range of values
For Example. we have 0 - 100 range in old MIN & MAX. And 0 - 1 in MIN and MAX
- for 0 output = 0
- for 50 output = 0.5
- for 100 output = 1
For this tutorial, connect distanceBetween1.distance->setRange1.valueX (expand Value)
In SETRANGE Attributes
In SETRANGE Attributes
- Min -> Give the maximum glow value that object will have when its near the object (Avoid > 2)
- Max -> 0
- Old Min -> 0
- Old Max -> The Maximum distance where the glow will start.
Connect setRange1.outValueX->glowIntensity (Glow intensity of ball Shader)
If you want the object to start glowing when it is at 20, enter 20 in Old Max.
Here is rendered output video:
If you want the object to start glowing when it is at 20, enter 20 in Old Max.
Here is rendered output video:
Explore and use these utilities for your imaginative concepts.
Like this post? Share it!
Thank you very much.it was very useful.
ReplyDeleteYour Welcome! Share my blog with your friends.
Delete