Skip to main content
Known Participant
July 20, 2010
Answered

Metal Emboss effect

  • July 20, 2010
  • 2 replies
  • 1326 views

Hi, I want to create a filter which would make an image look like the above when applied with the filter. but unable to understand how to go abt it. Can I get some help here.

Thanks,

Ayush

This topic has been closed for replies.
Correct answer Andrei1-bKoviI

Try ConvolutionFilter.

2 replies

Known Participant
July 22, 2010

Thank you guys.. you replies helped me a lot.. thanks a ton..

Andrei1-bKoviICorrect answer
Inspiring
July 20, 2010

Try ConvolutionFilter.

Known Participant
July 21, 2010


Hi Andrei,

Thanks for the help. It was a lot of help for me.

This is what is am using as of now and have tried many combinations with both the filter.

var matrix:Array = new Array();
            matrix=matrix.concat([.5,.5,0,.5,0]);// red
            matrix=matrix.concat([.5,.5,0,.5,0]);// green
            matrix=matrix.concat([.5,.5,0,.5,0]);// blue
            matrix=matrix.concat([0,0,0,.5,0]);// alpha
            var my_filter:ColorMatrixFilter=new ColorMatrixFilter(matrix);


            var filters:Array = new Array();        
            var cf:ConvolutionFilter = new ConvolutionFilter(3,3,new Array(-2,-1,0,-1,1,1,0,1,1),0); 
           
            filters.push( cf ); 
            filters.push( my_filter ); 
            m_output.filters = filters;

the attached image shows the current and required output. not sure how to get the required effect. if you can sugest something on this it would be of great help.

Thanks,

Ayush

July 21, 2010

I think part of your problem is changing the alpha to .5 - you just need to do a proper grayscale first. Then do the convolution. I think this should get you a bit closer:

var greyScale:Array = [.33, .33, .33, 0, 0, .33, .33, .33, 0, 0, .33, .33, .33, 0, 0, .33, .33, .33, 1, 0];

var cmf:ColorMatrixFilter = new ColorMatrixFilter(greyScale);

var cf:ConvolutionFilter = new ConvolutionFilter(3,3,new Array(1,1,0,-1,1,1,-1,-1,-1),1,100);

m_output.filters = [cmf, cf];

Note the bias of 100 in the convolution filter.