Tutorial: A Product Box in accurate perspective

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

Tutorial: A Product Box in accurate perspective

Postby druban » Wed Nov 07, 2012 6:07 pm

Here's a short tutorial in response to infrequent but regular requests about drawing a box or boxlike object in perspective with specific proportions.
Inkscape of course has the wonderful :tool_3dbox: that can create in a second what would take quite a while to construct with guides and the :tool_pen: , but it does not accept any input about the proportions of the result. Often this does not matter, but when you are trying to create an actual object in specific proportions - for example, a product box that has to be 8 X 10 X 2 in shape, or a building of known dimensions, or a piece of furniture like a bookcase ;) - it's not possible to avoid doing a certain amount of geometric construction to get an accurate result.
This tut is in two parts, the first dealing with constructing the perspective view of a oblong box of specific proportions - in this case I chose 1:3:5 as a pleasing ratio - and the second part dealing with using the perspective extension to map content to the faces of the box created in part one.

Here's part one. Admittedly the construction is a bit difficult and very poorly documented! I have indicated guides by dotted lines and indicated with numbers the specific order in which they need to be created. I know it's a little different than the usual text-heavy tutorials but I believe it will be understandable if you follow along in sequence... just remember, EACH NEW GUIDE ALLOWS YOU TO POSITION A LATER GUIDE OR INTERSECTS WITH A PREVIOUS GUIDE OR ELEMENT TO ESTABLISH THE LOCATION OF A VERTEX OF THE FIGURE YOU ARE DRAWING.

Image

I should mention that this is my own method of doing the projection. I have seen some very lovely and elegantly simple constructions, even here on this forum (Yay, Maestral!) but this is not one of them. still, it works...
Last edited by druban on Sun Nov 25, 2012 2:05 pm, edited 1 time in total.
Your mind is what you think it is.

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

Re: Tutorial: Creating a Box in accurate perspective

Postby druban » Thu Nov 08, 2012 3:13 am

Well, all the hard work is done now.

If you want to use the perspective extension instead of the guide assisted construction you can probably see from Part 2 how to do that in Part 1; (draw the 4-node target path on top of your square-in-perspective quadrilateral, select the group with the base and the containing square, and call the extension). In the last part of this tutorial - part 3? I'll use that method construct the box....

Image

Although it's not possible in Inkscape, there are ways to map a raster image to the sides of a box in GIMP - but you would still have to do all this preliminary work to avoid a distorted image, and transfer the final paths to GIMP to use as a guide for the Map object filter( accurate perspective, but reall difficult to use!) or the perspective tool (which is not really a perspective transform, as the program itself will tell you...)

Good luck! Remember, trial and error is often necessary, even after long practice.
Last edited by druban on Sat Nov 17, 2012 5:32 pm, edited 6 times in total.
Your mind is what you think it is.

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

Re: Tutorial: Creating a Box in accurate perspective

Postby flamingolady » Thu Nov 08, 2012 7:08 am

thx Druban, geez I wish I had a mathematical brain, my eyes crossed over at all those numbers, lol. Pls keep up the tuts, I do use them. Looking forward to seeing some on drawing faces, hands and feet.

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

Re: Tutorial: Creating a Box in accurate perspective

Postby druban » Thu Nov 08, 2012 8:33 am

flamingolady wrote:thx Druban, geez I wish I had a mathematical brain, my eyes crossed over at all those numbers, lol.

Hi FL, it might look intimidating, but there's no math involved... some geometry, but no calculation, the numbers are just the order in which the guides are created, like step 1, step 2 etc. I could have used letters! (Roman numerals, maybe? I, II, III, IV, V etc.?) The numbers just mean that you will need only 25 guides total to do the entire drawing, not too bad, really, eh? Some drawings need many more!
Last edited by druban on Fri Nov 09, 2012 3:53 pm, edited 2 times in total.
Your mind is what you think it is.

volomike
Posts: 9
Joined: Thu May 22, 2008 5:29 am

Re: Tutorial: Creating a Box in accurate perspective

Postby volomike » Fri Nov 09, 2012 2:16 am

Where does one get this "Perspective Extension"? I looked on the following URL and did not find it:

http://wiki.inkscape.org/wiki/index.php ... repository

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

Re: Tutorial: A Product Box in accurate perspective

Postby druban » Sun Nov 25, 2012 2:30 pm

volomike wrote:Where does one get this "Perspective Extension"? I looked on the following URL and did not find it:
http://wiki.inkscape.org/wiki/index.php ... repository
Volomike, this extension comes already installed in Inkscape . It's in the dropdown menu Extensions>Modify Path>Perspective.
druban wrote:there are ways to map a raster image to the sides of a box in GIMP .... the Map object filter( accurate perspective, but really difficult to use!) or the perspective tool (which is not really a perspective transform, as the program itself will tell you...)
When i wrote this I had not run any tests on the perspective tool in GIMP 2.8 or recent versions. The Online manual will tell you
GIMP Online Manual wrote:This tool is not actually a perspective tool, as it doesn't impose perspective rules. It is better described as a distort tool.
I have just tested it, and I am happy to report that it is a true perspective transformation.
Off topic:
To test the perspective tool in GIMP I created a fairly fine grid in Inkscape, exported it as PNG, and then applied the perspective extension using a quadrilateral that I then saved separately as SVG.
In GIMP, I opened the PNG of the grid and imported the quadrilateral SVG as a vector path. (Because of a glitch in the transfer from Inkscape to GIMP I had to scale it up to make it the same height as the grid image.)
I aligned the corners of the four sided transformation 'frame' of the perspective tool to the corners of the imported SVG path, which I kept visible. Once the transformation was complete I exported the resulting image and switched back to Inkscape. I imported the transformed image and laid it on the transformed (vector) grid, and found almost a perfect match - if I had converted all the strokes to paths before using the perspective extension it would have been absolutely perfect.

Why happy? Because that means there will be a third part to this tutorial! :D
Most of the time when working with computer graphics one ends up using a mix of raster and vector. For example, when designing the graphic to go on a product box, text and geometric elements are done as vector but photographic elements are best kept in the raster format - vectorizing them is often not satisfactory. In an untransformed graphic one just layers these elements, but since the perspective extension doesn't do raster, the raster part has to be transformed in the GIMP, the vector part in Inkscape and everything then reassembled to look as if it was transformed all together.

So here goes: Part 3. If anyone's following this!

Image

Last part coming soon!
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: Tutorial: A Product Box in accurate perspective

Postby brynn » Mon Nov 26, 2012 4:51 am

Wow, more unparalleled and gorgeous tutorials from druban!

I'm having all kinds of trouble understanding the very first steps. I understand the viewing plane, but I don't understand the placement of the horizon and vanishing point (in first half of 1st tut). Is that basically eye level? Or do you look out the window to see where the earth's horizon is?

I haven't read closely everything in this topic yet, so this might have been mentioned somewhere, and I missed it. I believe you were the one who taught me that to use the Pespective extension with precision and without distortion (due to stroke widths) one should give the object a fill and remove all strokes. Then after running the extension, you can put the strokes back. Since this topic is somewhat about drawing to scale accurately, this would seem to be an important tip. At least it's been important for my current project (which is quite similar to this) :D

"most glamorous woman in the world" :o :?: I thought I was the most glamorous woman in the world! Image

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

Re: Tutorial: A Product Box in accurate perspective

Postby druban » Mon Nov 26, 2012 8:47 am

brynn wrote:I understand the viewing plane, but I don't understand the placement of the horizon and vanishing point (in first half of 1st tut). Is that basically eye level?

