A label for a tumbler, cone-like cylinder

Post questions on how to use or achieve an effect in Inkscape.
Nekomanma
Posts: 4
Joined: Wed Dec 02, 2009 12:28 pm

A label for a tumbler, cone-like cylinder

Postby Nekomanma » Wed Dec 02, 2009 1:26 pm

I bought one of those Starbucks "Create your own tumbler" tumblers where you can pull out the insert and add your own design.

It's not a cylinder as such. It's a little wider at the top like a cone with the point cut off.

I made a template in Inkscape and did some test designs. As expected, the designs get distorted and lines perpendicular to the top and bottom curves of my template are not perpendicular to the top and base of the cup as the flat design maps to the real 3D object. (I just know there's a better way of saying that. Which would, I'm sure, make my searches come up with better answers) Of course, I know I could draw lines that would do this but I don't want all my designs to be vertical lines. I need to distort *any* image even complex ones by using maybe a vanishing point.

If you know what I'm trying to say and you can translate it into search terms that I can google please let me know.

If you know how to do this in Inkscape I would really appreciate it if you could give me some tips.

If you know this isn't possible in Inkscape but you some other software that does it please let me know.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: A label for a tumbler, cone-like cylinder

Postby ~suv » Wed Dec 02, 2009 9:23 pm

You could try the extension 'Modify Path > Envelope'. It is similar to the 'Perspective' extension but does not apply a perspective distortion to the transformed paths.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: A label for a tumbler, cone-like cylinder

Postby druban » Thu Dec 03, 2009 1:59 am

If I understand what you are saying: you want to make a rectangular image that you can wrap around a truncated cone without apparent distortion.

The development of a cone is a sector of a circle. The angle of the sector relects the 'steepness' of the cone (eg a 90 degree sector would represent a very pointy cone.

The development of a truncated cone is a sector with a smaller concentric sector removed.

Probably your best method would be to make an otuline of this figure in the angle you require, position it to be horizontally symmetrical, align its center with the center of your drawing, move it (figure) to another layer, make your to-be-distorted image layer partially transparent so both image and 'target' figure can be seen, select your to be distorted drawing and callt he LPE envelope distortion. Now you can distort your drawing by matching the four corner points to the development figure and adjusting the curvature of the top and bottom to match.

Sounds complicated but I just wanted to mention every detail. It's quite easy but you have to know that very important angle. I'd make a screenshot for you if I knew this number
Your mind is what you think it is.

Nekomanma
Posts: 4
Joined: Wed Dec 02, 2009 12:28 pm

Re: A label for a tumbler, cone-like cylinder

Postby Nekomanma » Thu Dec 03, 2009 11:28 pm

Thanks both of you for your replies.

I'm wondering if the envelope tool will really distort properly on a curve. If I have to tweek the curve like in HeathenX's envelope tutorial it might be just the same as hand-tweeking the designs like I do now. I thought maybe the envelope tool would distort on a trapezoid solid rather than a cone.

Anyway, someone created a template in .psd format. I can't open that but maybe you could get the dimensions, and the angle, of the cone from that.

http://www.theshaffers.org/graphics/tem ... umbler.psd

Again, thanks for your help. I wonder how packaging design is done on strange shapes like this professionally....

User avatar
heathenx
Posts: 388
Joined: Thu Jun 07, 2007 11:51 pm
Location: USA
Contact:

Re: A label for a tumbler, cone-like cylinder

Postby heathenx » Fri Dec 04, 2009 12:24 am

You may want to try the Bezier Envelope extension instead. It will get a lot closer than the standard envelope extension and work well on the shape that you are after. You still may have to tweak it afterward.

Grab it here: http://is.gd/5b8L4

Also, you can open the .psd file in Gimp and convert it to something else. ;)

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: A label for a tumbler, cone-like cylinder

Postby ~suv » Fri Dec 04, 2009 1:25 am

the path in the PSD file in Inkscape SVG (converted via GIMP -> Path tool -> clipboard -> Inkscape)...
Attachments
starbucks_memory_tumbler.svg
(3.81 KiB) Downloaded 707 times

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: A label for a tumbler, cone-like cylinder

Postby druban » Fri Dec 04, 2009 4:40 am

Hi Nekomanma, and thanks to suv :) for the conversion.
Using that svg path here's a demo to show you how you might do this. The work is a little sloppy but you can be very precise and lay down more guides for your own project. I also did not add any nodes to the control paths of the envelope in this instance but I usually do for precision. All paths to be transformed should get run through the add nodes extension to avoid startling and wild results as you move the envelope around. Little steps are best even if it takes longer.
Good luck!
labeldemo.png
labeldemo.png (113.5 KiB) Viewed 13220 times

:oops: The guides i mentioned naturally did not export to the png file :oops: . Just imagine them :D or look in the svg. :D
(you will need the 7Z application :) to unpack this SVG )
labeldemo.7z
(98.73 KiB) Downloaded 506 times
Last edited by druban on Sat Dec 05, 2009 11:35 am, edited 1 time in total.
Your mind is what you think it is.

Nekomanma
Posts: 4
Joined: Wed Dec 02, 2009 12:28 pm

Re: A label for a tumbler, cone-like cylinder

Postby Nekomanma » Sat Dec 05, 2009 1:47 am

Thanks everyone who posted. I'm gonna experiment with your suggestions. It looks totally possible in Inkscape. :D

fractal
Posts: 3
Joined: Mon Jun 07, 2010 2:20 am

Re: A label for a tumbler, cone-like cylinder

Postby fractal » Mon Jun 07, 2010 2:27 am

This is very cool... I want to make a custom tumbler for a friend and just spent the last few hours familiarizing myself with Inkscape and successfully recreated the path effect approach described here. However, it only works on vector objects. What I want to do is transform a bitmap (a landscape scene) so that the horizon line is straight when it's put into the tumbler. I created a rectangle whose fill is the bitmap, but when I do the envelope deformation it does not affect the pixels in the bitmap -- only the shape of the container rectangle.

Any clues? I hope I've explained my question clearly, I'm not a graphics guy. I wonder if there is a similar process in GIMP that I can use for this..?

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: A label for a tumbler, cone-like cylinder

Postby druban » Mon Jun 07, 2010 7:25 pm

Hi Fractal!
To Remap a pixel image you will have to use another program. GIMP can do this but it can get pretty complicated to do it precisely. One way would be to do a rectangular to polar conversion. You will have to calculate carefully how much extra "padding" to put around your image - on either side and especially on the bottom - to get the desired effect.
But it can be done!

Hint: the rect to polar maps your image to 360 degrees. Your tumbler template (a developed cone) is only a fraction of this. The ratio of image to side padding will be the ratio of the template's angular width to 360 degrees.
Similarly, the padding on the bottom is dependent on how much of the 'cone ' has been cut off. (If you were mapping to an intact cone you would not need any padding). The ratio of the height of the image to the radius of the circle the template is a part of tells you how much padding to use.

Sorry if this sounds confusing....!
Your mind is what you think it is.

fractal
Posts: 3
Joined: Mon Jun 07, 2010 2:20 am

Re: A label for a tumbler, cone-like cylinder

Postby fractal » Tue Jun 08, 2010 1:06 pm

Hey druban, thanks for your help. That actually makes perfect sense as for a while I was experimenting with rect->polar, via CoreGraphics "Circular Wrap Distortion". I also tried the equivalent in GIMP but was always put off by the fact that I couldn't seem to control how to get the small fraction of the circle. You have provided the retrospectively obvious solution of padding the image! Thank you!

Last night I powered through the problem in a different manner. I used GIMP's perspective transform to pull the bottom vertices in towards the center... that got me as far as a trapezoid. Then I used the Curve Bend filter to approximate the bends (just measured the physical template and extrapolated that to a .points file for the filter). It actually worked near perfectly as far as I can tell.

I'm trying to work up a web page documenting this process and will post the link here if I can get that done.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: A label for a tumbler, cone-like cylinder

Postby druban » Wed Jun 09, 2010 8:32 pm

yes that is a very good solution . I thought initially of recommending curve bend but since it has no numerical parameters I thought it would just be too much trial and error for your purposes.
Good luck.
Your mind is what you think it is.

fractal
Posts: 3
Joined: Mon Jun 07, 2010 2:20 am

Re: A label for a tumbler, cone-like cylinder

Postby fractal » Wed Jun 16, 2010 4:47 pm

Luckily, you can export and import points files for the curve bend filter, and that's how I used numerical parameters.

Full writeup of the process is here:
http://gelfo.net/starbucks/


Return to “Help with using Inkscape”