Author Topic: unsharing vanishing point of two 3d boxes  (Read 766 times)

April 11, 2019, 03:52:14 PM
Read 766 times

ronburk

  • Jr. Member

  • Offline
  • ***

  • 18
I use the 3D box tool (Shift-F4) to draw a box. Then Ctrl-D to duplicate it. Then I drag the new box to one side a bit so both are visible. Both boxes share the same vanishing point, as expected. So then I move the mouse to the right-most vanishing point (yellow) and Shift-drag it to give the selected box a new, separate vanishing point. The moment the mouse starts to move, the first (unselected) 3d box is thrown upward off the page, which was not what I expected or wanted.

Is it a bug? Is it expected behavior that serves some purpose I don't understand?

Windows 7, 64-bit
Inkscape 0.92.4 (5da689c313, 2019-01-14)
  • 0.92.4 (5da689c313, 2019-01-14)
  • Windows 7

April 11, 2019, 04:50:09 PM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Hhmm, I don't have tons of experience with 3d Box.  Could you share the SVG file?  Somehow the settings for mine have gotten messed up, and it's drawing really weird boxes (they're hollow-looking boxes!).  And there's no button to restore the defaults.

For me, the yellow VP goes to the top!

Also, the manual should be covering everything about that tool.  http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Shapes-Boxes.html
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 11, 2019, 04:58:06 PM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Hhmm, but I do see that when I move the VP of one box, all the other boxes that I've made are being edited at the same time, as if they were clones, almost.

I'm not sure if that's expected, or if there's a setting somewhere that needs to be fixed.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 11, 2019, 06:57:37 PM
Reply #3

lcm

  • Jr. Member

  • Offline
  • ***

  • 17
For me Shift-drag on vanishing point works as expected.
To detach selected boxes from perspective stack and unshare vanishing points you can move them with :sel: Selection tool (F1).
  • 0.92.4
  • Windows 7 SP1 64-bit

April 11, 2019, 08:57:15 PM
Reply #4

ronburk

  • Jr. Member

  • Offline
  • ***

  • 18
Hhmm, but I do see that when I move the VP of one box, all the other boxes that I've made are being edited at the same time, as if they were clones, almost.

I'm not sure if that's expected, or if there's a setting somewhere that needs to be fixed.
Yes, that is a beautiful thing about the 3D box tool. You can make a whole bunch of boxes share the same vanishing points and (implicit) eyeline, and then easily change your mind about what perspective you want on the whole scene -- fantastic!  It's kinduva a sadly underappreciated tool, I think, unless there's much better documentation on it than I've found (most youtubers are using it to, well, draw boxes rather than quickly solve perspective problems).  Maybe you have to have done perspective the hard way with a T-square to really see the value; presumably the author of the tool did.

Perhaps if the author had, by default, locked the left and right VPs to create a horizontal eye-line and maybe made the eye-line visible, it might have nudged more people to explore its full capabilities. That is one of the most obvious missing conveniences: somewhat painful to move the eye-line up and down, since you have to move each horizontal VP independently. But hey, better to have generality first, I suppose.
  • 0.92.4 (5da689c313, 2019-01-14)
  • Windows 7

April 11, 2019, 09:03:03 PM
Reply #5

ronburk

  • Jr. Member

  • Offline
  • ***

  • 18
For me Shift-drag on vanishing point works as expected.
To detach selected boxes from perspective stack and unshare vanishing points you can move them with :sel: Selection tool (F1).

Well, that's an interesting clue. When I F1 and move one of the boxes, as soon as I release the mouse at the end of the drag operation, that box gets transported to outerspace (far outside the page).  Thank you for attempting to repro. Sounds like something in my configuration is evoking a bug. I'll try to narrow it down. Seems like two different parts of the code are disagreeing on what coordinate system to use...
  • 0.92.4 (5da689c313, 2019-01-14)
  • Windows 7

April 12, 2019, 12:56:35 AM
Reply #6

lcm

  • Jr. Member

  • Offline
  • ***

  • 17
Well, that's an interesting clue. When I F1 and move one of the boxes, as soon as I release the mouse at the end of the drag operation, that box gets transported to outerspace (far outside the page).
That's a weird behavior indeed. I'm really curious to take a look at before and after SVGs, if you can provide them.

What's your tool settings say? For me it's the following:
3dboxsettings.png
*3dboxsettings.png
(2.5 kB . 392x32)
(viewed 137 times)


Does it happen with snapping disabled (Shift+5)?
  • 0.92.4
  • Windows 7 SP1 64-bit

April 12, 2019, 01:13:42 AM
Reply #7

ronburk

  • Jr. Member

  • Offline
  • ***

  • 18

What's your tool settings say?

Does it happen with snapping disabled (Shift+5)?
Tool settings identical to yours. Good idea to try turning off snap, but it made no difference. Making the before/after svg now...
  • 0.92.4 (5da689c313, 2019-01-14)
  • Windows 7

April 12, 2019, 01:24:36 AM
Reply #8

ronburk

  • Jr. Member

  • Offline
  • ***

  • 18
OK, I opened a fresh instance of Inkscape, drew a 3D box near the middle of the page, typed Ctrl-D to duplicate it, then saved it as "before.svg".
Next, I did a tiny Shift-drag of the rightmost vanishing point and then saved that as "after.svg".
The 3D box that is group "g817" (perspective ID "perspective845") is the one that got dislocated.
  • 0.92.4 (5da689c313, 2019-01-14)
  • Windows 7

April 12, 2019, 01:44:16 AM
Reply #9

lcm

  • Jr. Member

  • Offline
  • ***

  • 17
Thanks. At least now I can confirm there's some sorcery involved.
I keep getting inconsistent results, though. First opening before.svg gives the picture in attachment, when I open another instance of the same file, 3d-box is positioned correctly in the middle of the page.
  • 0.92.4
  • Windows 7 SP1 64-bit

April 12, 2019, 01:51:15 AM
Reply #10

ronburk

  • Jr. Member

  • Offline
  • ***

  • 18
Now I see that separating a shared vanishing point was a red herring.  I can:
a) create a 3d-box
b) create another 3d-box that is completely independent
c) F1 and move the second 3d-box
and the moved box will be thrown off the page.

