It is currently 25 Feb 2021, 07:06

• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Custom Font Bevel Reflect Version 1.00 - 1.06

Share your Python Fu Scripts/plug-ins for GIMP here
skinnyhouse
Script Coder

Re: Custom Font Bevel Reflect Version 1.00 - 1.05

Post#41 by skinnyhouse » 15 Dec 2020, 20:00


Thank you Krikor for the thorough road testing. There were so many variations available that I felt sure I would have missed something.

I will have a good look at everything - as time permits - and see what it is possible to do.

Off the top of my head (ie without looking at the code in detail) here are my thoughts:

The code is as faithful a Python interpretation of the original Scheme code as I could manage - even down to maintaining similar variable names. My additional code just applies the process to multiple character layers - again as efficiently as I could manage.

The default settings used are actually those used in the original BRL version - personally I do not use those values - but I felt obliged to maintain the settings. So I am up for another set of defaults now that I have used it for a little longer now.

The Random mode sucks - it uses Python's basic random function. As you have discovered it seems to favour some random choices a lot more than others and worse, in my opinion, it seems to not want to use other choices. That is why I added the Random Sequence option, which I hope is of more use and certainly for the purpose of custom font use.

Your point number 2 is the one that concerns me most. It could be quite a major bug - although no check is made as to the original positioning of layers. For custom fonts you expect layers to be positioned in the top left-hand corner.

The problem of artifacts produced around the edges of shapes is caused by the ML BR 2 plug-in itself and is one of the reasons that I added my own 'trim' option. The original BRL code also attempts to do this. I am not quite sure (i.e. I need to do a lot more testing) what effect the size of emaps has on the final outcome and if too much internal scaling by the Map Object plug-in produces the sort of results you had. Again I do not check for size in my own code so this is another potential short-coming.

With regard to your fourth point I am afraid that you have discovered a naming convention that I originally used with my first custom fonts - before I adopted the .png naming convention introduced by Tim.

To sum up, thank you again for raising the points in your post.

They are all definitely worth looking at. I would also find it useful to be able to use your source emap files - there is no check made on the suitability of the layers within an emap xcf file. Some spectacularly bad results can be obtained if you do not use layers with transparency in the top left-hand corner.

Krikor
Forum Member

Post#42 by Krikor » 15 Dec 2020, 22:13


skinnyhouse wrote:
15 Dec 2020, 20:00
[...] I would also find it useful to be able to use your source emap files - there is no check made on the suitability of the layers within an emap xcf file. Some spectacularly bad results can be obtained if you do not use layers with transparency in the top left-hand corner.
Yes, I always add transparent pixels to my emaps (quadrilaterals). But in Spheras-emaps, as they already have transparencies around them, in layers, I rarely added transparency to them.

I don't know if I understood correctly, that you would like to have access to the xcf that I used with random emaps.
I selected these emaps just by the variety of color, which would make it easier to observe the question of the randomness of the plugin.
Attached !
Attachments
MySourceEmaps+Model.zip #
Krikor - xcf + model
(1019.91 KiB) Downloaded 22 times
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston

skinnyhouse
Script Coder

Post#43 by skinnyhouse » 15 Dec 2020, 22:24


:thumbsup: Thank you - probably nothing I can glean from them but worth a shot.

Krikor
Forum Member

Post#44 by Krikor » 16 Dec 2020, 00:54


Skinnyhouse, reading your previous post I noticed your reference to the new function in version 1.05 Randon Sequence Emap.

So I went back to the tests, this time using this function.
The results are much better !!
Excellent improvement in this update!

But as I mentioned earlier, one of the results is always positioned in the upper left margin.
BRL15e.png
krikor - BRL 1.05 tests
BRL15e.png # (225.2 KiB) Viewed 1571 times (Thumbnail | Recognize)
With some changes in the plugin I was able to reduce the problem with the oval circumference a little - See results of the 16 emaps at the top that are much more satisfactory versus results of the 16 emaps at the bottom, with visible deformations in some of them.

Thanks for another great update!
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston

skinnyhouse
Script Coder

Post#45 by skinnyhouse » 16 Dec 2020, 07:58


:thumbsup:
I will probably remove the random option and leave the random sequence in for the next update.

Thanks for your thoroughness - I may well get back to you about the remaining issue.

skinnyhouse
Script Coder

Post#46 by skinnyhouse » 16 Dec 2020, 08:42


Quick play with your files (nice emaps btw) K:

The affected misplaced layer is always the last layer used i.e. the top layer. The cf filter starts at the bottom of the layer stack and works its way upwards to arrive at what it supposes will be the first character (although you are not interested in characters here) in a custom font file.
If you change the order of the layers a different layer will be positioned in the top-left corner.

Also, the filter currently expects the layers to be positioned here at top-left and so it doesn't check on layer positioning and replace them automatically. If you were to make each layer the size of the image (not what you want I know) the outcome would look right. (See image below which used the dialog default settings.)

In short, now that I know what you want to achieve, I should be able to fix it at some point (famous last words I know).

Very interesting.
Krikor_emap_layers_res.png
Krikor_emap_layers_res.png # (196.94 KiB) Viewed 1565 times (Thumbnail | Recognize)

Krikor
Forum Member

Post#47 by Krikor » 16 Dec 2020, 15:42


skinnyhouse wrote:
15 Dec 2020, 20:00
[...]The problem of artifacts produced around the edges of shapes is caused by the ML BR 2 plug-in itself and is one of the reasons that I added my own 'trim' option. The original BRL code also attempts to do this. I am not quite sure (i.e. I need to do a lot more testing) what effect the size of emaps has on the final outcome and if too much internal scaling by the Map Object plug-in produces the sort of results you had. Again I do not check for size in my own code so this is another potential short-coming.
Skinnyhouse,
I'm doing some experiments. I found that the size of the layer directly influences the result of the applied emap.
The same emap, centered on a layer with different dimensions, produces different results. In part, transparency ends up being accounted for in the useful area to be applied to the selection.
BRL15g.png
Krikor - Influência camada no Emap
BRL15g.png # (36.93 KiB) Viewed 1557 times (Thumbnail | Recognize)
I consider this a great discovery. This will change the way I create my emaps and possibly edit the ones I have already stored based on this information.
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston

skinnyhouse
Script Coder

Post#48 by skinnyhouse » 16 Dec 2020, 16:15


More useful stuff K. :gimp_clap:

When BRL creates its own emaps it always crops by removing any empty border space - perhaps GnuTux found that this produced the best results in general. My own small tests seemed to indicate that there were no advantages to be gained from overly large emaps and that too small an emap produced poor results on the whole.

When generating emaps internally I use a size based on the height of the layer. There is currently no test on user loaded emaps.

It would be quite possible to test the emap loaded by the user and crop it to content and then scale it if required to a particular size.

skinnyhouse
Script Coder

Post#49 by skinnyhouse » 16 Dec 2020, 19:07


Rogue positioning sorted:

In actual fact that layer is what should happen for custom font use - it's the other layers that are not behaving as they should.

So what should I do? Add an extra option perhaps?

:trampoline:

Diagramjamal
Newly Registered

Post#50 by Diagramjamal » 16 Dec 2020, 20:15


:gimp_clap: Very good.Perfect. İI added these plugins to the gimp, but I didn't know how it works.
diagram :gimp: jamal


GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply New Topic
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 15 guests