I have created an object and set it's opacity to 30% however I want the object to get less opacity as it goes down how can I apply gradient opacity?
I will assume you have an object, that you want to mask - although your question is not really very clear. So, this is a guess. But anyway, this technique works on vector objects and raster objects in Illustrator.
I used this image as an example:
Draw a rectangle with no stroke, over the object to be masked - I assume if it's a vector, then object itself should be grouped.
Use the Gradient Tool on the rectangle to apply a gradient that goes from 100% white to 100% black.
When you make the mask, the white end of the gradient will be 100% opaque, and the black end will be 100% transparent.
Select both the object for masking, and the rectangle with the gradient.
Open the Transparency panel - if you cant already see it, click
Transparency. Hit the
- Then you can perhaps add a colour fill to a new rectangle and send it to the back, to use as a background. Then you will be able to see the transparency of your masked object over the background.
Open the gradient panel in Illustrator.
You can find the colors which you have used for the gradient.
Then click one of the colors you have to reduce the opacity in the options below:
If you cant find the gradient panel in the right side widget, please go to Window and click on Gradient for the panel to appear.