I have a system which generates thumbnail images for objects in my game using viewportframes (as is conventional), but I would like to replicate these same images to my website where I can display them there. If we could serialize the texture data of a viewportframe into some format like base64, that would allow me to transfer that data to my external server via httpservice and then reconstruct it on my website.
Other potential use cases for such functionality may be:
- a plugin that accepts any model as an input and generates a bunch of viewportframes, perhaps a series of images of the object from different angles, and then exports that data so an external program can reconstruct the base64 images into a rotating model preview gif (a turntable animation for showcasing your works).
- a game like Bloxburg could automatically take snapshots of players’ houses using viewportframes which are serialized and sent to a website for display. Bloxburg would then have an online catalog of images of house designs for other players to look at and admire.
- a fashion show game with tight integration with an official discord server where players can press a button to have the game take an appealing picture of their outfit and post it to said discord server.
These use cases sound crazy and farfetched, and perhaps they are, but my use case (at the top of the post) is very much real and without this kind of functionality I am forced to make major compromises to my vision. These kinds of unique, obscure behaviors, while unnoticed by most developers, often prove to be the crux of many novel and radical ideas and ambitions. For example, the ability of plugins to write to a text file has inspired me to work on a personal plugin where I could generate an overhead map of my level using raycasts, write that data to a text file, and then with an external program, parse it and convert it into a high quality image.