metauni / metaboard

Multiplayer drawing boards for sharing knowledge in Roblox.
Mozilla Public License 2.0
28 stars 6 forks source link

Screenshot mode #49

Closed dmurfet closed 1 year ago

dmurfet commented 2 years ago

When using metaboards for meetings, I often take a screenshot of the board to share with people and for archiving purposes. Usually I just use the orbcam and take a screenshot of that. We could consider a more robust export mechanism (e.g. a script that takes the JSON for the metaboard and writes out a PNG file) but taking screenshots is reliable, quick and I think has >= 80% of the value of that more complex mechanism that would have to be updated every time we change the JSON for the boards.

So I think we stick with screenshots and make them better, by adding a screenshot mode. Maybe this is just a key combination (like Shift-C for the current orbcam) or a dedicated button if we need to, which fills the Roblox screen with the board contents and shows no GUI.

The current orbcam view has surrounding world stuff in it, which I think is good for the videos but not perfect for sharing board contents or archiving.

jaipack17 commented 2 years ago

This seems like a good idea. I may take this up during my free time. I have two questions regarding this feature.

How would we show no GUIs at all? We could use StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false). That will hide all the CoreGui except the escape button (the one with Roblox's logo). The button may block some board contents (if any) when the screenshot is taken. Completely disabling this button isn't possible too. Some games do it, but it makes it impossible for mobile users to open the escape menu (while on pc, pressing the escape key will do it). This may be a bit of a hindrance unless we don't really care about this button.

How will we account for boards with different aspect ratios than the screen's aspect ratio? i.e. how would we cover the player's screen with the board if the board is of a different aspect ratio than that of the player's device. A solution to this could be use GUIs instead of changing the camera's CFrame to face the board (unless that's what we aren't already doing). Cover the user's screen with a full-screen GUI matching the color of the board's surface. And then display the board's content (as GUIs) while maintaining the aspect ratio of the board (just about the right fitting for the screen). So we'll have a full-screen background and the board's content above it.

dmurfet commented 2 years ago

Right, we're already using SetCoreGuiEnabled when boards are opened, so I had in mind that we do that for screenshot mode as well. I don't mind having the Roblox logo in the top left. The desired behaviour is to

(i) scale and position the board contents so that they aren't obscured by the Roblox logo, while (ii) maintaining the original aspect ratio and (iii) making the board image as large as possible

The board contents do not have to completely fill the screen. I believe that's what you said above, just repeating it to be sure. I guess there's a question of the background colour, which may not be easy to infer from the board itself. We can just go with a dark gray perhaps.

sheepish12 commented 2 years ago

We don't have to use GUI here since I think we can calculate how to position the camera so that the board fills the screen properly, and it's probably easier to do this

dmurfet commented 2 years ago

Thanks for that Ben, yes, I would like screenshot mode to fill the screen with the in-world board by manipulating the camera rather than the GUI board, as the former is more beautiful.

dmurfet commented 1 year ago

Now available through the web board viewer