Changing the perspective of a jpeg logo

Post questions on how to use or achieve an effect in Inkscape.

Changing the perspective of a jpeg logo

Postby lucas » Thu Dec 02, 2010 1:19 pm

I have a logo that I am trying to put on the side of a 3d box. I can get the correct angle with the skew tool but cannot get the effect of "depth". How do I transform the image so that the logo gets smaller as it travels away from the foreground
lucas
 

Re: Changing the perspective of a jpeg logo

Postby brynn » Fri Dec 03, 2010 3:20 am

There are 3 different tools which could do what you want. I'm not closely familiar with them, so I can't explain their strengths and weaknesses, and which might be best for you. But you can look at them all, and decide which would work best for you. These are Envelope Deformation in the Live Path Effects editor, and 2 extensions - Extension menu > Modify Path > Envelope or Perspective. You will also want to look at the instructions in Help menu > Manual (requires internet connection), or there's a link in my signature.
Basics:
> Help menu > Tutorials
> a Quick Guide to Inkscape
Manual:
> Inkscape: Guide to a Vector Drawing Program
Tutorials:
> Inkscape Community
Development news
> Google+
Gallery:
> Inkscape Community Gallery
User avatar
brynn
 
Posts: 6759
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA

Re: Changing the perspective of a jpeg logo

Postby Lucas » Fri Dec 03, 2010 6:33 am

I've done some reading and playing since I posted the question. I hadn't come across the envelope deformation though and will look into it.

What I have done is import the logo as a PDF, ungrouped, selected all paths and the combined. I then choose the perspective shape I had defined (4 nodes starting bottom left and created clockwise) the select the perspective tool. Doesn't work! The shape itself changes shape and size while the logo either remains unchanged of just disappears. I have change the order of selection and so on but nothing seems to work.

I had read that the perspective tool can be buggy so I checked it by creating a simple path to change perspective on and had the same problems. I have seen the tool working on video tutorials so I assume it can be fixed. How would I go about doing this?
Lucas
 

Re: Changing the perspective of a jpeg logo

Postby chriswww » Fri Dec 03, 2010 9:11 am

to all intents and purposes SVG is not geared to 3d. the extensions that accomplish some 3d'ishness in inkscape need to work on vector objects, and only know how to apply the effect with vector information at hand. That means that the effects don't read and try to apply to bitmap/raster images such as your earlier created logo?...unless you convert the logo (trace bitmap or otherwise) into vectors. gimp specifically, and other raster programs can apply 3d effect to raster image data. of course since the bitmaps are flat X/Y data anyway, this fake 3d only goes so far.
chriswww
 
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: Changing the perspective of a jpeg logo

Postby Lucas » Fri Dec 03, 2010 11:58 am

I just wrote this for a post on another forum...

As you can see I'm not having any luck with vector based images either..

Hello!

I am relatively new to inkscape and design in general, but have come to a point that I think may be a software problem.

I have created a 3d box that I wish to turn into a gift box. I wish to place a logo on one side and have it in the correct perspective.

I have imported the logo as a PDF as that is the only vector based file I have

When imported the file is recognised as "group of 1 object"

I then create a perspective shape with the Bezier tool, select the logo and activate Extensions> Modify Path> Perspective.

I get an error message stating, "The second selected object is a group, not a path.Try using the procedure Object->Ungroup."

So I follow the direction and ungroup the logo. After 1x ungroup Inkscape still identifies the file as "group of 1 object"

Regardless I went throught the perspective process that I mentioned above but got the same error.

So I ungroup again an Inkscape now recognises my logo as "Group of 13 objects; clipped in layer 1"

So I try the perspective function again.

Same error

Ungroup again

Inkscape now see the logo as "13 Objects of type Group in layer"

Perspective function... Requires that I click and drag to select all elements in the logo...

Same error

Ungroup again

"26 objects of type group..."

Perspective

Same error

Ungroup

"13 objects of type group.." WE SEEM TO BE GOING BACKWARDS!

Perspective

Same error

Ungroup

"22 objects of type group..." WHAT?

Perspective

Yay! Different error. The perspective shape just disappears...

Undo

ungroup just for the hell of it...

"no groups to ungroup" fair enough...

hmmm what now... Hang on, I remember being told that you canm only perspective 1 path.... Ok

Path> combine

The logo goes to one very ugly shade of green.

Perspective

Perspective shape moves, shrinks and changes perspective.

Undo

Try again, selecting the logo first this time.

