GIMP Chat http://gimpchat.com/ |
|
GEGL Ring Bevel Plugin Download http://gimpchat.com/viewtopic.php?f=9&t=20579 |
Page 1 of 1 |
Author: | contrast_ [ Thu Oct 12, 2023 10:56 am ] |
Post subject: | GEGL Ring Bevel Plugin Download |
This plugin is now complete and available for download here. https://github.com/LinuxBeaver/Gimp_Rin ... imp_Plugin Location to put binaries Windows C:\Users\(USERNAME)\AppData\Local\gegl-0.4\plug-ins Linux /home/(USERNAME)/.local/share/gegl-0.4/plug-ins Linux (Flatpak includes Chromebook) /home/(USERNAME)/.var/app/org.gimp.GIMP/data/gegl-0.4/plug-ins Then restart Gimp and go to GEGL Operations and look for "Ring Bevel" if you have Gimp 2.99.16+ you will see it in filters>text styling (2.10 doesn't have that menu list) But this plugin works on both 2.10 and 2.99 The full page below shows the developmental progress of this plugin documented from conception to release. This is me documenting step by step on how I made this plugin. It is meant to educate future GEGL devs. If you want to discuss the plugin normally just head over to page two. -- A popular script fu "Emboss and Bevel" has a mode called Ring Bevel. Now a GEGL counterpart is being developed to match its abilities. This thread is meant to show the development of the new GEGL Ring Bevel plugin. So we can all learn what is going on and hopefully get someone other them me to make a GEGL plugin by sharing my knowledge as much as possible. Image Preview of Ring Bevel Attachment: preview_ring_bevel.png [ 312.25 KiB | Viewed 5574 times ] Graph of Ring Bevel - if you paste this syntax in Gimp's GEGL graph filter you can test it without installing the plugin that is still in development. Requires these plugins for syntax (and probably final filter) to work https://github.com/LinuxBeaver/GEGL-Cus ... l/releases https://github.com/LinuxBeaver/GEGL-SSG ... /releases/ Code: Select all levels out-low=0.00 Node Definitions of Ring Bevel inside the .c file (THIS MAY CHANGE IN THE FUTURE) Code: Select all state->bevel = gegl_node_new_child (gegl, Node Connections of Ring Bevel inside the .c file (THIS MAY CHANGE IN THE FUTURE) Code: Select all gegl_node_link_many (state->input, state->levels, state->idref, state->erase, state->bevel, state->behind, state->output, NULL); Notice how the nodes named "ringnumber" in NODE CONNECTIONS doesn't have a state-> in front of it? That is because they are special node that allows users to choose 1 to 4 rings here. Remember in NODE DEFINITIONS s1, s2, s3, and s4, are ssg's AKA outlines and nop1, nop2, nop3, and nop4, are the DO NOTHING OPERATIONS. The user choices between one to four rings here like this.. If if the ring number is on one it will be 3 gegl:nop's (no operation) and 1 SSG If the ring number is on two it will be 2 gegl:nop's (no operation) and 2 SSG's If the ring number is one three it will be on 1 gegl:nop (no operation) 3 SSG's If the ring number is on four it will be on 0 no operations and four SSGs. This will allow a drop down list of 1 to 4 rings. Lets see image previews of three and two rings by removing SSG's from the graph. 3 RINGS Attachment: pasted_image266.png [ 236.39 KiB | Viewed 5574 times ] 2 RINGS Attachment: 2.png [ 208.96 KiB | Viewed 5574 times ] I will continue updating this thread with more information as the plugin develops and for now on I will do a real time step by step documentation of every plugin I develop. btw this is either my 59th of 60th plugin depending on rather this comes first or my other Edge Only Bevel. |
Author: | contrast_ [ Thu Oct 12, 2023 11:02 am ] |
Post subject: | Re: GEGL Ring Bevel (Plugin in development) |
Below is the incomplete source code of Ringed Bevel. It will not compile and it is far from finished. I'm just doing this so everyone can study the code. By the way, Once this filter is complete I will update the beginning of the thread, edit the first post and link the download on Github Code: Select all /* This file is an image processing operation for GEGL |
Author: | contrast_ [ Thu Oct 12, 2023 2:15 pm ] |
Post subject: | Re: GEGL Ring Bevel (Plugin in development) |
Ring Bevel's developmental code updated to include changes from my original idea. A lot of code was removed. The idea of having a wildcard node "ringnumber1-4," that can be 1-4 rings with gegl:nop "do nothing operations" (1-4) is now ditched for a better idea. There are now four GEGL Graphs that the user can select from. The first graph has 1 ring, the second has 2 rings, the third has 3 rings and the fourth has four rings. Characterized by 1 to 4 SSG's present. The SSG's are state->s1, state->s2, state->s3, state->s4. GEGL Graphs representing 1-4 rings. Code: Select all switch (o->rings) { Amount of Rings drop down list in the GUI Code: Select all enum_start (ring_time) Incomplete non working Source Code of Ring Bevel Attachment:
|
Author: | contrast_ [ Thu Oct 12, 2023 2:27 pm ] |
Post subject: | Re: GEGL Ring Bevel (Plugin in development) |
This has nothing to do with the code. its just a banner I made to indicate that this filter requires two other plugins of mine to work. (it ships with them) Attachment: dep_preview.png [ 716.21 KiB | Viewed 5554 times ] |
Author: | contrast_ [ Thu Oct 12, 2023 5:20 pm ] |
Post subject: | Re: GEGL Ring Bevel (Plugin in development) |
*This problem was solved while making this post. The problem was bevel and bevel2 Progress has been made. The filter now compiles and runs somewhat proper but its graph is not correct as I likely incorrectly positioned the id and ref to call a specific node. I need to investigate why a copy of the custom bevel plugin is not behind the ring text. Also the 1-4 ring switch works correctly, that and the azimuth are the only GUI parts that work because the others have not been programmed. Attachment: image.png [ 236.25 KiB | Viewed 5545 times ] THERE ARE INCORRECT NODES SOMEWHERE IN THESE GRAPHS THAT I HAVE TO FIND Code: Select all switch (o->rings) { The goal is to make it where the bevel2 node is behind everything. And just by looking the code I suggest swapping Code: Select all gegl_node_connect_from (state->behind, "aux", state->bevel, "output"); for Code: Select all gegl_node_connect_from (state->behind, "aux", state->bevel2, "output"); (The other custom bevel) to fix it. That seems to be the mistake, having bevel instead of bevel2. I will have to recompile to see if this fixes it. Below is the code of the two defined Custom Bevels The hypothesis why this is not working is because I called bevel1 when I should have called bevel2. Here are the two bevel nodes. Code: Select all state->bevel = gegl_node_new_child (gegl, I am recompiling the plugin with the correction now. Several minutes later............. IT WORKED Attachment: pasted_image270.png [ 238.26 KiB | Viewed 5545 times ] THE PLUGIN LOOKS JUST LIKE THE GRAPH!!! But its sliders outside of ring switch and azimuth don't work as they have not been programmed properly. Source code of Incomplete Ring Bevel attached. Attachment:
|
Author: | contrast_ [ Thu Oct 12, 2023 5:48 pm ] |
Post subject: | Re: GEGL Ring Bevel (Plugin in development) |
Now we have to define all GUI present options Property_int means GUI options that have integers (1,2,3,4) like this Code: Select all property_int (size, _("Size of the Bevel"), 3) Property_Double means GUI options that have decimals. Below is a property double. See how it goes from 7 to 70. It can have in between values like 35.5 or 22.4. Code: Select all property_double (elevation, _("Elevation"), 35.0) Both Property_Double_Elevation and Property_Int_Size have to be matched in a 3 part list. Elevation and Size are Property names that I am using. These can be named anything. Bevel is the node gegl:custom-bevel (it could be named anything by renaming bevel; which I won't be doing) In example, custom-bevel alphapercentile=100 size=100 elevation=22 elevation (again) and size (again) is a property name of gegl:custom-bevel This CANNOT be changed without editing custom-bevel's source code. So this is the final result Code: Select all gegl_operation_meta_redirect (operation, "elevation", state->bevel, "elevation"); A blank template example is Code: Select all gegl_operation_meta_redirect (operation, "property_name_of_new_filter", state->nodename, "original_nodes_property_name"); |
Author: | contrast_ [ Thu Oct 12, 2023 9:21 pm ] |
Post subject: | Re: GEGL Ring Bevel (Plugin in development) |
THIS POST CONTAINS A BETA DOWNLOAD THAT ACTUALLY WORKS. This is the part of the code that defines the GUI options. Read the notes that are in /**/. Code: Select all /*This is a median blur's radius being called to make the bevel larger, I can't use custom bevel's size because that doesn't work in enlarging both custom bevels*/ This is the part of the code that list what is shown in the GUI. Even if it is not defined it will still shown meaning the slider will not work. Code: Select all enum_start (ring_time) Here is the final GEGL Graph. It was given a new node, "mediandictator" that controls the size of both the ring bevel and background bevel via a median blur at the start of the graph. This node did not exist in earlier versions of the code Code: Select all /*Let's analysis what is going on below So yeah read the notes to understand what is going on. Below attached is a working download to a beta version of the plugin that works mostly normal. BETA BINARIES AND CODE FOR WINDOWS AND LINUX (THIS WORKS NORMAL) but the plugin is still not done Attachment: Attachment: beta_download.png [ 553.1 KiB | Viewed 5538 times ] Attachment: love_gegl.png [ 258.56 KiB | Viewed 5538 times ] |
Author: | contrast_ [ Fri Oct 13, 2023 6:41 am ] |
Post subject: | Re: GEGL Ring Bevel (Plugin in development) |
Attachment: cm.png [ 225.03 KiB | Viewed 5521 times ] Ring Bevel got a color change checkbox that when enabled makes the bevel any color. How did this happen? This code below list 8 GEGL graphs total, with four GEGL graphs for each ring (we established that already), with an almost carbon copy of the first four nodes and the last four nodes except the first four nodes contain a state->color node at the beginning. Those first four rings are the ones that are recolored when the checkbox is enabled. state->color is gegl:coloroverlay colormode is a GUI property for the checkbox. Notice how the node state->color is only on the top four graphs and is not present after the else? Code: Select all if (o->colormode) This is the GUI aspect of the color checkbox. Code: Select all property_boolean (colormode, _("Recolor bevel"), FALSE) |
Author: | contrast_ [ Fri Oct 13, 2023 6:47 am ] |
Post subject: | Re: GEGL Ring Bevel (Plugin in development) |
Here is the final definition of the GUI properties *with notes Code: Select all /*This is a median blur's radius being called to make the bevel larger, I can't use custom bevel's size because that doesn't work in enlarging both custom bevels*/ Here is the final GUI properties that the user sees (excluding ENUM list) Code: Select all enum_start (ring_time) Here is another example of how the three part properties work. Take (darkbevelslider, levels, out-low) as an example. gegl_operation_meta_redirect (operation, "darkbevelslider", state->levels, "out-low"); darkbevelslider is the defined property name. IE lb:ringbevel darkbevelslider= state->levels is gegl:levels, and it was named that via this Code: Select all state->levels = gegl_node_new_child (gegl, It could have been named anything. out-low is the property name inside level's .c file and it cannot be changed without editing level's .c file. |
Author: | contrast_ [ Fri Oct 13, 2023 6:58 am ] |
Post subject: | Re: GEGL Ring Bevel (Plugin in development) |
Notice how the checkbox in the latest beta build disables the color overlay when enabled? That is because of this Code: Select all property_color (color, _("Color of bevel"), "#ff9f00") ui_meta ("sensitive", "colormode") The ui_meta command sensitive disables coloroverlay when colormode (the checkbox) is presed. Below is a download to the latest source code with no binaries. Attachment: By the end of the day this plugin should be ready for Github and I'll update the title when that happens. |
Author: | contrast_ [ Fri Oct 13, 2023 9:47 am ] |
Post subject: | Re: GEGL Ring Bevel (Plugin in development) |
*binary download available here. Ok this could be the final release. I added a image file upload by adding nodes state->multiply (gegl:multiply) state->idrefimage (gegl:nop) state->image (gegl:layer src=) gegl:layer is the one that calls the image file. And if you figured it out the image file is blended by the "multiply blend mode" Code: Select all gegl_node_link_many (state->input, state->color, state->mediandictator, state->levels, state->idref, state->erase, state->bevel, state->behind, state->idrefimage, state->multiply, state->output, NULL); All 8 graphs were updated to include an image file upload that works best on grayscale text. Attachment: 8graphs_image.png [ 52.32 KiB | Viewed 5415 times ] Preview Attachment: sandy.png [ 831.09 KiB | Viewed 5415 times ] This may be on Github in a few hours. Contains Windows and Linux Binaries and Source Code. Attachment:
|
Author: | contrast_ [ Fri Oct 13, 2023 10:04 am ] |
Post subject: | Re: GEGL Ring Bevel (Plugin in development) |
![]() In three-four hours this will be on Github if nothing goes wrong during testing. |
Author: | contrast_ [ Fri Oct 13, 2023 2:25 pm ] |
Post subject: | Re: GEGL Ring Bevel Plugin Download |
This plugin is released. https://github.com/LinuxBeaver/Gimp_Rin ... imp_Plugin Location to put binaries **Windows** C:\Users\(USERNAME)\AppData\Local\gegl-0.4\plug-ins **Linux** /home/(USERNAME)/.local/share/gegl-0.4/plug-ins **Linux (Flatpak includes Chromebook)** /home/(USERNAME)/.var/app/org.gimp.GIMP/data/gegl-0.4/plug-ins Then Restart Gimp and go to GEGL Operations and look for "Ringed Bevel" or in 2.99.16+ filters>text styling>ringed bevel. Enjoy and lets discuss the non-technical stuff of the plugin here. Its fun how I made this plugin by running my ssg filter with the erase blend mode. Attachment: 1.png [ 494.26 KiB | Viewed 5407 times ] |
Author: | contrast_ [ Fri Oct 13, 2023 4:06 pm ] |
Post subject: | Re: GEGL Ring Bevel Plugin Download |
Day one update (after being released on Github). Bottom Bevel now has an opacity slider to hide it. Attachment: 2023-10-13_16-39.png [ 449.12 KiB | Viewed 5404 times ] |
Author: | contrast_ [ Sat Oct 14, 2023 9:51 pm ] |
Post subject: | Re: GEGL Ring Bevel Plugin Download |
https://github.com/LinuxBeaver/Gimp_Rin ... mp_Plugin/ Ring Bevel's github got an update that does nothing but fix a bug where in default the multiply blend mode of the color overlay ran over it making a yellow bevel orange or a light blue bevel dark blue. This bug is fixed and now we can have light blue or yellow bevel's easier. Before it was still possible but you'd have to use a really bright yellow. Ring Bevel also has a sister plugin "ring text" that puts rings around plain text. You'll see it floating on Gimp Chat |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |