It is currently Fri Jun 21, 2024 3:37 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: GEGL Edge Only Bevel (part of MISC BEVEL COLLECTION)
PostPosted: Wed Oct 11, 2023 9:01 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Hello, this is a thread about my progress on making a new GEGL plugin that bevels the edges of shapes only. This GEGL plugin does not yet exist because I don't know how to make it. Here is a preview of a script fu counterpart that does the desired outcome.

Attachment:
bevel_only_the _edge.png
bevel_only_the _edge.png [ 262.14 KiB | Viewed 5522 times ]


Script fu uses the name "cone bevel" so maybe I'll call it that. In this thread I'll keep everyone updated on the progress of GEGL cone bevel's development. :) so far I am trying to mimic this text style but keep failing.


Last edited by contrast_ on Tue Oct 17, 2023 8:09 am, edited 3 times in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Bevel Edge Only (Plugin in Development)
PostPosted: Wed Oct 11, 2023 9:23 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
I'm making progress. I managed to mimick the "cone bevel" in GEGL

The Bevel applies to edges but ignores the rest of the image.
Attachment:
progress.png
progress.png [ 186.22 KiB | Viewed 5514 times ]


Syntax do to this. Requires invert transparency and custom bevel plugins found here
https://github.com/LinuxBeaver/GEGL-Cus ... l/releases
https://github.com/LinuxBeaver/GEGL-Cut ... t/releases

id=1
gimp:layer-mode layer-mode=split  aux=[ ref=1

invert-transparency
median-blur radius=4 alpha-percentile=100
invert-transparency

]

id=inletter

median-blur radius=3 alpha-percentile=70
src-atop aux=[ ref=inletter custom-bevel depth=50 blendmode=Multiply gaus=2 box=2 elevation=40 size=0.3 opacity=9  opacity value=0.49 ]


If you apply this GEGL syntax on colored text (excludes grayscale/black and white) it will make a cone bevel effect entirely in GEGL.


Last edited by contrast_ on Thu Oct 12, 2023 11:04 am, edited 1 time in total.

Top
 Post subject: Re: Bevel Edge Only (plan for a new GEGL plugin)
PostPosted: Wed Oct 11, 2023 9:33 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Attachment:
gimps.png
gimps.png [ 479.25 KiB | Viewed 5513 times ]


More progress. Use Normal blend mode.
id=1
gimp:layer-mode layer-mode=split  aux=[ ref=1

invert-transparency

median-blur radius=5 alpha-percentile=100

invert-transparency

]

id=inletter

median-blur radius=3 alpha-percentile=70
src-atop aux=[ ref=inletter  levels in-high=0.4 custom-bevel depth=50 blendmode=Multiply gaus=2 box=2 elevation=40 size=0.3 opacity=9  opacity value=0.90 ]


Top
 Post subject: Re: Bevel Edge Only (plan for a new GEGL plugin)
PostPosted: Wed Oct 11, 2023 9:37 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
id=n

over aux=[ ref=n
id=1
gimp:layer-mode layer-mode=split  aux=[ ref=1

invert-transparency

median-blur radius=5 alpha-percentile=100

invert-transparency

]

id=inletter

median-blur radius=3 alpha-percentile=70
src-atop aux=[ ref=inletter  levels in-high=0.4 custom-bevel depth=50 blendmode=Multiply gaus=2 box=2 elevation=40 size=0.3 opacity=9  opacity value=0.90 ]
]


This is the final syntax that will soon be translated into a plugin. This allows the cone bevel to work without the normal blend mode. Meaning it runs in default "replace".


My goal is to keep updating this thread to show every step involved in the process of making a GEGL plugin. I will even post incremental versions of the source code as it modifies to become more like this graph. Meaning I will upload incomplete .c files to show the development of a GEGL plugin. Stay tuned.


Top
 Post subject: Re: Bevel Edge Only (plan for a new GEGL plugin)
PostPosted: Wed Oct 11, 2023 10:35 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 785
Location: SEA - South East Asia
It Works also nicely on opaque surrounded by alpha :coolthup
Thanks a lot _contrast :tyspin

Image

_________________
Patrice


Top
 Post subject: Re: Bevel Edge Only (plan for a new GEGL plugin)
PostPosted: Thu Oct 12, 2023 10:16 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
You are welcome PixLab.

---

This is the final graph.


id=0 over aux=[ ref=0
id=1
median-blur radius=20 alpha-percentile=100
src-in aux=[ ref=1
id=2
gimp:layer-mode layer-mode=split  aux=[ ref=2

invert-transparency

median-blur radius=14 alpha-percentile=100
gaussian-blur

invert-transparency

]

id=3

median-blur radius=02 alpha-percentile=70
src-in aux=[ ref=3 levels out-low=0.01  gaussian-blur std-dev-x=2 std-dev-y=2 custom-bevel  depth=10 blendmode=Multiply gaus=1 box=1 elevation=90 size=0.3 opacity=2.1 opacity value=1.1   ]

]
nop
]
lb:edgesmooth
lb:threshold-alpha
median-blur radius=0



Below is how GEGL's .c file will understand the graph. None of this is defined or proper code for GEGL. This is just an example of how the nodes are connected in a .c file.

edgesmooth is my edge smooth plugin
ta2 is my threshold alpha 2 plugin
bevel is my custom bevel plugin
it (the letters "it") is my invert transparency plugin
normal is the normal blend mode
erase is the erase blend mode
src-in is a GEGL exclusive blend mode that is a fusion between replace and alpha lock. Gimp has no equal blend mode
nop and idref is (gegl:nop) for no operation; they functions as ref and id or grabbing content later on in a graph
median is a median blur.
gaus is a gaussian blur
If you see a 2 or 3 that means there is more then one of the same filter. Outside of ta2.

GEGL nodes connecting here
input, normal, edgesmooth, medianfix, ta2, output
(normal connects to nop)
idref1, median1, srcin1, nop,
idref2, erase, idref3, median3, srcin2,
(srcin connects to srcin2)
it, median2, gaus, it2,
(erase connects to it2)
idref3, levels, gaus2, bevel, opacity,
(srcin2 connects to opacity)

Once again, this is a rough draft on how GEGL's c file understands that syntax. Not proper .c code obviously. Once I edit the .c file template, something like this will be in the node area.


Top
 Post subject: Re: GEGL Edge Only Bevel (Plugin in development)
PostPosted: Sun Oct 15, 2023 3:50 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
This plugin may end up being cancelled as an individual plugin and instead put inside "the exotic bevel collection" I will probably make nine variations of it. (small medium large) and with 3 different blend modes (3x3=9) as it will not have unique sliders.

Learn more about the up and coming "exotic bevel collection" mega GEGL plugin here.
viewtopic.php?f=4&t=20581


Top
 Post subject: Re: GEGL Edge Only Bevel (part of MISC BEVEL COLLECTION)
PostPosted: Tue Oct 17, 2023 8:11 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
viewtopic.php?f=9&t=20591
You can download this mega plugin that includes 3 graphs in the drop down list of "outline edges only" bevel.

This has very little editable properties. This will soon be on Github

Attachment:
outline_edges_only.png
outline_edges_only.png [ 228.45 KiB | Viewed 5355 times ]


Top
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) GEGL Bevel (filter of its own but now ships with GEGL Effects)

32

No new posts GEGL plugin that outlines with a bevel and more

0

No new posts Attachment(s) GEGL Clay Bevel effect

51

No new posts Attachment(s) GEGL Sharp Bevel - A new classic

2

No new posts Attachment(s) GEGL Ring Bevel Plugin Download

14



* Login  



Powered by phpBB3 © phpBB Group