Logo moves, changes size and perspective! Great, progress! Hang on... the changes seem to have no relevance to the shape I have defined & unlike all the tutorials I have seen, the logo doesn't move to inside the shape, instead it travels off the canvas to a totally random spot.

I have tried this on both a mac (.47) and a PC (.48) and have the same result.

As an experiment, I followed the basic perspective method on an elipse covberted to a path on bothe the mac and the pc. Worked perfectly on the PC but not the mac.

Tried the same thing with text converted to a path... Inkscape started up the same "group error"for the text. Ungrouped and combined. Ended up with the same wildely incorrect size and perspective as with the logo.

What now?

I thought that this would be a relatively easy thing to achieve but it has taken up almost 2 days of my life....

What I need is an easy way to shift perspective of the logo, without changing its colours.

What now?
Lucas
 

Re: Changing the perspective of a jpeg logo

Postby chriswww » Fri Dec 03, 2010 1:50 pm

if your original logo is a raster (jpeg) 3d looking object...then it doesn't matter which filetype you import it by as you will no longer have the shapes of the lettering etc as vector objects...which is what inkscape can apply (pseudo) 3d and other effects to with results akin to what is expected. a similar thing would happen if you took your finished jpeg 3d logo even into a raster graphics program now and expected other (3d especially) additional effects to look good, as the information of the original shapes is not there. additionally, trying to add perspective to this raster 3d logo (in inkscape or a raster program) will look a bit strange. i have no idea what the logo looks like (can you upload to flickr or whatever and link it here?)..but the possibly better workflow would be to first do the lettering in inkscape, then deform for perspective (will work very well), and then apply the 3d texture or whatever, with the inkscape extensions or out in gimp or whatever.
when you brought in your 3d logo using pdf as file format, inkscape vectorised the input as bits and pieces overlayed and put together like a jigsaw that looks like your logo...but it's not text or a cohesive shape that can easily be deformed for the right effect, as you've noticed with the number of times you've had to ungroup.
if you must start with the 3d logo as is in raster format, you'll have more luck trying perspective tricks/plugins in gimp.
if you do continue to learn inkscape and SVG as a vector graphics format in general, you'll become more aware of where vector and raster are more suited. sometimes it's a combination of the two (vector & raster) that produce desired results, but you'll need to be more aware exactly how they fit together for a particular project.
but if you have no time to learn and little in the way of drawing ability just yet...then even graphics programs worth several thousand dollars will barely produce something worth looking at. part of the fun is pushing your own and the programs' boundaries. if you make it too hard on yourself, it becomes a matter of bashing head against wall, and is no fun at all.
chriswww
 
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: Changing the perspective of a jpeg logo

Postby Lucas » Fri Dec 03, 2010 2:03 pm

It seems like you might be thinking I'm trying to achieve something more complicated than I am...

This is the logo, nothing 3d about it...

If I skew it to thr correct angle I can get it to look close. I just need a way to have it reduce in size from one end to the other so as to look like its on an angle, moving away..

Image

Uploaded with ImageShack.us
Lucas
 

Re: Changing the perspective of a jpeg logo

Postby brynn » Fri Dec 03, 2010 3:36 pm

Ok, so you've tried the Perspective extension, with poor results, right? If it was performing the proper perspective-ness, but was simply displaced on the canvas, I'd say heck, just moved it back where you want. There's a bug related to transformation that can cause the displacement. But it sounds like it's not even doing the perspective right.

I would suggest looking at either the Envelope extension or LPE Envelope deformation. And since I've had generally good luck with other LPEs, I would lean toward that one. But I know that other members have experience with this process. They just haven't seen your message yet. Actually, you might turn up and older topic on this, by searching the forums here. Actually, I'll do the same, here in a little while. And if I find one, I'll post a link to it.
Basics:
> Help menu > Tutorials
> a Quick Guide to Inkscape
Manual:
> Inkscape: Guide to a Vector Drawing Program
Tutorials:
> Inkscape Community
Development news
> Google+
Gallery:
> Inkscape Community Gallery
User avatar
brynn
 
Posts: 6759
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA

Re: Changing the perspective of a jpeg logo

Postby chriswww » Fri Dec 03, 2010 11:54 pm

you get that sort of weird behavior with perspective extension if you select wrong path first. have a look at the screencast on youtube
http://www.youtube.com/watch?v=GMbIPleMiZ0
chriswww
 
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: Changing the perspective of a jpeg logo

Postby Lucas » Sat Dec 04, 2010 5:34 am

I've tried changing the order I select the paths, but to no avail. I think I'm going to have try the envelop stuff...
Lucas
 

Re: Changing the perspective of a jpeg logo

