0

Let's say I have a screenshot of the Blender default cube as a background in Inkscape, and I would like to reconstruct this cube as the perspective view 3D cube in Inskcape.

I am already aware, that I can draw lines tracing the outline of the background image 3D cube, and then do Object/Objects to Guidelines to create "vanishing point" kind of guidelines - as a rough example:

InkscapePerspectiveBlenderCube

However, is there a way to somehow "automatically" apply these traced guidelines, to become the guidelines of the perspective view 3D cube in Inskcape, such that the perspective view 3D cube (Shift+F4) in Inkscape reconstructs the background image cube?

0
2

Nothing can do this automatically in Inskcape. Sorry, probably not what you want to hear.

You could use the 3D Box tool to recreate it, and manually change the size, and move the vanishing points, to match the underlying image.

Here's a rough example. Here I've set the Y vanishing point to Parallel, and I clicked and dragged the Z and X vanishing points to try to get it similar to the underlying image.

enter image description here

Once you have the 3D Box tool set up, you can then add other 3D boxes to draw them in the same perspective. Make sure to use the 3D box to to move and edit the shapes so that they maintain their perspective. If you try to edit with other selection tools, it won't work.

enter image description here

I've also posted another similar answer to another related question: here which shows some of the things you can use this tool for.

2
  • Thanks, @BillyKerr - note that I wasn't interested in Inkscape intepreting the bitmap image for me, as I already noted "reuse guidelines" in the OP title, and the animation in the gif shows I'm drawing the guidelines myself. What I hoped was more realistic of a feature, was to reuse the position and angle of a (normal) guideline, as the position and angle of a vanishing point guideline of the Perspective View/3D Boxes tool.
    – sdbbs
    May 7 '21 at 11:28
  • @sdbbs - well you could use manually drawn guides to try to find the vanishing points, but nothing that can re-use them automatically. Remember Inkscape is only a 2D tool, not really 3D. So it is rather limited in this respect.
    – Billy Kerr
    May 7 '21 at 11:43
1

Ok, found how to do this manually - it would have been much easier if it was possible to control the angle of a guideline in Inkscape with two points, but anyway...

Note the below will only work for a "perspective" view, where there are vanishing points - in "ortho" view, the perspective lines would be parallel, so there would not be any vanishing points.

  1. Trace out all visible lines of the background image cube

    • Make sure they are just lines with two points, not polygons
    • Make sure they are "point" aligned: select all the traced lines (or Ctrl+A if they are the only objects), switch to Node tool, zoom and select all participating nodes with a rectangle mouse selection; Ctrl+Shift+A to show Align Menu, it will show the submenu for nodes - use this to align all horizontally and vertically, which will place them all at same position. Then with the node tools select them again (otherwise you cannot get focus back to them after clicking Align Menu buttons), and use the keyboard to fine-tune their position:

    InkscapeCubeAlignNodes

  2. Select all traced lines with the Select Objects tool, then Object/Objects to Guides; zoom out - and you should see some vanishing points be formed of these guidelines:

    InkscapeObjectsToGuidesVanishingLines

  3. A proper vanishing point would be a point where three lines cross; having done this manually, some of this will be (way) wrong. To correct: find one of the three lines (participating in what should be a vanishing point) that is most off, take the intersection of the other two as the "right one" - draw a line from this intersection point (look for the "Handle to guide intersection" snap message) to the farthest point of the "erroneous" guideline; create this guideline into a new one, and delete the old erroneous one:

    InskcapeCubeAdjustPerspectiveLineVP

  4. Press Shift+F4 or X to Create 3D Boxes (perspective); make sure you turn off the parallel symbols for all three vanishing points (Toggle VP in X direction between 'finite' and 'infinite'); now that you have the points from the 3D Boxes tool, align them to the intersections of the guidelines:

    Inkscape3DBoxesVPtoGuidelinesIntersection

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.