[SOLVED] Slant group of object - like perspective

Post questions on how to use or achieve an effect in Inkscape.
User avatar
Ponny
Posts: 101
Joined: Wed Oct 10, 2007 3:02 am
Location: Mystic kingdom of Krakovo

[SOLVED] Slant group of object - like perspective

Postby Ponny » Thu Jun 30, 2011 2:31 am

Hoy-hoy

I want to slant a group of object to make some like perspective effect. Like half open door. I can't draw half open door. So I drew closed door in front view. And then tried to slant..... I mean open this picture of the door.

- In TopDraw you can slant object (or group of objects) with selecting this object. You get little squares on corners arround object, to resize object.
Then click on it again. This little squares changes to little diamonds. Now you can slant or stretch object by dragging this diamond.

But in Inkscape is this completely different. There is no slant handles. I just I can't find it. There is no slant command in menu: Object / Transform.

I hope, this is no so stupid question. Maybe this is just imposible to make in Inkscape.

civ-civ


Ponny
Last edited by Ponny on Fri Jul 01, 2011 5:27 am, edited 1 time in total.
Did you see the indigo Pony, when he came from other side wall of the night?

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

Re: Slant group of object - like perspective

Postby druban » Thu Jun 30, 2011 3:43 am

I think you want to use the shear controls in Inkscape. Use the :tool_selector: to click on the object once and you will get one set of arrows for scaling (left side of illustration). Click again (don't double-click!) and you will get a different set (right side), for rotating (corners) or shearing (middle of sides). Drag the handle to get the effect.
rect3154.png
rect3154.png (21.46 KiB) Viewed 9465 times
Your mind is what you think it is.

User avatar
Ponny
Posts: 101
Joined: Wed Oct 10, 2007 3:02 am
Location: Mystic kingdom of Krakovo

Re: Slant group of object - like perspective

Postby Ponny » Thu Jun 30, 2011 8:52 pm

Thankyou. This is interessant operation. Maybe useful in some cases. But I need some deformation tool for perspectivic deformation.

Hm, maybe word slant is not quite correct for this. In fact, I don't know what word slant means. Maybe is right word deformation.

How can I explain this...... You know, things in distance goes smaller. Like railway. Or half open door. More distant vertical edge looks shorter.

civ-civ


Ponny :oops:
Did you see the indigo Pony, when he came from other side wall of the night?

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

Re: Slant group of object - like perspective

Postby druban » Fri Jul 01, 2011 2:44 am

Well, this is a little more complicated. Here's my sample crudely drawn door.
g3885.png
g3885.png (5.36 KiB) Viewed 9443 times

If you have a group of objects, the easiest thing to do is to select the group and call the path effect dialog (path menu) then select from the drop down menu "envelope deformation".
g3924.png
g3924.png (42.88 KiB) Viewed 9443 times

Check either the left and right or top and bottom; you don't need both if you want to keep straight lines straight. For your purpose choose left and right. click on the :tool_node: IN the dialog box to see the control path. only drag the nodes, not the path to keep your object's lines straight. then click on the other path (bottom or left etc) you enabled. You cannot see all four control points at the same time! You must keep the sides parallel to avoid curving lines.
g3977.png
g3977.png (44.89 KiB) Viewed 9443 times

There is another more complicated but more accurate way to get perspective... the perspective extension...
Your mind is what you think it is.

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

Re: Slant group of object - like perspective

Postby druban » Fri Jul 01, 2011 3:03 am

The perspective extension unlike the oath effect, is not adjustable and reversible at any time.... but it is more accurate.
You have to group your objects. Incidentally you MUST make sure that all rectangles and special shapes are converted to paths before calling this extension, unlike the path effect.
You must use :tool_pen: to draw a four point control path (only four points) in this order - Bottom left, top left, top right, bottom right. the path does not need to be closed. This path describes the destination shape of your object gruppe. Here is the door again with the control path next to it.
g3886.png
g3886.png (11.89 KiB) Viewed 9442 times

Then select your door first, then the path, then call the extension (extensions> modify path>perspective). Then wait a while. :D
g4072.png
g4072.png (17.36 KiB) Viewed 9442 times

There it is.
rect4081.png
rect4081.png (8.26 KiB) Viewed 9442 times

This gives you a much better effect but many people have a lot of trouble with this extension. Just a caveat.

Also note that both methods play havoc with any gradients used to color your objects. As a general rule do all your transforming BEFORE shading with gradients....
Your mind is what you think it is.

User avatar
Ponny
Posts: 101
Joined: Wed Oct 10, 2007 3:02 am
Location: Mystic kingdom of Krakovo

Re: Slant group of object - like perspective

Postby Ponny » Fri Jul 01, 2011 5:24 am

Yes! That's it! Path effect editor!

This works the same way like in program TopDraw. Well, result is the same. Principle is the same. And it's simple to use. Well, simple enough for me. And yes, I know, the Inkscape has all, I need, just I could not find.

I tested "extensions> modify path>perspective" first. It is usefull too, but a little bit problematic to use.

1. You must to have just one grup of object. If you have more grups and then all grupped in one group - this object just disappears.

2. This perspective extension turned object for 90 degrees right. I don't know why. Maybe rectangles in inkscape has property named "orientation". But I don't know how to see what orientation has object.

Well, path effect editor is much simpler for me. Thank you for both answers.

:D Ponny :D
Did you see the indigo Pony, when he came from other side wall of the night?

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

Re: Slant group of object - like perspective

Postby druban » Fri Jul 01, 2011 10:35 am

Ponny wrote:I tested "extensions> modify path>perspective" first. It is usefull too, but a little bit problematic to use.

1. You must to have just one grup of object. If you have more grups and then all grupped in one group - this object just disappears.

2. This perspective extension turned object for 90 degrees right. I don't know why. Maybe rectangles in inkscape has property named "orientation". But I don't know how to see what orientation has object.


These problems are addressed in several places in the forum... But i know what you mean, that's why I offered the less accurate but more reliable Path effect.

Off topic:
What a great slogan for some product - or maybe an ISP or telephone company - Less accurate! More reliable! Not much help, but there when you need us!
Your mind is what you think it is.

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

Re: Slant group of object - like perspective

Postby ~suv » Fri Jul 01, 2011 11:01 am

Ponny wrote:2. This perspective extension turned object for 90 degrees right. I don't know why. Maybe rectangles in inkscape has property named "orientation". But I don't know how to see what orientation has object.

The extensions 'Modify Path > Envelope' and 'Modify Path > Perspective' use a different origin for the transformation: see this illustration for a simple example (or this one, transforming a group of paths).

You can visualize the path direction of the quadrilateral for the perspective or envelope transformation in the node tool, if you activate the corresponding preference setting (double-click the node tool in the toolbox on the left to open the preferences pane, and activate '[x] Show path direction on outline', and make sure you have 'Show path outlines' active, too - there's a toggle at the end of the node tool controls bar for that).


Return to “Help with using Inkscape”