You got it! Not just basically but always. The central vanishing point is always at eye level. The horizon is the horizontal line that runs through it. How high you put it relative to the 'nearest' element in your drawing is arbitrary, but limited by good sense... What could be simpler? :D (The vertizon is the vertical line that runs through it. I made that word up while trying to explain 3-point perspective... let's not go there just yet.)

brynn wrote:I believe you were the one who taught me that to use the Pespective extension with precision and without distortion (due to stroke widths) one should give the object a fill and remove all strokes. Then after running the extension, you can put the strokes back. Since this topic is somewhat about drawing to scale accurately, this would seem to be an important tip.

Kind of right.... since objects get smaller as they recede, one would expect a stroke to get narrower as it recedes, too, but since Inkscape only draws in 2D they stay the same width. Putting it back afterwards won't solve anything, though.If you want to perspectiv-ize your stroked object the stroke must be first converted to a path. I did kind of mention it in a tiny offtopic about testing the perspective tool but I'm glad you mentioned it here....

brynn wrote:I thought I was the most glamorous woman in the world!

This may well be the case, but you have been very circumspect about releasing photographs of yourself in glamorous attire onto the internet.... Besides, Bogart never said, "We'll always have Brynn!" :D
Your mind is what you think it is.

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

Re: Tutorial: A Product Box in accurate perspective

Postby druban » Mon Nov 26, 2012 8:50 pm

So here it is - the end of another long and tediously over precise tutorial. Part 4. (In case you're reading these posts in descending order, there's thrre other parts before this one. They're not very understandable at best, but I imagine they're complete rubbish backwards.)

Image
Your mind is what you think it is.

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

Re: Tutorial: A Product Box in accurate perspective

Postby flamingolady » Tue Nov 27, 2012 3:21 am

possibly off subj - In looking at this thread again, I'm noticing that none of the images are showing, I didn't change any browser options, so am wondering why that's the case, hmmm. Even clicking on them won't open them, which is rare.

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

Re: Tutorial: A Product Box in accurate perspective

Postby brynn » Tue Nov 27, 2012 3:59 am

Yeah, I'm seeing that too. He must have re-uploaded them. Just try refreshing the page once or twice :D

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

Re: Tutorial: A Product Box in accurate perspective

Postby druban » Wed Nov 28, 2012 7:16 am

I have to do show picture too, sometimes... If there is a more reliable host than imgh.com I would be happy to know. :?
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: Tutorial: A Product Box in accurate perspective

Postby brynn » Wed Nov 28, 2012 9:17 am

Off topic:
I'm not sure if the problem is the host. Although I would guess that it is. But I don't think of imgh.us as unreliable. And if they are SVG files, you hardly have any other choice about where to host them. I thought the problem with the animated GIFs in your can tutorials, was because they just took longer to load than the rest of the page. But these not being animated... I am puzzled. Maybe it somehow has something to do with the image height, since the only thing the can tutorials have in common with these, are the height of the images.

I guess you could do a test, if we could find an acceptable place for a test. Host all 4 images at 3 different hosts. Then post 3 different topics. Then we could notice if one particular host doesn't show up as often as the others. But InkscapeForum doens't have a Test subforum. I suppose you could use the Off Topic subforum, and delete the topics when the test is finished. Note that I haven't cleared that with microUgly.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Tutorial: A Product Box in accurate perspective

Postby Lazur » Tue Feb 12, 2013 11:39 am

It all can be done much easier in blender, with better shading/texture options.
If there are interest, I can make a part 5 on this.

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

Re: Tutorial: A Product Box in accurate perspective

Postby druban » Tue Feb 12, 2013 7:20 pm

Lazur URH wrote:It all can be done much easier in blender, with better shading/texture options.
Also you can use more complex geometry.


Absolutely. What was I thinking? :o Oh yeah, how to use Inkscape to do something. That's probably why I didn't post this in the Blender tutorials forum. How embarassing that would have been! :oops: Thanks for your insightful comment, though!
:twisted:
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: Tutorial: A Product Box in accurate perspective

Postby brynn » Tue Feb 12, 2013 9:44 pm

Lazur URH, better to put them in Inkscape and Other subforum. And I'm sure there would be interest in using Inkscape with Blender!

Lizzerd
Posts: 1
Joined: Tue Apr 23, 2013 4:43 am

Re: Tutorial: A Product Box in accurate perspective

Postby Lizzerd » Tue Aug 20, 2013 6:44 am

{whimper} all the images are missing ...

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

Re: Tutorial: A Product Box in accurate perspective

Postby druban » Thu Aug 22, 2013 2:27 am

Lizzerd wrote:{whimper} all the images are missing ...


Reloading the page displayed all the images for me. In the past doing this and context menu>show image on the missing image icon has worked. I guess this is why people do youtube tutorials!
Your mind is what you think it is.


Return to “Tricks & Tutorials”