OK, will try resetting my preferences (after saving). Surely I've messed something up in some innovative way.

Not sure I understand what you're seeing; note that before.svg has two identical boxes, so should look like one box in middle of page.
  • 0.92.4 (5da689c313, 2019-01-14)
  • Windows 7

April 12, 2019, 01:57:25 AM
Reply #11

ronburk

  • Jr. Member

  • Offline
  • ***

  • 18
Letting inkscape create a fresh preferences.xml did not affect the behavior.
Now scratching my head how others are seeing correct behavior.
Ugh. Maybe I should uninstall and reinstall.
  • 0.92.4 (5da689c313, 2019-01-14)
  • Windows 7

April 12, 2019, 02:01:35 AM
Reply #12

lcm

  • Jr. Member

  • Offline
  • ***

  • 17
OK, will try resetting my preferences (after saving). Surely I've messed something up in some innovative way.
I just managed to reproduce it! I'm still not sure what's causing it, but it seems like a bug to me.
I wasn't be able to reproduce that at first because I have different startup file.
Try replacing the file [Inkscape]/share/templates/default.svg with the attached one and try again.

UPD: Nailed it. It's definitely a bug.
Document unit system must match pixels unit system, otherwise 3d-boxes act unexpected.
For example, in Document properties (Ctrl-Shift-D), if Display units are px, then Scale X must be exactly 1. If Display units are mm, then Scale X must be 3,77953; and so on.
By default, Display units are mm, and Scale X is 1, which results in described glitches.
« Last Edit: April 12, 2019, 03:51:25 AM by lcm »
  • 0.92.4
  • Windows 7 SP1 64-bit

April 12, 2019, 02:39:24 AM
Reply #13

ronburk

  • Jr. Member

  • Offline
  • ***

  • 18
Awesome. Works fine with your default.svg installed. Only 1.6K, the truth must be in there somewhere! :-)
  • 0.92.4 (5da689c313, 2019-01-14)
  • Windows 7

April 12, 2019, 02:55:03 AM
Reply #14

ronburk

  • Jr. Member

  • Offline
  • ***

  • 18
Found it!  In your default.svg, change this:
width="800"
height="600"
into this:
width="800mm"
height="600mm"

Fits the hypothesis that the code is picking the wrong coordinate system.
  • 0.92.4 (5da689c313, 2019-01-14)
  • Windows 7

April 12, 2019, 04:11:56 AM
Reply #15

lcm

  • Jr. Member

  • Offline
  • ***

  • 17
Fits the hypothesis that the code is picking the wrong coordinate system.
I've come to the same conclusion and updated my message with some details.
Seems like the bug was already reported.
« Last Edit: April 12, 2019, 05:38:50 AM by lcm »
  • 0.92.4
  • Windows 7 SP1 64-bit

April 12, 2019, 11:42:05 AM
Reply #16

ronburk

  • Jr. Member

  • Offline
  • ***

  • 18
Excellent, a bug with enough information I can work around it easily! Will you add your details to the bug description? (Unnecessary if you're the one fixing it, I guess :-)
Thanks for all your help on this!
  • 0.92.4 (5da689c313, 2019-01-14)
  • Windows 7