Postby Lucas » Sat Dec 04, 2010 9:17 am

The envelope deformation tool seems to have potential, but is there a way to stop the image "bending" and just change in a more linear way?

I don't understand why this shouldn't be a simple everyday task. Surely it would be as simple as being able to grab the top left handle and drag downwards to narrow one end of the picture. Then grab the bottom right and drag upwards... or hold down a key modifier and have them come in together.

Is this really as complicated as it seems or am I misrepresenting what I'm trying to achieve?
Lucas
 

Re: Changing the perspective of a jpeg logo

Postby chriswww » Sat Dec 04, 2010 10:21 am

hopefully it's not a bug or something particular to your platform. but yes it should be fairly easy to do..just takes getting used to how things work with vectors, which is not quite like the operation one would imagine. the perspective tool does what you could do by hand (if you had enough time), moving each node the right distance to produce the faux 3d effect.
chriswww
 
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: Changing the perspective of a jpeg logo

Postby brynn » Sat Dec 04, 2010 10:39 am

I don't understand why this shouldn't be a simple everyday task. Surely it would be as simple as being able to grab the top left handle and drag downwards to narrow one end of the picture. Then grab the bottom right and drag upwards... or hold down a key modifier and have them come in together.

I'm not positive, but I think this is what the LPE Envelope Deformation does -- because it's "live", or in other words, you can see the changes as you drag things. (I say "things" because I haven't used that particular LPE, and I'm not sure what would be dragged.)

If you want to upload the SVG of the box and the logo, I would be glad to investigate in parallel to you, more or less. I'm always game to learn new things, and this seems to be within my current abilities to learn. Actually I was faced with the exact same situation not too long ago (although don't get too excited, I'm just a hobbyist -- not pro). In my case, the box was fairly small, and there was no text in the logo. So skewing worked well to depict the perspective. But I well understand your problem; if my box were bigger, I could not have gotten away with the skew.

Anyway, I don't know if my help would save you much time at this point. But I'd be glad to try, if you want :D
(Or hopefully someone who knows for sure how to do this, will reply.)

Oh hey, meanwhile, I just remembered this tutorial: http://tavmjong.free.fr/INKSCAPE/MANUAL ... ction.html To me, the text does not look quite right. But still you might pick up something useful :D
Basics:
> Help menu > Tutorials
> a Quick Guide to Inkscape
Manual:
> Inkscape: Guide to a Vector Drawing Program
Tutorials:
> Inkscape Community
Development news
> Google+
Gallery:
> Inkscape Community Gallery
User avatar
brynn
 
Posts: 6759
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA

Re: Changing the perspective of a jpeg logo

Postby Lucas » Sat Dec 04, 2010 1:51 pm

How do I upload it? To I just upload the inkscape file? Or do I need to up load the logo and box separately? I created the box with the :tool_3dbox: tool, so how would I just upload that?
Lucas
 

Re: Changing the perspective of a jpeg logo

Postby bledrin » Sat Dec 04, 2010 1:58 pm

I just realised I had an account for this forum... this post is just to see if it appears immediately or is there a lag like before...

By the way. Bledrin is Lucas, Lucas is Bledrin
Last edited by bledrin on Sat Dec 04, 2010 4:04 pm, edited 1 time in total.
bledrin
 
Posts: 7
Joined: Fri Jun 18, 2010 4:05 pm

Re: Changing the perspective of a jpeg logo

Postby microUgly » Sat Dec 04, 2010 3:54 pm

Off topic:
bledrin wrote:this post is just to see if it appears immediately or is there a lag like before...

There will be a delay until your promoted from being a new user. This happens automatically.

Also, I think I accidentally disapproved your other post in this topic, sorry.
User avatar
microUgly
Site Admin
 
Posts: 2977
Joined: Sat Jun 02, 2007 3:13 pm

Re: Changing the perspective of a jpeg logo

Postby brynn » Sat Dec 04, 2010 9:52 pm

EDIT -- Well, it seems I've roamed around all over the place trying to help, without realizing that your logo is a JPEG. None of the techniques that I've offered below will work on a JPEG. You need to convert it to SVG first. You can do that with Path menu > Trace Bitmap (http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Trace.html). After you have it converted, then read on. And now there's no need to upload files. I did all my testing on my own examples.

Ah, only your first 2 messages, as a new member, are moderated before appearing. However, all messages posted as a Guest or anonymous are moderated, and don't appear automatically. So your next message will go through the system, before it appears. After that, they will appear immediately after you post them (as long as you're logged in).

