You are here

Selection bevel

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
AttachmentSize
bevel2_1.py.txt29.89 KB
bevel1_53.py.txt30.14 KB

Version 2.1 is here!

This script creates a bevel in the shape of the selection. The script appears as Filters > Distorts > Bevel. The bevel is created on it's own layer. You can adjust various things, like width, azimuth (light angle), etc.
Comments and feedback are welcome.

NOTE!!
When you download the script, you have to rename it so that the extension is ".py" and not ".py.txt", otherwise it will not work in GIMP.

Screenshots:

Update history:

V 2.1:
- Completely rewritten rendering. The bevel is created differently now, giving more consistent results, resulting in less artifacts for wide bevels.
- Removed options "feather" and "pre-blur" as redundant, with the new rendering these aren't necessary.
- The gloss option is now adjustable, with a 0-10 scale.
- Added option "intersect with alpha": when enabled, the alpha channel of the active layer is intersected with the selection to get the bevel shape. You can see an example in the 2nd screenshot, where a rectangular selection was used.
- After using preview, the final bevel no longer appears at the top of the layer stack. The bevel layer now always appears above the active layer. If no layer is active, the bevel appears at the top of the stack.

V 1.53:
- Slight update that improves the rendering of the bevel. Specifically, the feather step is now done before the shrink selection step, this way the adjustments are more accurate for places where the selection is very narrow.

Version 1.52:

- A "gloss" function has been added. It makes the bevel "glossy".
- repeat effect (ctrl-f) now functions properly. Also, non-interactive mode (starting the script from console) works now.

Version 1.5:

- Now with a completely new, compact interface!
- Now with a preview function!

Special Thanks to the makers of layerfx.py and high_end_sharpen.py, I've learned a lot from your plugins.

Bevel 1.41 is here! Enjoy!

- You can now select inner or outer bevel, as you can see from the image above.
- The shape options have been replaced with a slider that lets you adjust the shape more accurately. A negative value is more dimpled, a positive value is more puffed up/round, while zero is the same as the old "angular" setting.
- Downwards bevels now appear as they are supposed to, as you can see from the image above.
- The bevel layer is now created above the current active layer as is supposed to.
- The layer name is now set to "Inner bevel" or "Outer bevel" according to the inner/outer setting.

Major update! version 1.3:
- Rendering of the bevel has been improved significantly. Most notably, the pre-blur and post-blur settings do not cause a gap in the bevel's outer edge on the higher settings anymore. This enables you to create smoother bevels.
- New shape option added: "Angular steep" which is the same as angular but steeper. Hard to explain, try for yourself.
- The default settings have been adjusted again. This should make using the script easier.

Update - version 1.2:
- I've added the options to select the layer mode from Normal, Hard/Soft light and Grain merge. Those are the modes I most often use with bevels, so it makes sense to me. I don't know how to add a drop-down menu yet, when I figure that out I can add all of the layer modes.

- fixed the bug that resulted in empty layers if the width was wider than the selection. It now simply creates a bevel that fills the whole selection.

- modified the way downwards bevels are created slightly. It's still not quite there yet, it still leaves a sort of border around the bevel. But you can just use an opposite angle and select up if you need downwards bevels.

- modified the default values.

Update - version 1.1: I added options to apply a blur to the bevel both before and after the emboss function. The options are named "Pre-blur" and "Post-blur", respectively. I also improved the interface, there's now radio buttons for Up/down directions. The "down" direction doesn't function quite as I want yet, I'll be working on it...

Code License: 
GIMP Version: 
Scripting Engine: 

Comments

Im using Gimp 2.6.11 and Python 2.6.5. Ive made sure to remove the ".txt" from the file name. Ive uninstalled and reinstalled Gimp and Python several times. No matter what I do I cant get Gimp to recognize Bevel 2.1. In frustration I tried Bevel 1.53 and it worked on the first install.

error or problem trying to load bytes and pixels wordtart python file.

Major update! With new features, lots of bugs and glitches fixed.

- Completely rewritten rendering. The bevel is created differently now, giving more consistent results, resulting in less artifacts for wide bevels.
- Removed options "feather" and "pre-blur" as redundant, with the new rendering these aren't necessary.
- The gloss option is now adjustable, with a 0-10 scale. 5 corresponds to the old gloss function. 6-10 gives even more gloss, may cause weird results... the gloss is now also applied before the blur, to give a smoother result when it is used.
- Added option "intersect with alpha": when enabled, the alpha channel of the active layer is intersected with the selection to get the bevel shape. You can see an example in the 2nd screenshot, where a rectangular selection was used. Without this option, only the selection is used, as usually.
- After using preview, the final bevel no longer appears at the top of the layer stack. The bevel layer now always appears above the active layer. If no layer is active, the bevel appears at the top of the stack.

How do I download and install this plugin? I am new to Gimp and have no clue how to work with its plugins. Thanks.

If you're using windows, you need to install python and then reinstall gimp so that the python package is included. There's a tutorial on installing python-gimp for windows here:

http://www.gimpusers.com/tutorials/install-python-for-gimp-2-6-windows

I downloaded and installed Python and GTK as directed and I still do not have the bevel. Is there anything else I need to do?

By the way, yes I am using Windows XP.

http://registry.gimp.org/node/25007#comment-11384

Python for Windows is hit and miss for installing, because we don't know what all you have done versus what you need to do. It's not a simple matter of just simply installing Python and then everything miraculously works, you also have to re-install GIMP so that the program can find the Python modules when installing, etc.

If you have done all that is mentioned in the comment I linked to, and you have Python console showing in the GIMP menu under Filters, etc., then it's a matter of where the file is placed and whether or not it needs to have permissions (admin rights) activated for it.

I hope this helps.

I followed the instructions very closely how to install both Python and PGK. Yes, Python-Fu is in the Filters menu but all that shows is console.

Thanks for all the help. It was very much appreciated.

wait there is also a bug in the registry software so a damn .txt extension is automatically added to all new script hosted here...so as example script.py become script.py.txt
I think is this your problem, to solve just remove the .txt extension

Is it working for you now?

When Python console shows in the GIMP Filters menu, that's an indicator that Python is installed. There is one overlooked issue, though. GIMP 2.6.11 requires Python (2.6.5 or 2.6.6). The newer Python 2.7 and greater will break Python plug-ins in GIMP 2.6.11.

Pages

Subscribe to Comments for "Selection bevel"