Re: Generic bevel and emboss
Posted: 2010-07-29T21:14:19-07:00
My original implementation allowed different colors for highlights and shadows (and allowed varying transparencies for each), because I implemented my own version of hardlight by thresholding and applying compose overlay to highlights and compose multiply to shadows. But this was very complex (and so even slower) and had some issues of thresholding. So I simplified it when I figured out how to use -shade and then auto-level and then apply contrast change ( which changed the mid value from 50% gray ) by overlaying gray with the thresholded alpha channel as a mask to reset the mid values to 50% gray so that hardlight would work (as it relies upon 50% mid value for thresholding). Note only elevation angle of 30 degrees, creates a mid value of 50% and even then I modify it by using -auto-level and contrast change to get varying depth.
So right now, the answer is no. But with further work, it might still be possible to colorize the beveled area in the outer bevel case. I just assumed that that feature was likely to be used very little and especially did not need different colors for highlight and shadows. So for the sake of simplicity and better speed, I did not work on including that. I think I know how to add it in and will look into it tomorrow. Is it relevant only for outer bevel (and outer bevel part of emboss) or in all cases?
Note, I tried to emulate Photoshop's Bevel/Emboss layer style as much as practical. However, IM -morphology distance gets rather slow even for distances (widths) of 10; whereas PS has somehow implemented this or its equivalent in real time adjustment of its slider. I wish I knew how they did that.
P.S. It is interesting that the outer bevel wants to have a non-linear taper by default whereas the inner bevel was linear. In the outer bevel case I had to add a taper value that was the power of 10 used in -evaluate log to straighten it. It seems to be an effect of inverting the mask and getting the distance measure (or perhaps it just has to do with the shape of the black areas inverted to white. Anthony, do you have any idea why this happens?
So right now, the answer is no. But with further work, it might still be possible to colorize the beveled area in the outer bevel case. I just assumed that that feature was likely to be used very little and especially did not need different colors for highlight and shadows. So for the sake of simplicity and better speed, I did not work on including that. I think I know how to add it in and will look into it tomorrow. Is it relevant only for outer bevel (and outer bevel part of emboss) or in all cases?
Note, I tried to emulate Photoshop's Bevel/Emboss layer style as much as practical. However, IM -morphology distance gets rather slow even for distances (widths) of 10; whereas PS has somehow implemented this or its equivalent in real time adjustment of its slider. I wish I knew how they did that.
P.S. It is interesting that the outer bevel wants to have a non-linear taper by default whereas the inner bevel was linear. In the outer bevel case I had to add a taper value that was the power of 10 used in -evaluate log to straighten it. It seems to be an effect of inverting the mask and getting the distance measure (or perhaps it just has to do with the shape of the black areas inverted to white. Anthony, do you have any idea why this happens?