Gimp-Forum.net
gimp curve bend - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: gimp curve bend (/Thread-gimp-curve-bend)

Pages: 1 2


gimp curve bend - rita - 12-11-2024

Hello everyone,

I’m new to GIMP and currently learning how to use the Curve Bend feature.
I’m working on an image of a mug and trying to apply a logo or other designs onto it. However, sometimes the curve is applied successfully, and other times it isn’t, and I’m not sure why.
Could the issue be related to the angle of rotation I’m using? Or perhaps the shape of the curve itself? Or is there another problem with my process?

Here are the steps I’m following:
1-Load the mug image
2-Open the logo/image as a new layer.
3-Scale the logo/image if necessary.
4-Filters->Distorts->Curve bend .
5-Change the layer mode to Multiply.
6-Merge the layers

Here are 2 examples where the result failed and 1 example where it worked:
[attachment=12734][attachment=12733][attachment=12735]


RE: gimp curve bend - Ofnuts - 12-11-2024

To map a logo on a cylinder, you need two distortions, on that compresses the sides, and if the cylinder is not straight from the side (like your first image) , one that applies a bend.

Ideally, to do something realistic, you would use Filters > Map > Map object and map you logo to a cylinder. The very har part is figuring out the cylinder to map to...

If your logo is amenable to a path, there may be a much easier solution.


RE: gimp curve bend - rich2005 - 12-11-2024

Give Ofnuts easier solution a try-out but if your linux Gimp does not have python you might have to use the (ancient) Gimp map-to-object.

It is difficult to set up to get an exact render first time so experiment. This is just a less than great example.

50 seconds https://i.imgur.com/A9IQMFn.mp4

Canvas divided into 4 (as in a whole circle) and the logo in the centre.
Transparency enabled, lighting off, orientation a small x rotate (to match the cup curvature) , cylinder curvature could have been a bit greater Wink
Once rendered, stretched to fit the cup


RE: gimp curve bend - rita - 12-12-2024

Let's say I want to place an image, like Pikachu, on a cylinder. When I tried, only half of the image was visible. Is there a specific width and height I should use to fit it properly on the cylinder?Or could there be another problem I caused?


RE: gimp curve bend - rita - 12-12-2024

(12-11-2024, 03:04 PM)Ofnuts Wrote: To map a logo on a cylinder, you need two distortions, on that compresses the sides, and if the cylinder is not straight from the side (like your first image) , one that applies a bend.

Ideally, to do something realistic, you would use Filters > Map > Map object and map you logo to a cylinder. The very har part is figuring out the cylinder to map to...

If your logo is amenable to a path, there may be a much easier solution.

I open Edit > Preferences > Folders > Plug-ins. Inside the plug-ins folder, I navigate to .config/GIMP/2.10/plugins and paste the .py file there. After restarting GIMP, where can I find the plugin?
I am using script fu, so I don't know if I can use this plugin



RE: gimp curve bend - denzjos - 12-12-2024

If you unpacked the script file, open the doc folder and read the HTML file. You find this text in the HTML file:

The script is called from the 
Code:
Paths

 list, right-clicking the path and then 

Code:
Tools > Wrap to cylinder > Wrap path on {horizontal|vertical} cylinder

.



RE: gimp curve bend - rita - 12-12-2024

(12-12-2024, 08:01 AM)denzjos Wrote: If you unpacked the script file, open the doc folder and read the HTML file. You find this text in the HTML file:

The script is called from the 
Code:
Paths

 list, right-clicking the path and then 

Code:
Tools > Wrap to cylinder > Wrap path on {horizontal|vertical} cylinder

.
I think the problem is because I am using scriptfu maybe?


RE: gimp curve bend - rich2005 - 12-12-2024

(12-12-2024, 07:52 AM)rita Wrote:
(12-11-2024, 03:04 PM)Ofnuts Wrote: To map a logo on a cylinder, you need two distortions, on that compresses the sides, and if the cylinder is not straight from the side (like your first image) , one that applies a bend.

Ideally, to do something realistic, you would use Filters > Map > Map object and map you logo to a cylinder. The very har part is figuring out the cylinder to map to...

If your logo is amenable to a path, there may be a much easier solution.

Edit > Preferences > Folders > Plug-ins. Inside the plug-ins folder, I navigate to .config/GIMP/2.10/plugins and paste the .py file there. After restarting GIMP, where can I find the plugin?
I am using script fu, so I don't know if I can use this plugin[

My guess is you have a linux Gimp 2.10 that does not support python 2.7 Is there a Python-Fu entry in the Filters menu? Which linux are you using? There might be usable alternatives that come with their own python, a flatpak or an appimage maybe.

Quote:Let's say I want to place an image, like Pikachu, on a cylinder. When I tried, only half of the image was visible. Is there a specific width and height I should use to fit it properly on the cylinder?Or could there be another problem I caused?

Try making the logo layer the same size as the canvas Layer -> Layer to Image size.


RE: gimp curve bend - rita - 12-12-2024

(12-12-2024, 08:19 AM)rich2005 Wrote:
(12-12-2024, 07:52 AM)rita Wrote:
(12-11-2024, 03:04 PM)Ofnuts Wrote: To map a logo on a cylinder, you need two distortions, on that compresses the sides, and if the cylinder is not straight from the side (like your first image) , one that applies a bend.

Ideally, to do something realistic, you would use Filters > Map > Map object and map you logo to a cylinder. The very har part is figuring out the cylinder to map to...

If your logo is amenable to a path, there may be a much easier solution.

Edit > Preferences > Folders > Plug-ins. Inside the plug-ins folder, I navigate to .config/GIMP/2.10/plugins and paste the .py file there. After restarting GIMP, where can I find the plugin?
I am using script fu, so I don't know if I can use this plugin[

My guess is you have a linux Gimp 2.10 that does not support python 2.7 Is there a Python-Fu entry in the Filters menu? Which linux are you using?  There might be usable alternatives that come with their own python, a flatpak or an appimage maybe.

Quote:Let's say I want to place an image, like Pikachu, on a cylinder. When I tried, only half of the image was visible. Is there a specific width and height I should use to fit it properly on the cylinder?Or could there be another problem I caused?

Try making the logo layer the same size as the canvas Layer -> Layer to Image size.
for linux "22.04" and in my gimp there is only script-fu  
And for map I have 2 more questions

1-When I use only the map object and scale the image larger than the mug, it sits above the mug instead of curving inward.(first image)
2-Can I change the shape of my border? For example, if the arc of the upper border is curving upwards, can I make it curve downwards without using the curve bend tool?(second image)


RE: gimp curve bend - Ofnuts - 12-12-2024

(12-12-2024, 06:08 AM)rita Wrote: Let's say I want to place an image, like Pikachu, on a cylinder. When I tried, only half of the image was visible. Is there a specific width and height I should use to fit it properly on the cylinder?Or could there be another problem I caused?

Because the whole width of your layer is mapped to the 360° of the cylinder, so half of your image is wrapped behind the part that you see. You probably want your image to cover 90° to 120° of the cylinder, so your image should be surrounded by transparency in a layer 3-4x wider:

[attachment=12749]
[attachment=12750]
[attachment=12752]