If you upload an SVG with your box and the logo (just copy the box and logo from your image and paste into a new Inkscape SVG doc), then I (or anyone) can download it, and work on it in Inkscape. Actually, I could create a box and pretend logo, just to experiment, on my own. But I thought if you happened to have a file already, with the box and logo, it would be convenient, because the box would be placed at the size and orientation that you want. If you still want to upload it, you need to use the full wysiwig editor (not Quick Reply). At the bottom of that editor are 2 tabs - Options and Upload Attachment. Choose Upload Attachement, and it's pretty intuitive after that. But meanwhile, I'll go ahead and see what I can learn, with just my own sample box and pretend logo.
Last edited by brynn on Sun Dec 05, 2010 2:37 am, edited 1 time in total.
Reason: add jpeg, Trace Bitmap info
Basics:
> Help menu > Tutorials
> a Quick Guide to Inkscape
Manual:
> Inkscape: Guide to a Vector Drawing Program
Tutorials:
> Inkscape Community
Development news
> Google+
Gallery:
> Inkscape Community Gallery
User avatar
brynn
 
Posts: 6759
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA

Re: Changing the perspective of a jpeg logo

Postby brynn » Sat Dec 04, 2010 10:23 pm

OK, as I suspected, the LPE was very easy, and fairly intuitive. Although I have used LPEs before, so there's a little background that was helpful for me.

I'm gonna make up a quick mini-tutorial for you, so maybe within an hour or so. Be back soon :mrgreen:
Basics:
> Help menu > Tutorials
> a Quick Guide to Inkscape
Manual:
> Inkscape: Guide to a Vector Drawing Program
Tutorials:
> Inkscape Community
Development news
> Google+
Gallery:
> Inkscape Community Gallery
User avatar
brynn
 
Posts: 6759
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA

Re: Changing the perspective of a jpeg logo

Postby brynn » Sun Dec 05, 2010 12:34 am

Well, now that I've finished, I realize that this particular technique won't work with logos which can't be reduced to a single or combined path. So after I post this, I'll try some of the other techniques I've suggested, for more complicated logos.

Here's a PNG of my very quickly made tutorial, and a PDF is attached below, if you'd like to save it. There may well be some typing mistakes, since I kind of made it on-the-fly. So please forgive those.

If anyone finds any mistakes other than typing, or typing mistakes which are critical to the understanding of the instructions, please let me know. And of course, if you have any questions or comments, please feel free to post them.

Image

3D Box with Logo.pdf
(129.55 KiB) Downloaded 39 times


