Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wrapping path to cylinder
#1
Results of  a script WIP to transform the sides, then ofn-bend-path to fit the vertical perspective. A bit contrived but still a lot easier than Map Object (because it still relatively WISIWYG) and since its done on the path the edges remain sharp.

How realistic does it look?

   
Reply
#2
Slightly better version in 3 steps:

  1. Apply wrap script
  2. Apply perspective transform to follow the slightly perspective induced conical shape of the mug
  3. ofn-path-bend to follow borders.
   
Reply
#3
Script onanism... trying a more complex path, with a side rotation


   
Reply
#4
Question 
(01-22-2023, 06:20 PM)Ofnuts Wrote: Results of  a script WIP to transform the sides, then ofn-bend-path to fit the vertical perspective. A bit contrived but still a lot easier than Map Object (because it still relatively WISIWYG) and since its done on the path the edges remain sharp.

How realistic does it look?

Visually the result looks very good!

I had a doubt regarding the curvature of the word CYLINDER.
   
Regarding the curvature of the paths, this word was the one that most distanced itself from the paths.

Perhaps due to the tapering of the mug's geometry (wider at the top)?

In any case, it's just a question/observation.
                               .....
Samj PortableGimp 2.10.28 - Win-10 /64.
Reply
#5
The real mug is likely a perfect cylinder, but since it is shot slightly from above, the bottom is farther from the lens that the top, so it looks smaller, and you get a slightly conic shape. This old toolbox is a perfect 18cmx19cm square but shot from above it looks like a trapeze:

   

And the square in front of it has an angle of nearly 97° in the picture.

This is why the second attempt has a perspective transform inserted since this is exactly what the perspective transform is supposed to fix:

   

This also makes the bottom more curved than the top, but ofn-bend-path comes to the rescue, with the two envelope strokes following the top and bottom curvature, and two guides marking the corresponding diameters:

   

Of course you can start by fixing the mug with a perspective transform, but this always gives a slightly artificial look (for instance, the top of the toolbox and the foot of the square would be very thin in a picture where the square is square).
Reply
#6
Thumbs Up 
Wow!
This was enlightening and illuminating.

My understanding of this type of editing seems to have gone up a notch.

Thanks for the very detailed explanations!
                               .....
Samj PortableGimp 2.10.28 - Win-10 /64.
Reply
#7
Binge-wrapping now that the script is done...

   
Reply
#8
(03-07-2023, 08:23 AM)Ofnuts Wrote: Binge-wrapping now that the script is done...

Wow this plug-in looks awesome.
Reply
#9
(01-22-2023, 08:37 PM)Ofnuts Wrote: Script onanism... trying a more complex path, with a side rotation

Is there any video of how you did it please?
Reply
#10
(02-02-2024, 09:41 AM)Alan Wrote: Is there any video of how you did it please?

It is done with a plug-in ofn-path-to-cylinder.py

See this thread
https://www.gimp-forum.net/Thread-ofn-path-to-cylinder

The first post has a link to the plug-in. The zip file contains the plug-in and docs in html format.
Reply


Forum Jump: