Tutorial: Drawing a can and label, in perspective.

Share your Inkscape tricks and tutorials here.
User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Tutorial: Drawing a can and label, in perspective.

Postby druban » Sat Sep 15, 2012 7:53 am

(Please Note: Because of the file size of these animations, they might not load automatically. Right-click on the 'image' icon and select 'show picture' to get your browser to display it!)

One of the most basic drawing exercises is to draw a can or some other circular in cross-section object - a glass, bottle, pillar, etc.- in believable 3D.
Unfortunately, I have observed that several of the online tutorials make a basic error in that they only show how to draw an isometric object which just looks wrong in most applications! For example, in the image below, the cylinder on the left can 'flip' back and forth between being looked up at and being looked down on.

Image

Here, then, is a short tutorial showing the proper way to draw such objects with depth and solidity. There are eight accompanying animations.
If, in Internet explorer, instead of a moving image you see
Image
try right clicking on the x and from the drop down menu choose 'show picture'.

______________________________________________________________________________________________________
To do this just right, we need to establish how far apart the top and the bottom of the can are, and so a sort of schematic front view is in order. From that we can generate a line segment with nodes placed at the level of:
1) The top of the can
2) The top of the label
3) The baselines of the text on the label (In the example I created a guide at the ascender and x-heights as well)
4) The bottom of the label
5) The bottom of the can.
At the very least 1) and 5) are essential. It is the difference in the height (vertical dimension) of these ellipses that determines the apparent distance and height of the object in relation to the viewer.
______________________________________________________________________________________________________
Image