[Edit - Rats! I'm still rather new to Windows 7, and I see that it's native snipping tool does not seem to recognize the transparent Inkscape background. I want to investigate creating perspective with more complicated logos right now. But later I'll fix those white backgrounds for the imported PNGs.]
Basics:
> Help menu > Tutorials
> a Quick Guide to Inkscape
Manual:
> Inkscape: Guide to a Vector Drawing Program
Tutorials:
> Inkscape Community
Development news
> Google+
Gallery:
> Inkscape Community Gallery
User avatar
brynn
 
Posts: 6759
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA

Re: Changing the perspective of a jpeg logo

Postby brynn » Sun Dec 05, 2010 2:31 am

I found this in the manual, regarding the Perspective extension:
This extension requires the Numpy (Numerical Python) package. (Numpy)

So maybe that's what was causing your problems? I don't have that thing, and it appears that installation requires compiling, which I don't understand or know how to do. So I won't be able to try the Perspective extension.

I did try the Envelope extension, on a more complex logo, a group of text, shapes, paths, with poor results. Even though still grouped, the various pieces were scattered about, some roatate, mirrored, stretched, flattened, etc. I think the bottom line is that the Envelope extension is meant to work on only one path, or maybe a combined path.

So for me, the LPE Env Def is the best solution. The only question that still bugs me, and probably you too, is how to apply perspective to a more complex logo. And the only thing I can think of, is to apply LPE to each individual component of the logo, and then finally grouping them, afterwards. I think there must be a better way to do it, but I don't know what it is. Still hoping a more knowledgeable Inkscape user will jump in here :mrgreen:

:o NOW, ALL that said, I just realized that your logo is a JPEG, lol and :oops: :oops: :oops: ! Seriously, DUH! :oops: So I am duly embarrassed :o :oops: None of these tools will work on a JPG. It needs to be converted to vector/SVG. Looking at your logo, I think Path menu > Trace Bitmap should do a fairly good job of converting it. Please see the manual for instructions for Trace Bitmap (http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Trace.html)

I am SO sorry for leading you all over the place with this :( . I should have noticed the JPEG part from the beginning, after all that's in your title! Anyway, after you convert to SVG, the LPE should be a snap :D
Basics:
> Help menu > Tutorials
> a Quick Guide to Inkscape
Manual:
> Inkscape: Guide to a Vector Drawing Program
Tutorials:
> Inkscape Community
Development news
> Google+
Gallery:
> Inkscape Community Gallery
User avatar
brynn
 
Posts: 6759
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA

Re: Changing the perspective of a jpeg logo

Postby ~suv » Sun Dec 05, 2010 3:26 am

brynn wrote:I found this in the manual, regarding the Perspective extension:
This extension requires the Numpy (Numerical Python) package. (Numpy)
So maybe that's what was causing your problems? I don't have that thing, and it appears that installation requires compiling, which I don't understand or know how to do. So I won't be able to try the Perspective extension.

No, rest assured, on Windows, you have that thing (it is part of the installer package). However - it is a known problem on Mac OS X 10.6 Snow Leopard which will be solved in 0.48.1 and already is in current development builds for osx.

Some general notes (I haven't been reading all comments in detail):
Last edited by ~suv on Sun Dec 05, 2010 4:29 am, edited 1 time in total.
~suv
 
Posts: 1955
Joined: Sun May 10, 2009 2:07 am

Re: Changing the perspective of a jpeg logo

Postby ~suv » Sun Dec 05, 2010 4:18 am

brynn wrote:I did try the Envelope extension, on a more complex logo, a group of text, shapes, paths, with poor results. Even though still grouped, the various pieces were scattered about, some roatate, mirrored, stretched, flattened, etc. I think the bottom line is that the Envelope extension is meant to work on only one path, or maybe a combined path.
It does work on groups: screenshot from the earlier comment manually traced in Inkscape (using the paint bucket and the node-tool for the symbols, as well as regular text, kerned to match size & spacing and converted to path) and deformed as (nested) group with two stacked 'Envelope' path effects (Inkscape 0.48.0 on Mac OS X 10.5.8 Leopard).
Attachments
canobolas-1.png
canobolas-1.png (26.43 KiB) Viewed 4010 times
canobolas-1.svg
(250.41 KiB) Downloaded 32 times
~suv
 
Posts: 1955
Joined: Sun May 10, 2009 2:07 am

Re: Changing the perspective of a jpeg logo

Postby ~suv » Sun Dec 05, 2010 5:53 am

Same SVG content (manually traced bitmap - paths in nested groups) transformed with 'Perspective' and 'Envelope' extensions:
Attachments
canobolas-2.png
canobolas-2.png (71.56 KiB) Viewed 3996 times
canobolas-2.svg
(142.11 KiB) Downloaded 23 times
~suv
 
Posts: 1955
Joined: Sun May 10, 2009 2:07 am

Re: Changing the perspective of a jpeg logo

Postby bledrin » Sun Dec 05, 2010 1:01 pm

Thank you all for your efforts!

After playing around with the perspective tool a bit more I did eventually get it to work. I used the pdf copy of the logo and followed the basic perspective process and it worked this time!

This was in a new document, so I guess the error was specific to the inkscape file. I don't understand how this can be but hey I've got it now...

Attached is a copy of what I achieved. I didn't make create the box..... It fell off the back of a virtual truck....

keep in mind that this image will only be very small once printed so the poor resolution wont matter...


The problem I've got now is getting the "$25" to retain its design. As soon as I shift its perspective I loose the "shiny" effect I have created.
gift box.png
gift box.png (212.26 KiB) Viewed 3917 times

25.png
25.png (14.21 KiB) Viewed 3917 times
bledrin
 
Posts: 7
Joined: Fri Jun 18, 2010 4:05 pm

Re: Changing the perspective of a jpeg logo

Postby brynn » Mon Dec 06, 2010 2:09 am

Awesome!
And very nice work on the gift box :D

It might be the gradient (shiny) that's not working with the perspective. Or that piece could have been displaced, and since it's white, you can't really see where it is. But if you've got it figured out this far (despite my efforts to confuse you :mrgreen: ) I suspect you'll get this last part worked out.
Basics:
> Help menu > Tutorials
> a Quick Guide to Inkscape
Manual:
> Inkscape: Guide to a Vector Drawing Program
Tutorials:
> Inkscape Community
Development news
> Google+
Gallery:
> Inkscape Community Gallery
User avatar
brynn
 
Posts: 6759
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA

Next

Return to Help with using Inkscape

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 7 guests