vpinball icon indicating copy to clipboard operation
vpinball copied to clipboard

Window POV Question

Open droscoe opened this issue 1 year ago • 13 comments

Loving the new Window POV, but I do have some questions:

  1. The "playfield" is shown as being flat (parallel with the ground. However, the image shows the "screen" a certain amount of distance above the playfield and angled. It is my understanding that the entire image represents your playfield display. That would suggest that the image assumes a certain window top/bottom z offset?
  2. The description says Player X, Y, Z is the actual player position. I assume its the eye position of the player at playing stance? In that case, the Player Z variable is somewhat in question. It says that its relative to the bottom of the playfield. If the Window bottom Z offset is changed, doesn't that also effectively change the relationship with Player Z? If not, then what is the base frame of reference for player Z assuming NO window bottom Z offset? If so, shouldn't Player Z change when window bottom Z offset changes as well?

I am trying to create a tutorial document for users. This feature is getting a lot of attention and an equal amount of confusion. I want to make sure my understanding is correct before I put something out that might be wrong.

Thank you!

droscoe avatar Aug 22 '23 17:08 droscoe

I was also looking for a graphic explaining all variables

francisdb avatar Aug 22 '23 20:08 francisdb

I was also looking for a graphic explaining all variables

there is one. It’s in docs folder of VPX 10.8. My question is related to the diagram in the document

droscoe avatar Aug 22 '23 21:08 droscoe

For image see https://github.com/vpinball/vpinball/blob/master/docs/View%20Setup.md

gjupp avatar Aug 23 '23 06:08 gjupp

As gjupp pointed, this is exctly as stated and drawn in the docs.

To answer your questions more precisely:

  • The "playfield" is shown as being flat (parallel with the ground. However, the image shows the "screen" a certain amount of distance above the playfield and angled. It is my understanding that the entire image represents your playfield display. That would suggest that the image assumes a certain window top/bottom z offset?

    I don't understand what you mean by 'the entire image'. In the docs, the playfield is in red, the user screen in blue, and the computed projection in green. The projection (green) is computed with respect to the screen (blue) which is positioned relatively from the playfield (red). The projection also depends on the user's eye position, also defined relatively from the playfield (red). In the end, the bottom center of the playfield is the reference origin of everything.

  • The description says Player X, Y, Z is the actual player position. I assume its the eye position of the player at playing stance? In that case, the Player Z variable is somewhat in question. It says that its relative to the bottom of the playfield. If the Window bottom Z offset is changed, doesn't that also effectively change the relationship with Player Z? If not, then what is the base frame of reference for player Z assuming NO window bottom Z offset? If so, shouldn't Player Z change when window bottom Z offset changes as well?

    As said just above, the bottom centre of the playfield is the reference for everything. The player position is located relatively to it, so nothing affects it beside its coordinates. The window position (offset x/y/z at bottom and top) only affects the (blue) screen position (and inclination)

vbousquet avatar Aug 23 '23 09:08 vbousquet

Maybe a typical range for each of these values could be provided in the docs? I have the impression the payer Y distance is not very realistic in those diagrams.

francisdb avatar Aug 23 '23 10:08 francisdb

@vbousquet @gjupp I'm not sure why this was closed. I do not feel it fully addresses the question. There is a lot of confusion on this. I think it is a fantastic feature and I am trying to help the community by explaining it in a way that doesn't presume a level of knowledge that the developers have, but the users do not. If you would rather this not be discussed here, please suggest where we may continue the conversation.

droscoe avatar Aug 23 '23 14:08 droscoe

Huge improvement with this feature guys. Great work. Especially shines for those of us with flush mounted displays. Closing in on reality. It appears that the major takeaway atleast in my experience with a few tables is that now I can achieve a greater depth and more realistic perspective from the middle of the table to the back wall. I've shared some before after pics, most notably of the corrective effects on the BM66 table on the VPX discord here > https://discord.com/channels/652274650524418078/801462123594514482/1143972208474063049

In those shots, the corrective effects on the Crane and the tophat flasher atop the TV are illustrative of the impact of window vs legacy POV view on realism and perspective.

With that said, I'm curious to ask about the note that appears at the bottom of the readme page:

The existing implementation does not perform (yet) perspective distortion compensation. Sadly, this may lead to some distortion at the back of the screen.

Since I'm seeing the most impactful results there, I do see some perhaps apparent exaggerated vertical stretching of the wall based elements (not the objects but defintely the elements on the back wall). Is that what's been addressed with this comment or is it something else?

eighties8 avatar Aug 23 '23 18:08 eighties8

Thank you for re-opening this issue. I think I have distilled my questions into clearer, more focused topics. Forgive me if some of the questions seem redundant. Without a clear understanding of relationships between the parameters, to the untrained eye, these look like unrelated topics, but I am beginning to see possible relationships. I appreciate your patience.

"Playfield" Orientation

  • Physical playfields are typically oriented at a 6-7 degree slope
    • How is this reconciled with the image, which shows it flat and parallel to the ground?
      • the "screen" is shown as inclined. Is this accomplished with "window" top/bottom Z offset?
        • does this actually change the rendering to account for the incline with respect to the "playfield"?

"Screen"

  • What exactly is the "screen"?
    • the "playfield" and "screen" both reside "inside" the physical playfield monitor/TV
      • does "screen" refer to the physical surface of the monitor/TV?
        • or is this virtual as well? In other words, can it be "above" the physical surface of the monitor/TV?

"Window" Top/Bottom X, Y Offset

  • Why would the "screen" need to be shifted left/right or up/down with respect to the "playfield"?
    • can you provide a use-case?

"Window" Top/Bottom Z Offset

  • Since the "playfield" position never changes, this raises/lowers the position of the "screen" at the top/bottom?
    • according to the diagram, the "window" is the projection
      • Why are settings that change the "screen" called "window" setting?

Inclination

  • this setting is gone from the new POV
    • If "window" Top/Bottom Z offset raise and lower the "screen" with respect to the playfield, does this effectively incline the "playfield" rendering?
      • in that case, the depth of the table AND the incline are both controlled by the "window" Top/Bottom Z offset?
      • is this the use case for "window" x/y offset?

droscoe avatar Aug 23 '23 21:08 droscoe

"Playfield" Orientation : there is no ground in the setup. The playfield defines the coordinate system. The player position is expressed relatively to it, without any inclination, the XYZ axis are the one of the playfield.

"Screen" : the screen is the real (physical) screen, the surface on which what is rendered is displayed. It is the 'window' through which the player looks.

"Window" XY : I have included the X and Y to account for cumbersome user setups or user tastes. Personnally, I don't use them. Using the X offset would be strange. The Y could prove usefull if you want your screen offseted from the playfield

"Window" Z : the physical screen is the virtual window. I called them Window to avoid misleading with screen coordinates/resolution... Changing the window Z change the screen height at the top and bottom (so inclination).

"Inclination" : there is no more inclination since the playfield is the overall coordinate system, and the screen is positioned relatively to it, eventually tilting by setting different Z offset at the top and bottom. The window XY does not contribute to any rotation, these are just shifts (offsets).

vbousquet avatar Aug 23 '23 21:08 vbousquet

"Playfield" Orientation : there is no ground in the setup. The playfield defines the coordinate system. The player position is expressed relatively to it, without any inclination, the XYZ axis are the one of the playfield.

"Screen" : the screen is the real (physical) screen, the surface on which what is rendered is displayed. It is the 'window' through which the player looks.

"Window" XY : I have included the X and Y to account for cumbersome user setups or user tastes. Personnally, I don't use them. Using the X offset would be strange. The Y could prove usefull if you want your screen offseted from the playfield

"Window" Z : the physical screen is the virtual window. I called them Window to avoid misleading with screen coordinates/resolution... Changing the window Z change the screen height at the top and bottom (so inclination).

"Inclination" : there is no more inclination since the playfield is the overall coordinate system, and the screen is positioned relatively to it, eventually tilting by setting different Z offset at the top and bottom. The window XY does not contribute to any rotation, these are just shifts (offsets).

@vbousquet Thank you! I think this resolves most of my questions. Player Z still vexes me a bit. I took great pains to measure my eye level to a few inches below the glass. To ensure I got it right, I took a video with a string hanging from the bridge of my eyeglasses. I could then see where the string landed while standing normally, and playing the table. I then set the Window bottom Z offset accordingly (roughly 3 inches (7.5cm) "below" the level of the lockdown bar. The resulting POV doesn't look right. If I add a couple more inches to my Z offset, its much better. This suggests that either the projection is a bit off, or the playfield is a couple inches "lower" in the cab than I assume. You said the playfield sets the coordinate plane, but doesn't it have to have some intrinsic Z value itself, relative to a fixed reference, even if its 0? When Window top/bottom Z offsets are 0, they should be coplanar with the playfield, which obviously exists somewhere in the local space

droscoe avatar Aug 29 '23 18:08 droscoe

I have been improving the POV quite a lot lately. So here are a few hints that may explain your findings (and I hope are now solved in the latest 'action' build):

  • there was a design bug on how the scaling was applied. It would result in non unfirm scaling. Now you have X, Y and Z scaling, applied in 3D space (without breaking the table like before). Theoretically, you should have the same scale on all axis to get a physically correct result. This is now possible.
  • I did some measurements of friends playing (and updated the defaults in VPX) => the player Z looks to be around 70cm

Hope it helps!

vbousquet avatar Sep 03 '23 15:09 vbousquet

@vbousquet Thank you! I will grab the latest and run a few more tests!

droscoe avatar Sep 03 '23 15:09 droscoe

@vbousquet Using the 1407 build:

The major obstacle I am still trying to understand is the relationship between the "screen/window" and "playfield". In particular Z-offset. To understand my confusion, I need to start with the Player X/Y/Z settings. The player X/Y/Z settings are explained as such:

"Player X/Y/Z is the view position from bottom center of the playfield"

This is a confusing description to anyone that puts some thought into it. For X/Y offset, the depth of the playfield does not matter, so "bottom" could simply be interpreted as the bottom end of the playfield display, without resulting in an incorrect setting.

For the Z-offset however, the depth aspect of this parameter means that "bottom" COULD have two meanings. A playfield is not simply a flat board. It has 3-D objects mounted on it, requiring it to be recessed into the machine. Player Z-offset could mean how far the player is from the physical display screen, or it could mean how far the player is from the base of the playfield at the bottom, which extends "below" the physical display screen. The difference between the two values could be 5.08cm or more, and could also vary depending on the table.

Which is the correct interpretation?

Now we can talk about Window Top/Bottom Z-Offset.

The issue of what the "playfield" bottom means comes back into play. If "bottom" is the base of the playfield, setting the Window top/bottom Z-offset to 0 should result in the window being at the base of the playfield as described above, which would "cut-off" the 3D objects mounted on it. However, this is not the case, as shown in the following images:

pforce_settings pforce_result

This behavior seems to suggest that the Z-offset is actually to the physical surface of the playfield display. The depth then, seems to be intrinsic to the table. The Window Z-Axis settings simply raises or lowers the window at each end to match the intrinsic incline and depth of the table. I tested the notion on Police Force, and Big Bang Bar and it seems to produce correct results. Maybe it's important to point out, my playfield display is pretty much flush-mounted under my glass.

droscoe avatar Sep 05 '23 13:09 droscoe