Now that we have a vertical line segment with its nodes spaced appropriately we can use it to generate the ellipses OF the right height and AT the right height, by choosing options in the path effects dialog. The 'Interpolate Sub-paths' effect requires the beginning and ending paths to be combined first; afterwards the result will have to be broken apart. (The interpolate extension offers some nice options but does not allow a path and spacing to be specified, so it's not the best choice.)
_______________________________________________________________________________________________________
Image

Next the interpolated path has to be broken apart as mentioned, and using the bottom ellipse, a copy of the top ellipse, and a rectangle, the front of the can can be constructed. We only need the lower half of the bottom ellipse, since our object isn't going to be transparent ...
_______________________________________________________________________________________________________
Image

Now we use a similar method of construction to make the label. In this case the ellipse that we use to trim the top of the label doesn't have to be a copy, obviously. We are also going to use a copy of the label to cut the text paths to size, using Path>Division.
_______________________________________________________________________________________________________
Image

The next step is an optional tidying up by cutting away the unnecessary parts of the remaining ellipses and leaving just the arcs necessary for the text paths and the height guides. You can trim the two ellipses for the text paths in the next step, since there's some fine tuning and trimming in it anyway, and the height guides are just for visual alignment of the tops of the letters so those can be left as ellipses without affecting their functionality. For the purposes of this tutorial, however, I chose to eliminate all those distracting lines.
_______________________________________________________________________________________________________
Image

Since the text is narrower than the label, the two relevant arcs have to be trimmed to an even narrower size to have the text be centered properly. To know where to cut them, we have to make guides marking the width of each line of text: first, put all the paths in each line of text in one group (In the example that makes two groups, "label" and "text"); then do Object>Guides from Object. (Without grouping them first, you might end up with a hundred useless guides!) Then use the node tool to add a node in the appropriate places and then delete the outer, unnecessary nodes.
Now it's just a few more steps to select the text and the line it's going to be put on and call the Pattern Along Path extension. We can't use the "Pattern Along Path" Path Effect, because the option to choose Ribbon deformation, which is essential to keep the text from bending at the top, is not available in the Path effect (yet! :D ) For a similar reason, we can't use 'Text on path'.
We also want to move the text up so its bottom is aligned with the line and not its middle. Use half the height of the text object as a starting value for the 'normal offset'. All fine tuning has to be finished before applying the extension - it's not editable afterwards without an undo!
______________________________________________________________________________________________________
Image

And finally, the bottom line of text put on its path, and a little detailing with the gradient tool.
______________________________________________________________________________________________________
Image
Last edited by druban on Wed Nov 07, 2012 5:37 pm, edited 21 times in total.
Your mind is what you think it is.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Drawing a can - The right way!

Postby brynn » Sat Sep 15, 2012 10:12 am

Ooooohh, this is going to be another tutorial chock full of druban's gorgeous diagrams! I'm assuming you still have yet to insert some of the images, since I only see the first 2, and the word "Image" for the other 5.

Oh wait....no, apparently they're there, because if I right click on "Image" and look at image info, it does show the image preview and info there. I wonder why I don't see them on the page? They appear to all be GIFs, and there's no reason I know of that I shouldn't be able to see them. The ones I can't see look tiny in the preview, while the ones I see on the page are at a reasonable size. This is using Firefox, fully current and updated. Hhmmm....let me check the tags, maybe something funky there.... How very strange. If I open the message in another window, I see different ones, and different ones only show "Image". And after reloading/refreshing the page a couple of times, they do all show up. Maybe something with the host servers?

I'm not sure I understand your point about how most tutorials draw cans or cylinders. But maybe it will become more clear as I work through the steps. The can on the right side (the "right way").....is it still vertical? Or is the bottom of the can closer to us than the top? Oooorr....are you saying that if you look at the can with your eye level in the middle of the can, the top and bottom should be the same size, as in most tuts; but if your eye level is closer to the bottom, the bottom ellipse should be taller?

Could I make a request? Could you post the finished can in a non-animated image, so it can be studied more closely? It flashes by so quickly in the last animation, it's hard to appreciate all the points you're making. (I can't stop the animation easily with Firefox.) It looks like you can't see the bottom of the can in the finished image, so I wonder why it matters about the bottom ellipse being taller? Well, as I said, I haven't worked through every step yet, so maybe these things will become clear, once I've studied everything.

Awesome work though! You really have a talent for diagrams :D

PS - I notice that when you....well, I can't tell for sure, but it looks like when you click the mouse....or maybe you're using a tablet....that a little circle flashes around the tool's pointer. Is that from a tablet, or is it new in the next version of Inkscape? (I know you sometimes use a development version.) Oh, it shows up even when you click inside a dialog -- maybe you have some kind of fancy mouse? Or it's the tablet? Or maybe part of a fancy theme? I found a feature that flashes a much larger circle around the mouse pointer/cursor when I press the Ctrl key, but I use that just so I know when I've missed the Shift key on the left side. Anyway, just curious :D

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Drawing a can - The right way!

Postby microUgly » Sat Sep 15, 2012 11:48 am

Firstly, thank you for not using YouTube ;) Instructional videos are the worst and a pet hate of mine. A 10 minute video takes 10 minutes to watch--a document takes much less time to absorb and is easier to refer back to. You have found an excellent compromise by using animated GIFs.

Your method for drawing a can is an excellent technique. I don't think I would have thought to do it that way.

I think it would be neat for you to show a side-by-side comparison of your can, compared with can that didn't use all your tricks.

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

Re: Drawing a can - The right way!

Postby druban » Sat Sep 29, 2012 10:01 pm

microUgly wrote:Firstly, thank you for not using YouTube ... a document takes much less time to absorb and is easier to refer back to.

Thanks for looking over my little tutorial, MicroUgly. I know what you mean about the Youtube videos - they are an exercise in patience, and they're often (unnecessarily) of the whole canvas. I tried to avoid that by splitting this one into seven sections that are running at the same time - I hope it works that way...
brynn wrote:is the bottom of the can closer to us than the top? ..are you saying that if you look at the can with your eye level in the middle of the can, the top and bottom should be the same size?

As you move a cylinder up and down the relative shape of the top and bottom changes. When it is vertically centered on the horizon the top and bottom curves are equal, but you would see just their front edges. If you hold a glass so your eye is level with the bottom you will see NO ellipse there at all.
__________________________________________________________________________________________
The final part of this tutorial has to do with what you can :D do with your properly-drawn-in-perspective can. All that work is not going to be worth it if you can't put it in a scene with objects that share the same perspective - not having any horizon is bad, but having several may be worse!
Fortunately, if something is correctly drawn it's easy to figure out where the horizon should be; and after that you can make sure that all objects that you draw are aligned to the same horizon. You just pull out a few guides and draw a couple of line segments. Once you understand this process it's easy to reverse it and draw your starting ellipses relative to an established horizon!

Image

Many people (Okay, it was just Microugly) asked for a side by side illustration, so here they are in a perspective correct setting. (Correct for one can, of course; after following the last installment you realize that the isometric can has no perspective, since any matching line segments on the top and bottom ellipses would be parallel and never meet at the horizon). The decorations on the surface they are sitting on correctly recedes to the right VP.
I think it should be quite apparent that one can looks sadly flattened, but I'll let you decide which one that might be. I've tried to detail them very evenly for the comparison to be a fair one!

Image

A big thank you to Michelle Brami for the beautiful SVG grape leaf, from OpenClipArt!
Your mind is what you think it is.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Drawing a can - The right way!

Postby brynn » Sun Sep 30, 2012 4:48 am

Awesome work druban, just awesome!! Image

May I make a couple of suggestions? The last animation goes too quickly for me to read the descriptive text. I'm sure I'll get it after I watch it a few times. I have no idea if you can slow down the frames with whatever you're using to animate. But if you can, it would be helpful :D

The comparison of the 2 cans at the end really brings it all together, and makes me want to go through the whole tutorial in much more detail than I have already. I have a hard time understanding your point, from the very first image. I need your verbal description to get the point. And I do understand your point, but the first image doesn't draw me in as much as if I saw the result first. I wonder if it would be effective to put it first (or first and last)?

It's amazing how using the proper perspective throughout the image, brings the whole thing to life! I've looked at cans a million times (or usually a straight sided water glass) and noticed that the curve at the bottom is different from the curve at the top. But I could neither explain it, or draw it. My goodness, you've taught me so many important lessons about perspective, in this, and some older messages. I really appreciate you sharing your expertise and time and energy. Now it will be my job to put it to work. (I'm thinking of redrawing my books image using the 3D box, and the same vanishing points throughout. All just to see how much better it could be with proper perspective.)

Thanks for taking the time to do this. I'm sure I'll be only the first to appreciate it, and that it will become a very popular topic! Perhaps there won't be many replies, but I'll bet it will get a LOT of page views.

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Drawing a can - The right way!

Postby flamingolady » Sun Sep 30, 2012 5:46 am

nice work Druban, can I borrow your mind sometime? it seems to work better than mine at the moment, lol!
like Brynn, I can't see most of the images either (using IE) on win 7.
Is there anyway to slow this thing down, even the words are too fast for me to read and take it in (not that I can't read fast, but I need time to suck it into my brain too before the next thing pops up). I just wish there were a way for us to pause it (I know there isn't), stop it, start it, etc.
thanks for the tut druban, that had to take a lot of time to do!

edit - I was trying to create a can of my own, got to the first step and already hung up! I created the rectangle for the main part of the can, and every time I choose 'object to guide', it disappears! the guides stay, but the rectangle is gone.
Question - after creating the rectangle, I changed it to a path, but, when that didn't work, I tried keeping it as an object and it still disappears. can't figure out what's going wrong. any ideas?
dee

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Drawing a can - The right way!

Postby brynn » Sun Sep 30, 2012 12:35 pm

Dee, are you using Firefox? There is a way to stop and start them, by changing Ff settings. But as far as I can tell, if I make that change, then animated smileys will only run through their animation once. (edit - or maybe there's a Ff add-on for this?) If you're using IE, you can click the stop button ( X -- right beside the refresh button) to stop the animation. Then refresh to restart it. As far as not seeing the images, they will eventually show up. I'm not sure why, but it sometimes seems to take imgh (the host) a moment or 2 to load the images. Or maybe it's something with this site's server. I'm not sure exactly what causes the delay, because ometimes I have a delay loading these animations, and sometimes I don't (referring to this page). Anyway, 2 or 3 refreshes should bring them all up.

I'll let druban answer about the tutorial itself, because I haven't worked through all of it yet :D

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

Re: Drawing a can - The right way!

Postby druban » Sun Sep 30, 2012 2:54 pm

flamingolady wrote:and every time I choose 'object to guide', it disappears! the guides stay, but the rectangle is gone

There is a preference for guide conversions under 'tools'. I would check both boxes, 'keep objects after conversion' and 'treat groups as a single object' because i use both these features in this tut..
flamingolady wrote:like Brynn, I can't see most of the images either (using IE) on win 7.

I don't know the ins and outs of the various browsers, but is it showing an 'X' and the word 'image'? Right-click on that and choose 'show picture' from the drop-down menu and IE should load that one immediately.

about the speed! Sorry. I tried it out on my test subjects and even added some time to that but maybe not enough. If i re-edit them I will increase the time the text is on screen but at this time i don't know when i will be able to get around to that...
Your mind is what you think it is.

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Drawing a can - The right way!

Postby flamingolady » Mon Oct 01, 2012 4:50 am

I'm using IE. Brynn's correct, after several times, the images appear, what a hassle, lol.
Druban, please don't worry about changing the timing, that would be too much time, esp now that I know I can pause
it in IE.
I finally gave up on the objects to guide thing, but that was before Druban's post, I really wanted to create
the can, so I eyeballed it based on the tut (I'm not good with all that math stuff that so many of you'all do, I'm more of a
try it and see what looks good to the eyeball). So, here's what I came up with, not as perfect as Druban's of course, and
I added a little extra shading, but wanted to show you'all my rendition so far.
dee

Image

Uploaded with ImageShack.us

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

Re: Drawing a can - The right way!

Postby druban » Mon Oct 01, 2012 4:10 pm

Oh yes, FL that's just lovely! The bit of additional shading makes it a realistic stackable modern can, and the top is very nice.
It's very satisfying to see my suggestions put to such excellent (and quick!) use. It makes me want to do more tutorials - even though this one took almost a month to produce.... I was thinking of doing one on using Inkscape's tools to make perspective a snap... Or making distinctive patterns using the higher symmetries in tiled clones.... Or maybe someone has some other suggestion?
I didn't do an originally planned part of my tutorial that was about a common mistake made in drawing concentric circles in perspective but your diligence has inspired me so here it is, as a nonanimated 'appendix' ...

Image

You might well be wondering how to move the ellipses up just the right amount, and the answer is that although there is absolutely an accurate way to do it (perspective extension is the easiest, and construction of one smaller ellipse and then interpolation with an exponent), just knowing which direction to move them is enough to be able to approximate (eyeball) their position fairly accurately...
Your mind is what you think it is.

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Drawing a can - The right way!

Postby flamingolady » Tue Oct 02, 2012 8:19 am

Druban,
yes, yes, please do more tuts, you're very good at them! I actually like the non-animated ones too, it's easy to follow along
when we have written instructions, pics help, but sometimes animations just fly by me.
Even having tuts on basic uses of the filters and extensions would be good. I've found that no matter how basic I can almost learn something new from them all. It's funny, because I can do some things in Inkscape at an intermediate or higher level, but then I can also get hung up on the stupid basic things, like understanding objects to guides, I just don't get it, so I tend to eyeball everything. Creating even sized, realistic objects can get me too. oh, and drawing people and animals in various positions, need a lot of help in that too, plus tuts on better perspective, better shading, geez I could go on and on, so please keep them coming! Do you have a blog or website of your tuts?
I do (still) enjoy following people's tuts, even if I haven't posted my results on here I've followed several.
thanks again Druban, I just love how people on here share so much! oh, and I love how the can turned out (I did add the front top lip to create a little edge, as some cans still have it). I'm not quite sure if the bottom left-hand side is correct, I seem to be a couple of pixels off, but for the clipart I do, it's fine. I'm also working on a basic label, that needs perspective as well, can't be a straight rectangle (am doing one that goes all the way around, like our veggie cans do).
dee

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

Re: Drawing a can - The right way!

Postby druban » Tue Oct 02, 2012 11:23 am

flamingolady wrote:I'm also working on a basic label, that needs perspective as well, can't be a straight rectangle (am doing one that goes all the way around, like our veggie cans do).


Good luck!! This is a particularly difficult thing to do because Inkscape does not have a wrapping deformation tool (it seems a fairly easy math projection as far as the equation goes, but I have no idea how much more work it takes to make an extension out of it!), The way i always do this is to wrap it to a cylinder in the gimp using map object and then use the result in Inkscape to either trace or as a template.

One tip: no matter what you can only see half - exactly - of the curved part of a cylinder so when you use map object remember to size your pic accordingly.
Your mind is what you think it is.

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Drawing a can - The right way!

Postby flamingolady » Wed Oct 03, 2012 4:01 am

aarg, that sounds complicated. I've not used map object in GIMP, hmm, didn't even think of that. So as usual, am doing this the more manual and complicated way, all in Inkscape. It's not too hard really, just mostly that I can't decide on what the label should look like, maybe I'll hold off completing it until I can decide.

A wrapping deformation tool would be awesome.

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Drawing a can - The right way!

Postby v1nce » Thu Oct 04, 2012 6:40 am

druban wrote:One tip: no matter what you can only see half - exactly - of the curved part of a cylinder so when you use map object remember to size your pic accordingly.


At best you'll see half of the cylinder. Not exactly. ;) (depending on the position of object and the fov...)

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

Re: Drawing a can - The right way!

Postby druban » Thu Oct 04, 2012 6:52 pm

Very true! i should have said, "If no one is standing in front of it!"
:D
Yes, in fact in a perspective rendering you will never see even half of the curved surface of a cylinder - as the distance decreases from infinity the visible part decreases from 180°. @ infinity you would see the maximum (180°) but unfortunately the cylinder has shrunk to a point at that distance :)
I felt the idea was too complicated to express without going on and on and I've probably not been clear in this post either...
Maybe a picture is called for!
rect4252.png
rect4252.png (22.85 KiB) Viewed 28585 times
Your mind is what you think it is.


Return to “Tricks & Tutorials”